I want to be able to press a key on a keyboard and it will toggle a button, but do not know how to right now any help would be appreciated!
Hi,
it depends.
AppleScript cannot detect keystrokes, but you could use a tool like FastScripts, QucikSilver etc.
Toggle a button “ probably with GUI scripting “ depends strongly on the UI environment
And you should put a more descriptive subject line. Because we’re all here for “help with applescript”.
You may want to take a look at “ASObjC Runner.” It can detect modifier key state within running scripts. Probably not EXACTLY what you’re looking for, but it might be good enough.
http://www.macosxautomation.com/applescript/apps/runner.html