Last active
September 21, 2015 16:20
-
-
Save josheinstein/1deedcb008396e533172 to your computer and use it in GitHub Desktop.
Disable Surface Touch Screen with Pen Button - At startup, ensures that the touch screen is enabled. When the Surface pen button is double clicked (sends F19 key) the script toggles the touch screen on and off. On exit, touch screen is re-enabled. In order to avoid UAC prompts on devmanview, this should be started with elevated permissions.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#NoEnv | |
#SingleInstance, Ignore | |
SendMode Input | |
SetWorkingDir C:\Users\jeinstein\Dropbox\Tools\DevManView\x64 | |
OnExit, Cleanup | |
IsTouchEnabled = 1 | |
Run, DevManView.exe /enable "HID-compliant touch screen" | |
#F19:: | |
if (IsTouchEnabled = 1) { | |
Run, DevManView.exe /disable "HID-compliant touch screen" | |
IsTouchEnabled = 0 | |
TrayTip, Touch Disabled, Double-click the top pen button to re-enable., 5, 17 | |
} | |
else { | |
Run, DevManView.exe /enable "HID-compliant touch screen" | |
IsTouchEnabled = 1 | |
TrayTip, Touch Enabled, Double-click the top pen button to disable., 5, 17 | |
} | |
Return | |
Cleanup: | |
Run, DevManView.exe /enable "HID-compliant touch screen" | |
IsTouchEnabled = 1 | |
Return |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Devmanview.exe can be downloaded here: http://www.nirsoft.net/utils/device_manager_view.html