Last active
March 2, 2020 17:00
-
-
Save llinfeng/05d0df3f7fca8cadf914e62e2c564cc2 to your computer and use it in GitHub Desktop.
Use right-click and then `f` to change underline style for XChange Viewer
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#IfWinActive ahk_exe PDFXCview.exe | |
; Note, this script is built on one major assumption: | |
; 1. that there is a labeled routine called CenterMouseOnActiveWindow, from: https://www.autohotkey.com/boards/viewtopic.php?t=60433 | |
; 2. that the Property window shall open at the **center** of the active window. For XChangeViewer, this is exactly the case. | |
~RButton:: | |
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 | |
} | |
return | |
#IfWinActive | |
; Helper piece: | |
CenterMouseOnActiveWindow: | |
; Source: https://www.autohotkey.com/boards/viewtopic.php?t=60433 | |
Sleep 50 | |
CoordMode,Mouse,Screen | |
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) | |
return |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
See it in action :)
Note, the AHK script only attempts to open the dropdown list for underline style