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

ProstheticHead

macrumors 6502
Original poster
Jun 15, 2007
268
0
Seattle, WA
Anybody else have an issue with their Mighty Mouse "forgetting" what button 3 and 4 do? It seems almost every time I restart my computer, and sometimes prior to restarting, my mighty mouse panel clears the presets for Button 3 (Dashboard) and Button 4 (Exposé All Windows) from the mouse. It gets sort of annoying to have to reset that each time I restart my comp, and I was wondering if anyone else has experienced this or if it is a unique issue.
 
This used to happen to me all the time. It doesn't anymore (I'm honestly not sure why) but after a while I scripted it. That script is below.

The script is of the type that interacts with the user interface, so you kind of have to start it then watch it go (it won't run in the background, for instance). It only takes a couple seconds and is sure easier than doing it yourself over and over.

The script does what I set it to, which is to use the mouse pane to set button 3 to Exposé and button 4 to Dashboard (reverse of yours), AND to set those preferences in the Dashboard and Exposé tab as well. It should be simple enough to edit if you just want to reverse what buttons 3 and 4 do.

More complicated edits might be harder. I used UI Browser to determine which buttons and menu items I had to target. There was a LOT of trial and error.

Code:
activate application "System Preferences"
tell application "System Preferences"
	reveal anchor "mouseTab" of pane "com.apple.preference.keyboard"
end tell
tell application "System Events"
	tell process "System Preferences"
		click pop up button 1 of tab group 1 of window "Keyboard & Mouse"
		click menu item "Exposé - All Windows" of menu 1 of pop up button 1 of tab group 1 of window "Keyboard & Mouse"
	end tell
end tell

activate application "System Preferences"
tell application "System Preferences"
	reveal anchor "mouseTab" of pane "com.apple.preference.keyboard"
end tell
tell application "System Events"
	tell process "System Preferences"
		click pop up button 4 of tab group 1 of window "Keyboard & Mouse"
		click menu item "Dashboard" of menu 1 of pop up button 4 of tab group 1 of window "Keyboard & Mouse"
	end tell
end tell

activate application "System Preferences"
tell application "System Events"
	tell process "System Preferences"
		click menu item "Dashboard & Exposé" of menu 1 of menu bar item "View" of menu bar 1
	end tell
end tell

activate application "System Preferences"
tell application "System Events"
	tell process "System Preferences"
		click pop up button 6 of group 2 of window "Dashboard & Exposé"
	end tell
end tell
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.