Skip to content

Instantly share code, notes, and snippets.

Last active March 2, 2020 17:00
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
Use right-click and then `f` to change underline style for XChange Viewer
#IfWinActive ahk_exe PDFXCview.exe
; Note, this script is built on one major assumption:
; 1. that there is a labeled routine called CenterMouseOnActiveWindow, from:
; 2. that the Property window shall open at the **center** of the active window. For XChangeViewer, this is exactly the case.
Hotkey, f, f, On
KeyWait, f, D T3
Hotkey, f, f, Off
if(!ErrorLevel) {
; Send, {Esc}
send {up}
send {enter}
; Look for Appearnce piece
Gosub, CenterMouseOnActiveWindow
; To get this "routine", use:
MouseMove, -300, -145, 0, R
sleep 600
MouseClick, left
Gosub, CenterMouseOnActiveWindow
MouseMove, 15, -147, 0, R
sleep 600
MouseClick, left
; Helper piece:
; Source:
Sleep 50
WinGetPos, winTopL_x, winTopL_y, width, height, A
winCenter_x := winTopL_x + width/2
winCenter_y := winTopL_y + height/2
DllCall("SetCursorPos", int, winCenter_x, int, winCenter_y)
Copy link

llinfeng commented Mar 2, 2020

See it in action :)

Note, the AHK script only attempts to open the dropdown list for underline style

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