Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

joemolomo

macrumors member
Original poster
May 20, 2008
75
25
Hi, i work at a school and at the moment we don't have a mac server, so i'm using server tools on each local machine to set group policies for active directory logins. I want geektool to be enabled on each user when they login, i've got this to work so far by running this applescript I found online:

tell application "System Preferences"
activate
delay 1
tell application "System Events" to set visible of process "System Preferences" to false
set current pane to pane "GeekTool"
tell application "System Events"
tell process "System Preferences"
click checkbox "Enable" of window "GeekTool 3"
end tell
end tell
delay 1
quit
end tell

Now the only problem with this script is that when they log off and log back in again it deactivates the checkbox resulting in disabling geektool, so every other login disables geektool. I'm guessing I need to put an if statement in somewhere i'm just not that great at applescript, any help would be really appreciated.

Thanks
 
That's great - the next step is to add the script as a startup item so it runs at every login, which will do what you want. Found a link, here, that will help guide you through the setup process.
 
Hi yeah sorry should have explained, i've got the script running using workgroup manager so that anyone associated with the Active Directory group the script is run on login, but as I mentioned it disables it on the 2nd, 4th, 6th etc login and enables it on the 1st 3rd 5th etc login, because the code simple activates the checkbox no matter what state it is in.:confused:
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.