Skip to content

Instantly share code, notes, and snippets.

@SnoringFrog
Created January 27, 2016 17:25
Show Gist options
  • Save SnoringFrog/c29c3180dcd92bd571b6 to your computer and use it in GitHub Desktop.
Save SnoringFrog/c29c3180dcd92bd571b6 to your computer and use it in GitHub Desktop.
Check current version of AppleScript
(* While trying to figure out what version of AppleScript I had installed,
I came across this article: https://www.safaribooksonline.com/library/view/applescript-in-a/1565928415/ch01s05.html
The problem? That article is from 2001 and no longer works!
The script provided in that article will *always* return 1.0 as your version,
because it just checks the version of the currently executing script (implicitly set to 1.0)
Instead, just use this script to output the version in a dialog.
*)
display dialog "You're running AppleScript " & version of AppleScript
-- Reference: AppleScript documentation: https://developer.apple.com/library/mac/documentation/AppleScript/Conceptual/AppleScriptLangGuide/conceptual/ASLR_fundamentals.html#//apple_ref/doc/uid/TP40000983-CH218-DontLinkElementID_347
@xuchunyang
Copy link

Thanks. I find both of the following work, though the yours (the first) is shorter

version of AppleScript
-- "2.7"

AppleScript version of (system info)
-- "2.7"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment