Delete more than one button
Posted: Thu Jun 25, 2015 2:03 am
I made a button with the intention that it will reset the page or delete all of the buttons that were created by the user.
the following works for deleting one button:
on mouseUp
delete button "mybutton1"
end mouseUp
the following also seems to work:
on mouseUp
delete button "mybutton1" and button "mybutton2"
end mouseUp
However, if I have more than one "mybutton1" on the page it will only delete the last one created and not all of them and if one of the buttons listed in that code an error occurs because it doesn't exist.
the following works for deleting one button:
on mouseUp
delete button "mybutton1"
end mouseUp
the following also seems to work:
on mouseUp
delete button "mybutton1" and button "mybutton2"
end mouseUp
However, if I have more than one "mybutton1" on the page it will only delete the last one created and not all of them and if one of the buttons listed in that code an error occurs because it doesn't exist.