Re: button clicks

100116.221@compuserve.com
10 Apr 97 13:05:18 EDT

Barney,

>If a user becomes impatient while waiting the couple secs it takes a
>page to load, and clicks the mouse button, each click is actually 'read'
>and the button action occurs. Hence, five extra clicks results in the
>next five pages being loaded before it stops.

I assume that this button travels from one card to another? If you want
to disable the button for the duration of the move, simply use 'disable
me', then 'enable me' at the end. Also, you might want to "set cursor to
clock" to reduce the possibility of the user wanting to try to click.

on mouseup
set cursor to clock
disable me
go next cd
enable me --no need to reset the cursor, its reset at the end
automatically
end mouseup

If you don't want to disable the button (which might look a bit odd,
depends how important this is) it gets a bit more complex. You need to
set a variable to contain information that the script is in use, so don't
do it again. Heres an example:

on mouseup
global am_I_executing
if am_I_executing is true then exit mouseup
--discontinue if currently moving
put true into am_I_executing
--so that if the script is activated again before next cd is
--complete it will not execute again
go next cd
put false into am_I_executing --reset the variable for next use
end mouseup

If you have a previous button there as well, then you can use the same
variable name - so when its executing a "going forward" action it won't
queue up a "going back" action. Use a different variable if this is not
what you want.

Of course there may be another way to do this, but I haven't thought of
it :-).

Hope this helps,

regards,

Kevin Miller
Cross Worlds Computing