Learning AppleScript on Mac OS X
I was working on updating my little Image Size script for Safari learning AppleScript in the process.
I was looking to see what kind of information I could extract and script out of the Finder. After going beyond the point of frustration and annoyance, I was thinking that AppleScript was very poorly documented and a complete waste of time. Yeah, you may be able to script applications but it was seeming like only if you were the developer of that app.
After going over and over Apple’s Language Guide and going in circles on their developer sites. I stumble upon Dictionaries, hmm… looks like the friggin’ API stuff I’ve been digging around hours for. It’s an API not a dictionary. argh!
After looking at the dictionaries available, I quickly find which apps are scriptable and how I can pull out the image size using Image Capture Scripting. Why didn’t I find a pointer to this sooner!?
So if you’re starting on AppleScript, check out “Open Dictionary…” in the Script Editor. There’s a ton of info available right there, basically the API for all scriptable applications. sweetness!