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


Click here to return to the '10.6: Automate Internet Sharing revisited' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
10.6: Automate Internet Sharing revisited
Authored by: Mac Berry on Jan 24, '11 04:21:28AM

Hmm, wasn't working here. When I ran it by double clicking on the app saved on my desktop, I got "Can't get window "Sharing" of <<class prcs>> "System Preferences" of application "System Events"".

System Preferences opened, and switched to the Sharing window, but the check box wasn't checked/unchecked.

Turns out the window title is actually "Sharing (32-Bit)" on my system. Changing the window title to match in the script solved it for me.

I also added a line to quit System Preferences afterwards, so it truly is a one click (well, one double click!) toggle now.

I can't remember why my system preferences is running in 32 bit mode - I think as a result of some earlier hint here!!!

Mark



[ Reply to This | # ]