Hi all, I am a college student and I am
taking a compositing class. I wrote a script for
my class that sets settings that my classmates and I have to set on a daily basis so the script
would be really helpful. The problem is IT has disabled "Enable access
for assistive devices" so my script which should work perfectly doesn't
anymore. Is there a way to change the mighty mouse settings without
using System Events to change the System Preferences?
Thanks!!
(*VSFX270 Startup Script v1
By Robert Gilkes
This script changes Mighty Mouse right mouse button
from default one button to two button mouse, sets the
desktop background to a neutral gray color (sampled from
Shake interface, and copies nreal folder from user's
network Home space to local.*)
--Set right mouse button to "Secondary Button" from default "Primary Button"
tell application "System Preferences" to activate
tell application "System Events"
tell process "System Preferences"
click button 12 of scroll area 1 of window "System Preferences"
click radio button 2 of tab group 1 of window "Keyboard & Mouse"
click pop up button 3 of tab group 1 of window "Keyboard & Mouse"
click menu item 2 of menu 1 of pop up button 3 of tab group 1 of window "Keyboard & Mouse"
end tell
end tell
tell application "System Preferences" to quit
--Download "Shake" gray JPG and apply as desktop background
set bgColor to "Macintosh HD:Work Folder:gray.jpg"
tell application "URL Access Scripting"
download "http://studentpages.scad.edu/~rgilke20/gray.jpg" to bgColor replacing yes
end tell
tell application "Finder"
set desktop picture to bgColor
delete bgColor
--Checks for nreal folder on network and copies to local
set networkNreal to "Macintosh HD:Users:mac_user:Desktop:ATL-HOME:nreal"
set localNreal to "Macintosh HD:Users:mac_user"
if exists networkNreal then
duplicate networkNreal to localNreal replacing yes
end if
end tell
Model: Mac Pro 3Ghz Quad Core Xeon 4GB DDR2
AppleScript: 1.10.7
Browser: Firefox 2.0.0.9
Operating System: Mac OS X (10.4)