Hey there Script Debugger community!
I am new to scripting and trying to navigate these waters by collecting as much wisdom as I can early on. I am new to scripting itself, as well as to Script Debugger itself so be patient with my newbie questions, please!
I am looking for some recommended Best Practices for AppleScript, but GUI Scripting in particular. I have learned that sometimes GUI scripting is the best/only way to get something done, but it’s so powerful! However, it also has its own workflow and approach, I have noticed, too.
Ok on to the questions:
-
How do you guys organize/ archive/ access and run your scripts? Do you just place them in the Scripts folder and run them using the menu bar or is Keyboard Maestro the recommended method (this seems to be) or something else? I imaging you guys have lots of scripts and I was wondering how you manage them.
-
I have successfully accomplished my first GUI script! However, I have noticed that it is very “hard coded”, meaning it is specific to the exact document I am on (with the exact title). How do I adjust my GUI scripts to me more reusable? Script example below of what i am talking about.
-
I have noticed that the scripts run too fast sometimes. Is there a recommended way to pace the scripts so they execute consistently and generate errors?
-
What questions should I be asking as a newbie that I am not here?
Sorry for the long post. Any feedback on any of these questions is appreciated. Ray had recommended getting UI Browser and WOW, WHAT A TOOL! UI Browser and Script Debugger are a powerful combo. Now just looking to add in the wisdom of the community.
Thanks so much!
My first GUI Script:
tell application "Keynote"
activate
end tell
tell application "System Events"
tell its UI element "Keynote"
tell its window "Untitled"
tell its toolbar 1
tell its radio group 1
tell radio button "Format"
click
end tell
end tell
end tell
end tell
end tell
end tell