I am discovering AutoHotKey and it already seems very good to me.
I use this code to launch two windows in IE :
Code: Select all
navOpenInBackgroundTab = 4096
navOpenInNewWindow = 1
#F1::
wb := ComObjCreate("InternetExplorer.Application") ; create a IE instance
IeHwnd := wb.Hwnd
wb.Visible := True
wb.Navigate("http ------- /pages/index.xhtml") Broken Link for safety
While wb.readyState != 4 || wb.document.readyState != "complete" || wb.busy ; wait for the page to load
Sleep, 10
; Msgbox Done!
wb.Navigate("https ------- /#!/", Broken Link for safety navOpenInNewWindow)
while !wb2
wb2 := New_IE("https ------- /#!/") Broken Link for safety
While wb2.readyState != 4 || wb2.document.readyState != "complete" || wb2.busy ; wait for the page to load
Sleep, 10
Send, {TAB}{TAB}{TAB}{TAB}{TAB}{TAB}-------{TAB}-------{TAB}{ENTER}
While wb2.readyState != 4 || wb2.document.readyState != "complete" || wb2.busy ; wait for the page to load
Sleep, 10
Msgbox Done!
return
New_IE(Url) {
For wb in ComObjCreate("Shell.Application").Windows
{
If instr( wb.LocationUrl, URL) && InStr( wb.FullName, "iexplore.exe" )
return wb
else
continue
}
}
Can you get me on the track or explain how to do it? I can't handle the pop-up. Maybe I should use a simpler or more complicated code? All suggestions are welcome.
For information, I use the portable version.