I have the following script. However, I need to get the name of the button that was pressed to initiate this event. The value of "boxDay" should be the button name. Is this possible, if so how?
Code: Select all
on mouseUp
put the short system date into unfDate
set the itemDel to "/"
put the item 1 of unfDate into tDay
put the item 2 of unfDate into tMonth
if tMonth is not 12 then
answer "Sorry, you can't open any boxes until December."
end if
if tDay < boxDay then
answer "Sorry, you can't open boxes for days in the future."
end if
end mouseUp