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


Click here to return to the 'I get and AppleScript error' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
I get and AppleScript error
Authored by: BrunoUsesBBEdit on Jun 27, '04 12:07:41AM
System Events got an error:
NSReceiverEvaluationScriptError: 4
this happens on the line:
click menu item "Sharing" of menu "View" of menu bar 1

---

--==>==--

[ Reply to This | # ]

I get and AppleScript error
Authored by: descoff on Sep 12, '04 01:23:02PM

You need to click on 'Enable access for assistive devices' in the Pref Pane 'Universal Access' to allow UI Scripting in applescript.



[ Reply to This | # ]
I get and AppleScript error
Authored by: Jewtobog on May 10, '08 11:15:06PM

Try this:

tell application "System Preferences" to set current pane to pane "com.apple.preferences.sharing"
tell application "System Events" to tell process "System Preferences"
click checkbox 1 of row 10 of table 1 of scroll area 1 of group 1 of window "Sharing"
delay 1
if (exists sheet 1 of window "Sharing") then
click button "Start" of sheet 1 of window "Sharing"
end if
end tell
ignoring application responses
tell application "System Preferences" to quit
end ignoring



[ Reply to This | # ]