debugging - How to debug droplets using AppleScript -
just 3 lines of script able test droplet application without leaving applescript editor
set fich posix file "/appli/conv2spct.app" string tell application "finder" open posix file "/users/yourusername/desktop/somefile" using application file fich
if there errors in droplet display dialog opened script editor applescript
here's pragmatic alternative using do shell script
, potentially allows specify multiple file arguments:
do shell script "open -a /appli/conv2spct.app ~/desktop/somefile1 ~/desktop/somefile2"
the above paths happen not need quoting (escaping) shell, when using variables specify file paths, it's best use quoted form of
(to pass multiple arguments, apply quoted form of
each):
do shell script "open -a " & quoted form of fileappli & " " & quoted form of fileargument
Comments
Post a Comment