Skip to content

Instantly share code, notes, and snippets.

@ChristoferK
Last active March 7, 2021 21:56
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ChristoferK/2bf181b35c47044d7cf10b31ac024e6f to your computer and use it in GitHub Desktop.
Save ChristoferK/2bf181b35c47044d7cf10b31ac024e6f to your computer and use it in GitHub Desktop.
[Scriptable Apps] Retrieves a list of bundle identifiers for the applications in the /Applications folder (and sub-folders) that are Applescriptable. #AppleScript #applications #scriptable #Finder
property dir : path to applications folder
use Finder : application id "com.apple.Finder"
property contents : a reference to (folder dir)'s entire contents
property list : a reference to application files in its contents
script
property parent : my list
property id : my id
property key : my has scripting terminology
end script
tell the result
repeat with A in a reference to id
set [[x], key] to key's [it, rest]
if not x then set A's contents to false
end repeat
return id's text
end tell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment