Would it be possible to limit a script from acting except only when the user is typing in the URL address bar of Internet Explorer? I have some things that I want to be done, but only when the user is typing in the address bar.
If possible, how would I go about it?
Possible to limit to when user is typing in URL address bar?
- Coldblackice
- Posts: 24
- Joined: 13 Nov 2013, 14:39
Re: Possible to limit to when user is typing in URL address
Code: Select all
actingexceptonlywhentheuseristypingintheURLaddressbarofInternetExplorer(){
hWnd := WinActive("ahk_class IEFrame") ; return the IE window handle if the active window IS IE
if !hWnd ; the IE is not active
return
ControlGetFocus, Focused, A ; return the focused control in the active window
return, (Focused="Edit1") ; return true if the focused control is the URL address
}
; for example a hotkey A
; Rempad A to B
; but just for The URL Adress bar in the internet explorer
#if actingexceptonlywhentheuseristypingintheURLaddressbarofInternetExplorer() ; see #If in the docs, you'd have better understanding later
A::
Send B
return