I am not shure what is going on since I don't see the complete script.
Some things come to mind. In the preopencard handler you say:
Code: Select all
.....
nbacktiming
end PreopencardCode: Select all
...
send nbacktiming to me in 10 milliseconds
end PreopencardIn the nback handler you use a lot of variables (Fehleranzahl, tOutput, xback, Antwort etc) I don't see how you initialized them since they are not local variables. Did you declare them as script local variables or global variables at the top of the script? My guess is that some of the problems stem from not initializing variables for nback.
The send nback to me in 2500 milliseconds should work. You just have to watch out that when you leave the card there might be a "nback" message pending which will probably not find the handler when you are at the next card. Look at pendingmessages.You would have to cancel that message. Example
Code: Select all
on closeCard
repeat for each line aLine in the pendingMessages
if aLine contains "nback" then cancel item 1 of aLine
end repeat
end closeCardKind regards
Bernd
