Firstly, thanks for your swift response. :)
What do you mean by refactoring please?
I am a self taught coder so i dont really have much in the way of direction. What i would have wanted to use, before ineffective google searches got involved, is below.
The original code was copied from my current state but the code below is basically what i had to begin with, but threw the same error as above.
Again, simplified to only the relevant parts.
I know my syntax was correct (: etc) on the firstlot because idle wont let it run until thats covered. The code runs on a thread and actually closes the thread when this happens, making the rest of the program go haywire.
I have simplified this way as this is the only change made, and its the only thing im having trouble with.
Thanks again :)
- edited - forgot some declarations
What do you mean by refactoring please?
I am a self taught coder so i dont really have much in the way of direction. What i would have wanted to use, before ineffective google searches got involved, is below.
The original code was copied from my current state but the code below is basically what i had to begin with, but threw the same error as above.
Again, simplified to only the relevant parts.
temptime=time.time() textlooptime=time.time() textrepeats=0 while (true): temptime=textlooptime - time.time() if (textrepeats > 2): # this is where the catch out responds to # repeated short intervals textlooptime=time.time() textrepeats=0 elif temptime > 3: # do the first lot - we detected a long # enough interval textrepeats = 0 textlooptime=time.time() elif (temptime <= 3): # do the second lot, interval too short. textrepeats = textrepeats + 1 textlooptime=time.time()Clearly, the code is different, but im out and on mobile.
I know my syntax was correct (: etc) on the firstlot because idle wont let it run until thats covered. The code runs on a thread and actually closes the thread when this happens, making the rest of the program go haywire.
I have simplified this way as this is the only change made, and its the only thing im having trouble with.
Thanks again :)
- edited - forgot some declarations