It doesn't seem to always occur after playing wow, just sometimes.
Regardless, got the apple script working - so you really don't need to worry about it.
This saves quite a few mouse clicks if it does occur:
To change what the button prefs are set to, change the "menu item" number.
-- run WoW
tell application "World of Warcraft"
activate
end tell
-- wait for Wow to finish
tell application "System Events"
repeat while (exists process "World of Warcraft")
end repeat
end tell
--Set scroll button to "Dashboard" from "Button 3"
-- and side buttons to "Expose - Desktop" from "Button 4"
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 3 of tab group 1 of window "Keyboard & Mouse"
click pop up button 1 of tab group 1 of window "Keyboard & Mouse"
click menu item 8 of menu 1 of pop up button 1 of tab group 1 of window "Keyboard & Mouse"
click radio button 3 of tab group 1 of window "Keyboard & Mouse"
click pop up button 4 of tab group 1 of window "Keyboard & Mouse"
click menu item 3 of menu 1 of pop up button 4 of tab group 1 of window "Keyboard & Mouse"
end tell
end tell
tell application "System Preferences" to quit