Hi All,
OK if a user accidentally clicks on a button 3 or 4 times, I want the script to execute only once. Once the scripts has been executed, then the user can click again.
OK I tried using this script at the beginning and end of a mouseup command, but it did not work.
if the pendingmessages is not empty
then
exit to top
end if
Any ideas? I've had this problem for years. I feel like I'm the only person in the history of programming who sees this as a problem.
Max
Stopping Repeated clicks
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Re: Stopping Repeated clicks
Hi Max,
trylook at flushEvents in the dictionary.
Kind regards
Bernd
try
Code: Select all
get flushevents("mouseUp")
Kind regards
Bernd
Re: Stopping Repeated clicks
maxs...
put a button and a fld on a card... put the followinf script into the button..
Does that do what you wish ?
Dixie
put a button and a fld on a card... put the followinf script into the button..
Code: Select all
local ImBusy
on mouseUp
if ImBusy = 1 then exit mouseUp
put empty into fld 1
DoTheStuff
end mouseUp
on DoTheStuff
put 1 into ImBusy
repeat with count = 1 to 4
wait 2 seconds
put count & space after fld 1
end repeat
get flushEvents("mouseUp")
put 0 into ImBusy
beep
end DoTheStuff
Dixie
Re: Stopping Repeated clicks
Thanks Dixie, and Bernd,
This really does the trick. Thank you so much.
Max
This really does the trick. Thank you so much.
Max