Need help with opening Apps through Terminal

I have a noob question

When I do this in Terminal it will open properly

-n /Applications/World\ of\ Warcraft/World\ of\ Warcraft.app

buuut! if I do

do shell script “-n /Applications/World\ of\ Warcraft/World\ of\ Warcraft.app”

I get back Expected “”" but found unknown token. and it highlights the space between "/ of"

and I don’t really know what to do.

I am really new to this =P.

Thanks

Hi,

Try this;

do shell script "-n '/Applications/World of Warcraft/World of Warcraft.app'"

In Applescript strings \ is used to ‘escape’ double quotes, so that you can use them. You can escape the escape character, but it gets confusing. Much easier to add quotations around the file path.

If the application path is taken from a variable you can use ‘quoted form of’ to add the quotes correctly.

Best wishes

John M

I guess, without a command this line will do nothing :wink:

Your method to escape the space characters is correct, but in AppleScript you need a second backslash to escape the first one

do shell script "open -n /Applications/World\\ of\\ Warcraft/World\\ of\\ Warcraft.app"

Awesome! they work. Thanks so much.