Skip to content

Instantly share code, notes, and snippets.

@jtanx
Last active January 2, 2021 18:12
Show Gist options
  • Save jtanx/09c8f0e6f31ecb61c3d5d3faddbaf559 to your computer and use it in GitHub Desktop.
Save jtanx/09c8f0e6f31ecb61c3d5d3faddbaf559 to your computer and use it in GitHub Desktop.
Acrobat DC Highlighter tool
; Set colour Acrobat DC
; Valid x positions: 20, 35, 55, 75, 90, 111, 128, 146
; Valid y positions: 60, 80, 100, 120, 135
SetColour(x, y)
{
If WinExist("Highlighter Tool Properties ahk_class AVL_AVFloating") or WinExist("Highlight Properties ahk_class AVL_AVFloating")
{
WinActivate
WinWaitActive
if !ErrorLevel
{
CoordMode, Mouse, Screen
MouseGetPos, oldX, oldY
CoordMode, Mouse, Relative
MouseClick, Left, 30, 30 ; Activate the palette
MouseClick, Left, x, y ; Select the colour.
CoordMode, Mouse, Screen
MouseMove, oldX, oldY
CoordMode, Mouse, Relative
}
}
}
; AHK: ^ is Ctrl, ! is Alt, + is shift
; Ctrl+1
^1::
SetColour(20, 100)
return
; Ctrl+2
^2::
SetColour(35, 100)
return
; Ctrl+3
^3::
SetColour(55, 100)
return
; Ctrl+4
^4::
SetColour(75, 100)
return
@wenyaoleoliu
Copy link

Could you guys share more details on how to use it?

@laichunguang1
Copy link

helpful for beginner

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment