Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- try
- tell application "Finder"
- set il to POSIX path of (insertion location as text)
- set ans to text returned of (display dialog "New-File Name: " default answer "")
- if ans is "" then return
- do shell script "touch " & quoted form of (il & ans)
- set f to POSIX file (il & ans) as alias
- if il is POSIX path of (desktop as text) then
- set selection to f
- else
- select f
- end if
- end tell
- end try
Advertisement
Add Comment
Please, Sign In to add comment