![]() |
|
|
|
#1
|
|||
|
|||
|
Hi Jeff,
Sorry for the delay in getting back to you, thanks for the example code, I didn't know about the condition command before but can see that it would be very useful. However I have one more question which is how to remove the "True" condition after each trial so that the program moves on to the next trial. At the moment I am getting the information logged but the program seems to stick on the first condition rather than timing out after 3 seconds. Could you let me know what the "while True" part of the code refers to? I assume it just means while in that function but am a bit unclear on how to end the function with a command. Best, Harry |
|
#2
|
|||
|
|||
|
The while True line always evaluates to True so the loop keeps repeating. To run that code a set number of times you could use a for loop or have an expression following while that evaluates to False after several loops. Try replacing:
Code:
while True Code:
for i in range(1,5):
print 'start trial {}'.format(i)
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| exact copy of mainview in second window | dcnieho | Vizard | 1 | 06-30-2014 05:02 PM |
| Window always on top | madeinjava | Vizard | 4 | 08-27-2013 03:10 PM |
| Unexpected Change of Window Size | javadi | Vizard | 7 | 07-23-2013 03:56 PM |
| Inconsistent timestamp while logging | mape2k | Vizard | 4 | 07-15-2013 07:03 AM |
| timer question | Elittdogg | Vizard | 5 | 10-10-2007 03:49 PM |