Skip to content

Instantly share code, notes, and snippets.

@iaian
Last active December 14, 2015 16:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save iaian/5118552 to your computer and use it in GitHub Desktop.
Save iaian/5118552 to your computer and use it in GitHub Desktop.
Autohotkey : if IE is active window map ctrl + u to IE alt+v+c
SetTitleMatchMode, Fast
^u:: ; Hit ctrl+u over IE to show page source
WinGetActiveTitle, MyTitle
If (RegexMatch(MyTitle, "i)(.*)Windows Internet Explorer")) ; If windows internet explorer is found at the end of the window title
{
;run macro for showing source code
Send {Alt}
;delay prevents timing issues
SetKeyDelay, 200
Send v
Send c
}
return
@iaian
Copy link
Author

iaian commented Mar 9, 2013

breaks ctrl + u in other applications -- needs work

@bobwhitley3
Copy link

This works for me and doesn't seem to interfere with any other apps:

;------ view source in IE
#IfWinActive ahk_class IEFrame
    ^u::
        ;run macro for showing source code
        Send {Alt}

        ;delay prevents timing issues
        SetKeyDelay, 200

        Send v
        Send c

    return
#IfWinActive

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