irenem
February 29, 2008, 9:14am
1
I would like to get the full path of an application.
var theFile = application.showFileOpenDialog();
But it returns only the portion of the path:
/Applications/Microsoft Office 2004/Microsoft Word
instead of:
MyHardDisk/Applications/Microsoft Office 2004/Microsoft Word
Any idea how ?
IT2Be
February 29, 2008, 9:22am
2
This is Mac right?
There is one main disc (the one the mac boots from), this is the ‘/’…
Otherwise they will be prefixed (if I am not mistaken) with ‘/volumes’
irenem
February 29, 2008, 9:32am
3
It is Mac… of course
I have to reproduce the path in an AppleScript. And so far I know I need something like:
MyHardDisk:Applications:Microsoft Office 2004:Microsoft Word
witout the volume name it won’t even run the script.
Hi Irene,
Check out the JSFile options under the Plugins - FIle node
You have some options there for abstracting the filename and returning absolute paths
Cheers
Harry
irenem
February 29, 2008, 11:09am
5
Hello Harry,
it returns the same path
/Applications/Microsoft Office 2004/Microsoft Word
IT2Be
February 29, 2008, 1:45pm
6
The only thing I can think of is that you use applescript to retrieve the path as well or simply prefix the path you found in Servoy with the volume name from an applescript.
I don’t know what you need to do in Applescript, but you could just use “do shell” to execute the same command using the Posix path you get from Servoy.
See, http://developer.apple.com/technotes/tn2002/tn2065.html
greg.
IT2Be
February 29, 2008, 3:45pm
8
good tip, completely forgot that one
BTW when you want to know more search for osascript.
If I am not mistaken this is the commandline variant of applescript.
irenem
February 29, 2008, 3:55pm
9
Thanks God is almost weekend! I think I need it! I used it a 1000 times in the past, and now I was so focussed and forgot it.
Thank you Greg, and of course everyone who tried to help.
Have a nice weekend