rebind hotkeys as you see fit.
adjust the delays accordingly
Code: Select all
; AHK_L 1.1.28.02+
#NoEnv
#WinActivateForce
#SingleInstance Force
#MaxThreadsPerHotkey 2
#Warn ClassOverwrite
SendMode Input
SetBatchLines -1
SetTitleMatchMode 2
SetWorkingDir %A_ScriptDir%
x::goToDefinition()
z::ExitApp
goToDefinition()
{
clipSaved := Clipboard
Send ^c
Sleep 100
if (WinExist("AutoHotkey ahk_exe hh.exe"))
activateHelpPasteFast(100)
else
runHelpPasteSlow(100, 500)
Clipboard := clipSaved
}
activateHelpPasteFast(delay)
{
WinActivate
Sleep delay
Send !s
Sleep delay
Send ^a
Sleep delay
Send ^v
Sleep delay
Send {Enter}
}
runHelpPasteSlow(delay, delayBeforePaste)
{
Run, % Format("*RunAs hh.exe {}\..\AutoHotkey.chm", A_AhkPath) ; delete *RunAs , if u have UAC running
Sleep delay
Send !s
Sleep delay
Send ^a
Sleep delayBeforePaste
Send ^v
Sleep delay
Send {Enter}
}