Everything I know about AppleScript I taught myself and was wondering if I missed any cool features. I know you can make the computer talk to and control applications but is there anything else it can do or is it time to move on to a new language?
When it comes to Applescript, application control is where the action is. There's not much of a "wow" factor within Applescript itself unless you're a real language nerd. It's really more about presenting a set of easy-to-use tools to control the "wow" factor of other applications.
I've seen (and have) examples of Applescript playing simple card games and other text-based fun (well...as much fun as one can have viewing one display dialog
after another), but these are (at best) academic exercises to show off the robustness of the language itself or a specific feature of Applescript.
The coolest thing about Applescript I've recently discovered, is that you can script almost anything on your mac. So even application, which don't support Applescript natively, can be used in a workflow. This is possible, because you can just "press" buttons as if you're sitting on the computer.
tell application "GhostReader" to activate
tell application "System Events" to keystroke "n" using command down
I used this to copy and paste a website from Safari and have it read by GhostReader, a proprietary text to speech tool.
Simple, but I use this all the time!
tell application "System Events"
display dialog "$msg" with icon stop buttons {"Foo", "Bar", "OK"} default button "OK"
end tell
Whenever I'm doing some shell programming, it's convenient for my operation to bring awareness into Finder, via a dialog.
Very handy.
You can automate everything on your Mac, this is a great time saver. I remember coding shell on C++ on Windows, it's just a pain to automate Windows.