by WithinReason · 4y ago · 0 comments
~LButton up::
if (GetKeyState("CapsLock", "P")) {
while(!GetKeyState("LButton", "P")){
MouseClick, left
sleep 20
}
}
return
Useful in situations when you need to click a lot :)Also a bookmarklet that you use to turn any page dark with a click:
javascript:document.querySelectorAll('\*').forEach(e=>e.setAttribute('style','background-color:#222;background-image:none;color:#'+(/^A|BU/.test(e.tagName)?'36c;':'eee;')+e.getAttribute('style')))
From here: https://github.com/x08d/222 ~^s::
WinGetActiveTitle, currentWinTitle
If InStr(currentWinTitle, "AutoHotkey.ahk - Notepad")
Reload
Return
Then entries which automate typical Windows keyboard actions, like this one below which triggers on alt+3 and moves around the fields on some specific GUI program which had no other automation support for what I was doing: !3::Send {alt down}a{alt up}{Tab}{Tab}{Tab}{Tab}{Tab}{Tab}Position{Shift down}{Down}{Shift up}{Del}{Tab}{Tab}
Workflow becomes:- have something mildly repetitive to do, notice how to do parts of it with keyboard only.
- right click AutoHotkey icon in taskbar, edit (opens Notepad).
- change some of these automations, alt+1, alt+2, alt+3, ...
- press ctrl+s to save and reload.
- switch back to the program and use the hotkey immediately to begin helping.
- repeat switching to AutoHotkey and the program, tweaking and adding more.
It's amenable to the kind of occasional task which has no easy proper automation, or is a one-off and isn't worth more time to do it through proper interfaces. Things like a vendor support telling you to "go through every affected record and toggle X field off and on again".
<!k::Send {Up}
<!j::Send {Down}
Capslock::Esc