I wanted to use AHK to switch monitors for my Graphire wacom tablet.
I know this issue has been covered extensively in past. I remember to have used a couple well done apps, and one of them was an AHK script - But now I couldn't find the tools, working download links, or a new solution that works under windows 7, at least for me. So I decided to start fresh and make a very simple script.
The script below works, but requires the user to open the Wacom Tablet Properties (c:/windows/system32/wacomtablet.cpl), and set it on the Mapping tab, then minimize if needed.
I would really like to know why the following statements don't work in windows7:
Run, C:\Windows\System32\WacomTablet.cpl
(I can run other cpl and exe files in the same folder, just no WacomTablet.cpl and a couple others).
Run %WINDIR%\notepad.exe
This should launch the notepad but it doesn't. Does AHK recognize %WINDIR%?
Also, even if I bring out the Wacom Tablet window, the Mapping control is under a tab. These tabs don't appear as controls under Window Spy so I can not click on them.
Anyway, I'm posting here for sharing and for any information on how to improve this. Any comments are welcome! thanks!
; ; AutoHotkey Version: 1.x ; Language: English ; Platform: Win9x/NT ; Author: A.N.Other <[email protected]> ; ; Script Function: ; Template script (you can customize this template by editing "ShellNew\Template.ahk" in your Windows folder) ; #NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases. SendMode Input ; Recommended for new scripts due to its superior speed and reliability. SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory. ;Simple wacom switching using the keys WIN+SPACE ;The user must open Wacom Tablet Properties and leave it in the MAPPING tab for this to run. ;I'd like to Run c:\System32\WacomTablet.cpl , but that didn't work. ;Then I'd like to go to the Mapping tab, but that doesn't work either ;because the tabs don't appear like controls. #space:: ifWinExist Wacom Tablet Properties { ControlGet, mon, choice,,ComboBox2,Wacom Tablet Properties if (InStr(mon,1)) { Control, Choose,4,ComboBox2,Wacom Tablet Properties } Else { Control, Choose,3,ComboBox2,Wacom Tablet Properties } } return