Reputation: 59
I am trying to make an app in applescript where if you try to turn the volume down the volume is set to 16. I am still a beginner and i was wondering if there is a 'if buttonpress' sort of command. Thanks!
Upvotes: 0
Views: 1741
Reputation: 738
Assuming I'm understanding you, this is the basic idea:
set button_returned to button returned of (display dialog "hi")
if button_returned is "OK" then
#do something
end if
You put up a dialog, then check for the name of the button clicked, and if the name matches whichever button you're checking for, then "do something".
Upvotes: 2