Skip to content

Instantly share code, notes, and snippets.

@tarex
Created December 15, 2012 18:07
Show Gist options
  • Save tarex/4297744 to your computer and use it in GitHub Desktop.
Save tarex/4297744 to your computer and use it in GitHub Desktop.
Create new file with Alfred
property DefaultPath : "~/Desktop"
property fileExt : ""
on alfred_script(q)
tell application "Finder"
try
set currentPath to (POSIX path of (target of front window as alias))
on error
set currentPath to DefaultPath
end try
set theFile to quoted form of (currentPath & q & fileExt)
do shell script "touch " & theFile
end tell
end alfred_script
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment