Skip to content

Instantly share code, notes, and snippets.

@yannxou
Last active August 29, 2015 14:11
Show Gist options
  • Save yannxou/48c89c8e279e7c57e62f to your computer and use it in GitHub Desktop.
Save yannxou/48c89c8e279e7c57e62f to your computer and use it in GitHub Desktop.
AppleScript: Get Current Path
-- Note when used from Automator: This returns the .app folder when saved as an application but returns the Applications folder when the workflow it's run from Automator.
tell application "Finder"
set current_path to container of (path to me) as alias
end tell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment