Skip to content

Instantly share code, notes, and snippets.

@DavidGP
Last active August 19, 2020 16:33
Show Gist options
  • Save DavidGP/364a9b34921a8af6e1cc to your computer and use it in GitHub Desktop.
Save DavidGP/364a9b34921a8af6e1cc to your computer and use it in GitHub Desktop.
; PDF-XChange Editor change Highlight Color script
; https://gist.github.com/DavidGP/364a9b34921a8af6e1cc
; v.0.1 - Oct. 2014
;###########################
; Header
;###########################
SetTitleMatchMode, 2 ; A window's title can contain WinTitle anywhere inside it to be a match
CoordMode, Mouse, Window ; Sets coordinate mode for to be relative to the active window
;###########################
; Change Textmarker Color in PDF-XChange Editor
;###########################
#IfWinActive, PDF-XChange Editor
b:: ; make selected highlight blue -- replace "b" with your favorite hotkey
If (A_Cursor != "IBeam") ; only act when not editing text, e.g. not in a sticky note
{
BlockInput, On ; keep the user from moving the mouse pointer during script execution
Click, 1031 41 ; insert here your coordinates of the little black triangle besides the "Fill Color" toolbar button, PDF-XChange Editor toolbar "properties" must be set to visible, use the Autohotkey Window Spy tool to find the coordinates
Click, 1017 298 ; insert coordinates of the desired blue color that is shown when clicking on the "Fill Color" toolbar button
BlockInput, Off
}
Else
Send, b ; send the actual letter if editing text, e.g. in a sticky note
Return
#IfWinActive
;###########################
#IfWinActive, PDF-XChange Editor
g:: ; make selected highlight green -- replace "g" with your favorite hotkey
If (A_Cursor != "IBeam") ; only act when not editing text, e.g. in not a sticky note
{
BlockInput, On ; keep the user from moving the mouse pointer during script execution
Click, 1031 41 ; insert here your coordinates of the little black triangle besides the "Fill Color" toolbar button, PDF-XChange Editor toolbar "properties" must be set to visible, use the Autohotkey Window Spy tool to find the coordinates
Click, 1047 298 ; insert coordinates of the desired green color that is shown when clicking on the "Fill Color" toolbar button
BlockInput, Off
}
Else
Send, g ; send the actual letter if editing text, e.g. in a sticky note
Return
#IfWinActive
;###########################
; repeat the above for more colors
@DavidGP
Copy link
Author

DavidGP commented Aug 19, 2020

Glad that you like it.

PDF-XChange Editor is definitely the world's most powerful and fastest PDF Editor and Reader.

@igorlima1701
Copy link

Glad that you like it.

PDF-XChange Editor is definitely the world's most powerful and fastest PDF Editor and Reader.

For years I've been using adobe acrobat. I just started using PDF-XChange Editor yesterday, but already noticed that is something in another level. At least for the things im looking for in a pdf reader

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