Could some one help me with code I working on.
I want to maximize IE, open new tab, enter link www.google.com click Enter.
Problem. Then I am on any other window, desktop, sticky note, text file, word and so on I want click hotkey which minimizes that A window and maximaze only IE which is already exist, but is minimazed or not active. But script for some reasons jumps to the another window which was active and does not activate and maximize immediately IE. Script is just messing around with other active windows and does not target IE browser as I need.
I tried to use Run, www.google.com but loading is very slow, no point to use it because manually would be the same. And its open IE as another object.
So I looking for fast and relyable way at any time click hotkey and maximize IE and open website I need.
Code: Select all
SetTitleMatchMode, 2
SetKeyDelay, -1
WinMinimize, A
Sleep, 200
WinMaximize, ahk_class IEFrame
Sleep, 200
emptyVar := " "
ControlSend, Edit1,%emptyVar %, ahk_class IEFrame ; target browsers navigation input field
Sleep, 200
Send, ^t ; open new tab in IE
Send, ^a ; select all text
Send, {Backspace} ; clear text
Sleep, 200
linkVar := "www.google.com"
Clipboard := linkVar
Sleep, 200
Send, ^v
Sleep, 300
Send, !{enter} ; ALT + Enter
Return