Member Since: Aug 13, 2011
Location: West Sussex, UK
01-06-2013, 01:59 PM
Well done for getting it working, dont forget the "end try" statement in your code snippet is missing it.
Also consider using an error trap in your try statements, this will help you debug your code much easier, when things go wrong, also you can use the error trap to display a dialog bog to the user, with a useful desciption of the fault.
-- Some code that might cause an error
on error error_message number error_number
return "Error" & space & error_message & space & error_number as text
And yes your correct, shell scripts only understand POSIX paths, where Applescript commands usually return a HFS colon delimited path, unless otherwise you convert it,
also you need to escape the POSIX path string, in case it contains spaces or other unsupported characters.
Good luck with it.