Skip to content

Instantly share code, notes, and snippets.

@kbauer
Last active December 15, 2015 16:22
  • Star 1 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
Save kbauer/a1b02ad292f28e36786f to your computer and use it in GitHub Desktop.
An AutoHotKey script for navigating comic-rocket. For use with other Browsers than Chrome, change the RegEx in the #IfWinActive line accordingly.
SetTitleMatchMode RegEx
#IfWinActive .*Comic Rocket webcomic list - Google Chrome
ComicRocketChangePage(bynum)
{
oldclip := clipboard
Send ^l
Sleep 50
Send ^c
Sleep 50
matchdata := "Nothing found"
pos := RegExMatch(clipboard, "^(.*/)(\d+)(\?mark)?$", matchdata)
;; Also works when no ?mark at end, then %matchdata3% is empty string.
clipboard := matchdata1 . (matchdata2 + bynum) . matchdata3
Send ^v{Enter}
clipboard := oldclip
}
Left::ComicRocketChangePage(-1)
Right::ComicRocketChangePage(+1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment