Just recently I posted about Some SendDLL32 commands here:
http://www.autohotkey.com/forum/viewtopic.php?t=5871
There might be a command on there that you can use to bring up the desktop properties quite directly and then use "Control, Check" and "ControlSend" commands from there. Below is some code I was doing this for to enable auto-hiding tray icons (less complicated version posted elsewhere on the forum if you search for "autohide tray icons" in the help forum):
Code:
;Turn on auto-hide icons but set it off in registry for next reboot to prevent lost icons from auto-log on
Run, RunDLL32.EXE shell32.dll`,Options_RunDLL 1 ; display Taskbar and Start Menu Properties
WinWait, Taskbar and Start Menu Properties
Control_Check("Button7", "Taskbar and Start Menu Properties") ; Tick hide inactive icons
Control_Send("Button11", "Taskbar and Start Menu Properties") ; OK
RegWrite, REG_DWORD, HKEY_CURRENT_USER, Software\Microsoft\Windows\CurrentVersion\Explorer, EnableAutoTray, 0
Return
Control_Send(Control_to_Click, Working_Window) ; defined my own function
{
Loop
{
Sleep, 50
WinGet, Control_Check, ControlList, %Working_Window%
IfInString, Control_Check, %Control_to_Click%
{
ControlGet, Control_Enabled, Enabled,, %Control_to_Click%, %Working_Window%
If Control_Enabled = 1
{
ControlSend, %Control_to_Click%, {SPACE}, %Working_Window%
Sleep, 50
Break
}
}
}
}
Return
Control_Check(Control_to_Click, Working_Window) ; defined my own function
{
Loop
{
Sleep, 50
WinGet, Control_Check, ControlList, %Working_Window%
IfInString, Control_Check, %Control_to_Click%
{
ControlGet, Control_Enabled, Enabled,, %Control_to_Click%, %Working_Window%
If Control_Enabled = 1
{
Control, Check,, %Control_to_Click%, %Working_Window%
Sleep, 50
Break
}
}
}
}
Return