Hi,
I have a script that runs everytime my F5 key is pressed. The script runs fine, however I noticed that holding the button down would run the script many times - this isn't ideal and would like at least a 1-2 second pause before it is able to be pressed again. I tried removing the display event handler in the running script for the keyDown event but it didn't work because I got an error (see below).
I am using displayAddEventHandler as opposed to _display displaySetEventHandler - From what I read, using set rather than add can overide existing Display EH's?
I've tried adding an event handler which is blank, I also tried removing the event handler using displayRemoveEventHandler but I am having issues with the second parameter, id. I tried the display ID which is past into the script via _this (first value in the array passed through) and it said that it was expecting a number, not a dialog display value. I tried 0 and also the number for the key I pressed - it still let me spam the script by holding the button down.
Also, KeyUp seems no different and doesn't actually wait for the keyUp at all I found ? :S