Managing a pop-up window

Get help with using AutoHotkey and its commands and hotkeys
QuestVBA
Posts: 11
Joined: 21 Nov 2019, 05:05

Managing a pop-up window

21 Nov 2019, 05:20

Hello to all members of this forum.
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
	}
}
But I have a problem to encode my Username and Password in it.


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.

Return to “Ask For Help”

Who is online

Users browsing this forum: Bing [Bot], DaveT1, Frosti, joshuajclark, loek6000, SmallGamer, sofista, sttrebo and 41 guests