Hi folks!
I’m new here, and at first I’d like to introduce myself. Just few words: medical school student, italian (so apologies for my english…), 26.
In love with applescript since OS 7 times…
Well, now my question.
In this period I’m trying to do some experiments with the integration of applescripts and unix commands (a first example is the YACMU app u can find in latest additions section).
My problem is to write a shell command “path independent”. I mean, more or less like “~/user/example”, but instead of the home path I have to run the command in the same path of the script itself.
Perhaps is a silly question, but even if I’m a bit experienced with applescript, I’m little more than a newbie with unix, just some hints from the high school…
So, thanks to all you guys!
Marcello
You can use a full path in a shell command - You just have to convert it to the POSIX form for UNIX and quote it to deal with special characters like spaces and * that UNIX uses for various purposes.
set the_file to choose file
set the_unix_file_path to the quoted form of POSIX path of the_file