Full Path

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 ?

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’

It is Mac… of course :wink:

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

Hello Harry,

it returns the same path

/Applications/Microsoft Office 2004/Microsoft Word 

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.

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.

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