Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
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
Owner

iaian commented Mar 9, 2013

breaks ctrl + u in other applications -- needs work

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