path to cd?

i am new to applescript and am trying to use applescript to launch some powerpoints from a flash movie off of a cd. i have it working locally, but need to know what to set the path to if i am calling an applescript on a cd to launch a pps on the same cd

any help would be much appreciated!

hi paul,

all volumes in OS X are mounted in the /Volumes path. you can see this in the Terminal, or you can use the ‘Go’ menu to ‘Go To Folder /Volumes’.

also, you could use the AppleScript ‘path to me’ command in a compiled script:

http://bbs.applescript.net/viewtopic.php?id=11068

cheers

EDITED: because i typed a command wrongly. and to add more info.

Thanks for your reply…

i think i’m close bt not quite there… here’s what i’m doing:

tell application "Finder"
	activate
	select file "NY.pps" of folder "NewYork" of folder "Global" of "/Volumes/GlobalCD"
	open selection
end tell

but i’m getting the following error:

‘Can’t make ‘Global’ into type integer’

unfortunately i don’t know applescipt well enough to know what is wrong with this script

thanks for any help in advance!

hi paul,

the more i think about this, the more i think you should try a ‘path to me’ command. if your AppleScript is compiled, and on the CD, then try something like:


tell application "Finder"
	activate
	set myPath to (container of (path to me)) as string
	select file myPath & "NY.pps"
	open selection
end tell

if that’s not it, then you could try something like:


tell application "Finder"
	activate
	select file "NY.pps" of folder "NewYork" of folder "Global" of folder "GlobalCD" of folder "Volumes"
	open selection
end tell

but i’m not sure about that last one.

hi paul,

try this:


tell application "Finder"
	activate
	select file "NY.pps" of folder "NewYork" of folder "Global" of disk "GlobalCD"
	open selection
end tell

or:


tell application "Finder"
	activate
	open file "NY.pps" of folder "NewYork" of folder "Global" of disk "GlobalCD"
end tell

i think one of those will work.

You could also use shell scripting. Something like:

do shell script "open path/to/file"

Or in your case:

do shell script "open /Volumes/GlobalCd/Global/NewYork/NY.pps"

thanks!!!