I have a function "Clear Numbers" which can be run
either from a button "Clear Numbers" or be called
from another function.
I want to warn the user when the function is called
from the "Clear Numbers" button but not when it's
called from another function.
Recall but can't find mention of getting the ID of
the last button pressed.
Help appreciated.
Function Call
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Function Call
Is age an excuse? Eighty-four and counting.
Programming powered by coffee.
Programming powered by coffee.
Re: Function Call
Well, I don't know about last button pressed, but this sounds like a case for the use of target , ie. in the script at card level the button is on,
or more simply, just put the dialog call in the mouseUp code of the button itself, not in the general function clear numbers.
As for the id of the last anything (except fields I think), you can get the id with
Code: Select all
on mouseUp
if the target is button "Clear Numbers" then
answer "warning, you've pressed a button that clears the numbers"
/* call the function */
end if
end mouseUp
As for the id of the last anything (except fields I think), you can get the id with
use answer instead of get if you want to see the id pop up.get the id of the last target