Help simple Applescript

Hey Guys,

I’m relatively new to the applescript world but I can usually get around well. One questions has been causing me grief for some time. It seems so simple but its frustrating. What am I missing?

I simply want terminal to browse to a location, however the destination folder name has spaces in it. With the script I’m using I can’t use double quotations. So terminal never paths to the correct folder. Stupid issue I know. And I know you’re thinking just rename the folder but its not that easy.

Any help would be fantastic. Thanks guys,

Example:

tell application “Terminal”
if not (exists front window) then do script “”
delay 1
do script “cd /applications/Adobe Indesign CS3 Server/” in front window
activate
end tell

tell application "Terminal"
    if not (exists front window) then do script ""
    delay 1
    do script "cd '/applications/Adobe Indesign CS3 Server/'" in front window
    activate
end tell

What a bonehead …

Thanks,

Hi,

in AppleScript there is a command quoted form of to quote paths reliably


set thePath to "/Applications/Adobe Device Central CS3/"

tell application "Terminal"
	if not (exists front window) then do script ""
	delay 1
	do script "cd " & quoted form of thePath in front window
	activate
end tell