hello,
kill button* kill func* log off func void toggle1 (void) { credit++; } func void toggle2 (void) { lecture_switch_start_stop = 1; } signal void affichage (void) { while (1) { exec("log>C:\log.txt"); //LIGNE1 printf ("%u,%u,u%,u%,\n",display_J1,display_J2,display_J3,display_J4, display_J5,display_J6,display_J7); exec("log off"); //LIGNE2 twatch (2000); } } define button "insert credit","toggle1 ()" define button "start stop","toggle2 ()" define button "start simulation", "affichage ()"
the command of ligne 2 (log off) is ok but the command of ligne 1 doesn't begin to log if I do this command to time I have an error that the file is already open. but I have nothing in my log.txt file.
what do I wrong??
I realy need to close and after to reopen the log file because I only want to have 1 ligne printing in my log.file.
thanks for your help.