I am trying to remap some button on a bluetooth remote for use with a few art programs. I have a working script which works with Photoshop etc but I want to vary the key for Artrage and I believe I have succeeded in this. However, I also want to be able to hold and release the key (rather than have it press and immediately release.
Here is my code:
Code: Select all
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
#Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
#InstallKeybdHook
SetTimer, WatchWin, 2000 ;Checks the window every 2 seconds
WatchWin:
WinGetActiveTitle, ActiveTitle
If ActiveTitle Contains Photoshop, CameraRaw_WindowClass, CLIP STUDIO PAINT, ArtRage
{
Volume_Up::]
Volume_Down::[
Media_Prev::^z
Media_Next::^+z
Media_Play_Pause::
If ActiveTitle Contains ArtRage
Send, +c
Else
Send, i
Return
;Browser_Home::Space
;Volume_Mute::Space
}
Return
Code: Select all
Media_Play_Pause::i
Is there a way to accomplish this?