Skip to content

Instantly share code, notes, and snippets.

@Zettt
Created August 25, 2014 12:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Zettt/bb788c74972caab0d0b9 to your computer and use it in GitHub Desktop.
Save Zettt/bb788c74972caab0d0b9 to your computer and use it in GitHub Desktop.
Inspect App/Process with AppleScript: The beginnings of a LaunchBar Action to get certain information about running processes.
tell application "LaunchBar"
set bundleID to id
set appVersion to version
set appName to name
log appName & "\n" & bundleID & "\n" & appVersion
tell application "System Events"
tell process "LaunchBar"
set bundleID to bundle identifier
set arch to architecture
set creatorType to creator type
set displayedName to displayed name
set fileFromWhichTheProcessWasLaunched to file
set fileType to file type
set isFrontmost to frontmost
set hasScriptingTerminology to has scripting terminology
set processID to id
set processName to name
set partitionSpaceUsed to partition space used
set shortName to short name
set totalPartitionSize to total partition size
set unixProcessID to unix id
set isVisible to visible
end tell
end tell
log bundleID & "\n" & arch & "\n" & creatorType & "\n" & displayedName & "\n" & fileFromWhichTheProcessWasLaunched & "\n" & fileType & "\n" & isFrontmost & "\n" & hasScriptingTerminology & "\n" & processID & "\n" & processName & "\n" & partitionSpaceUsed & "\n" & shortName & "\n" & totalPartitionSize & "\n" & unixProcessID & "\n" & isVisible
end tell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment