Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Stop processes when you go to the login window' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Stop processes when you go to the login window
Authored by: dfbills on Mar 09, '04 01:05:07AM

How to you escape the space in "Menu Extras" for applescript while preserving the "\ " for the shell?



[ Reply to This | # ]
Stop processes when you go to the login window
Authored by: cougar718 on Mar 09, '04 11:44:43AM

Hello there,

You do not need to escape the space, you need to scape the \ delimiter with another \. So in the previous code posted you would put 2 backslashes instead of 1 like this...

set theResult to do shell script "/System/Library/CoreServices/Menu\\ Extras/User.menu/Contents/Resources/CGSession -suspend"

Good luck

---
Rick alias cougar



[ Reply to This | # ]
Stop processes when you go to the login window
Authored by: michaelaskew on Apr 11, '04 03:41:17AM
That makes perfect sense, but just to show that there's more than one way to do things, here's how I did it: put single-quotes around the command (within the double quotes).

	do shell script "'/System/Library/CoreServices/Menu Extras/User.menu/Contents/Resources/CGSession' -suspend"


[ Reply to This | # ]