Please edit my script to power button key

Get help with using AutoHotkey and its commands and hotkeys
outdider
Posts: 1
Joined: 23 Jun 2019, 07:19

Please edit my script to power button key

24 Jun 2019, 03:05

I have a properly working script that disabled/enabled the monitor and touch on the tablet. Windows10PRO
1. Can I set this script under the power button?
2. Can I turn off the VolumeUP VolumeDown and WindowsKey keys (on the screen)? Because when I turn off the monitor and touchscreen, I can turn on the monitor with the power button or volume down, windowskey (on screen)?


#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.
; #NoTrayicon
Menu, Tray, Icon, tray.ico,1
Menu, Tray, NoStandard
Menu, Tray, Add, Toggle Touch, Toggle
Menu, Tray, Add,
Menu, Tray, Standard
Menu, Tray, Default, Toggle Touch

Disabled:=0

Toggle: ; double click tray icon to disable/enable

Volume_up:: ; Hotkey to disable/enable
if (Disabled=0) {
Run C:\Windows\System32\DevManView.exe /disable "HID-compliant touch screen" ; path to

DevManView and disable device with this name/ID
Disabled:=1
Sleep 1000
SendMessage,0x112,0xF170,2,,Program Manager
Menu, Tray, Icon , trayd.ico,,1
ToolTip, Touchscreen disabled ; little tooltip displayed to visualize the current action
SetTimer, RemoveToolTip, 3000
return
}
else
{
Run C:\Windows\System32\DevManView.exe /enable "HID-compliant touch screen" ; path to

DevManView and enable device with this name/ID
Disabled:=0
Menu, Tray, Icon , tray.ico,,1
ToolTip, Touchscreen enabled ; little tooltip displayed to visualize the current action
SetTimer, RemoveToolTip, 3000
return
}

RemoveToolTip:
SetTimer, RemoveToolTip, Off
ToolTip
return

Return to “Ask For Help”

Who is online

Users browsing this forum: aircooled, flyingDman, Odlanir, rediffusion, RinkaDink, sttrebo, swagfag, Xtra and 184 guests