I want to receive an incoming file (for example, if the file is opened through my application) and store it in a variable. Can it be done?
Ah, OK. In that case the standard technique is to create an on open
handler. For example, if you put this code in a script:
on open fileList
repeat with f in fileList
set p to POSIX path of f
display dialog "Path: " & p buttons {"OK"} default button "OK"
end repeat
end open
and save it as application, dropping items on to the application shows their paths in a series of dialogs.
Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"