simple applescript question

bladerx26

Registered
I am new to Applescript and I need to create a script to push to clients. All I need the script to do is check the Remote Management box under Sharing of System Preferences. How can I do this and, if possible, silently?
 
Here's a script for pushing a button in System Preferences. It may be useful as a starting point. Good luck! It took me a lot of trial and error to get this little snippet working.
Code:
-- Stop and restart TiVo Desktop (starts it if it's not already running)
tell application "System Preferences"
    set current pane to pane "TiVo Desktop"
    tell application "System Events" to tell process "System Preferences"
        if exists button "Stop" of window "TiVo Desktop" then
            click button "Stop" of window "TiVo Desktop"
        end if
        delay 2
        if exists button "Start" of window "TiVo Desktop" then
            click button "Start" of window "TiVo Desktop"
        end if
    end tell
    quit
end tell
It runs silently. At least on Leopard, all you see is the white-blue dot in the Dock under the System Preferences icon.
 
Back
Top