Code: Select all
If !IsObject(SymLog)
SymLog := IEGet("Website") ; SymLog := IEGet("Website - Login") <- With or without SetTitleMatchMode only this works.
SymLog.document.getelementbyid("submitLogin").Click()
Return
IEGet(Name="") ;Retrieve pointer to existing IE window/tab
{
SetTitleMatchMode, 1
IfEqual, Name,, WinGetTitle, Name, ahk_class IEFrame
Name := ( Name="New Tab - Windows Internet Explorer" ) ? "about:Tabs"
: RegExReplace( Name, " - (Windows|Microsoft) Internet Explorer" )
For wb in ComObjCreate( "Shell.Application" ).Windows
If ( wb.LocationName = Name ) && InStr( wb.FullName, "iexplore.exe" )
Return wb
} ;written by Jethrow