trying to keep ie hidden during entire script

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
Guest

trying to keep ie hidden during entire script

15 Feb 2018, 11:39

I am trying to find a way to keep the ie window that opens always hidden from the user.
I found the tutorial from tank, and it shows the script opening the window.
In my case the window will be opened by the startup.exe already on the computer.


Code: Select all

;Hide the ahk tray icon.
#notrayicon

;The below command needed to ControlSend to hidden windows.
;SetTitleMatchMode, 2
DetectHiddenWindows, On   


;make sure the computer is connected before trying to login.
ConnectedToInternet(flag=0x40) { 
Return DllCall("Wininet.dll\InternetGetConnectedState", "Str", flag,"Int",0) 
}

While ConnectedToInternet()<>1
{
sleep, 1000
}




;open inb link hidden
;this command opens ie window visible to the user
;find a way to make the window stay hidden while logging in.
;Run, Target [, WorkingDir, Max|Min|Hide|UseErrorLevel, OutputVarPID]
Run, D:\navisys\fo\run\startup.exe -ini startup.ini -url http://localhost:30213/en/Login.jsp, D:\navisys\fo\run, Hide





;Make sure ie never displays and wait for login page to load. Replace with winwait.
WinWait, xxx - Log in  ahk_class IEFrame
;WinHide, xxx - Log in  ahk_class IEFrame







;enter the username and password and click login. Replace with controlsend

;WinGet, WinID, ID, ahk_class IEFrame
;ControlSend,ahk_parent, b,ahk_id %WinID% 
;return
SendInput, SYNC{TAB}SYNC{TAB}{ENTER}
WinHide, xxx - Log in  ahk_class IEFrame

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: No registered users and 124 guests