Ie issue in IEGET

Get help with using AutoHotkey and its commands and hotkeys
faran
Posts: 17
Joined: 15 Feb 2015, 11:25

Ie issue in IEGET

17 Feb 2015, 09:36

hello,

I am running 4 IE(s) sometimes they work very fine but sometimes they keep giving me these error and apps doesn work after these errors
here is my code for getting ie

Code: Select all

Run, Iexplore.exe -private -nomerge,,,PID
WinWait, ahk_pid %PID%
Sleep,1000 ;If the script doesn't work, you can try increasing this.
global Pwb := IEGet(WinExist("ahk_pid " . PID))
its opening ie fine and doing login to 4 account without any issue but when after login i try to nagivate all Ie its show me error
here are code for nagivating

Code: Select all

getit:

gui,submit,nohide
pwb.navigate(uid)
while pwb.readyState!=4 || pwb.document.readyState!="complete"
                        sleep, 100
Links := pwb.document.getElementsByTagName("a")
    Loop % Links.Length

        if InStr(Links[A_Index - 1].innerText, "get text")
{
	  links[A_Index-1].Click()
      break
}


Image
how to resolve this issue

thanks
faran
Posts: 17
Joined: 15 Feb 2015, 11:25

Re: Ie issue in IEGET

17 Feb 2015, 11:45

used
#Persistent
#SingleInstance force
at top of script but still same issue
User avatar
jigga
Posts: 93
Joined: 24 Jan 2014, 00:31
Facebook: joel.fazio
Google: +JoelFazio

Re: Ie issue in IEGET

17 Feb 2015, 12:08

Does this only happen with pwb4, or is it every ie object?
faran
Posts: 17
Joined: 15 Feb 2015, 11:25

Re: Ie issue in IEGET

17 Feb 2015, 12:12

with all pwb sometimes its show error on first pwb also


here is IEGET function

IEGet(hwnd)
{
for window in ComObjCreate("Shell.Application").Windows{
if (window.HWND == hwnd){
return window
}
}
return ""
}
User avatar
jigga
Posts: 93
Joined: 24 Jan 2014, 00:31
Facebook: joel.fazio
Google: +JoelFazio

Re: Ie issue in IEGET

17 Feb 2015, 12:23

You might want to create each IE instead of just running it:

Code: Select all

pwb[i] := ComObjCreate("InternetExplorer.Application")
Or try this method of getting an open IE:

Code: Select all

WBGet(WinTitle="ahk_class IEFrame", Svr#=1) {              
   static msg := DllCall("RegisterWindowMessage", "str", "WM_HTML_GETOBJECT")
        , IID := "{0002DF05-0000-0000-C000-000000000046}"   ;// IID_IWebBrowserApp
;//     , IID := "{332C4427-26CB-11D0-B483-00C04FD90119}"   ;// IID_IHTMLWindow2
   SendMessage msg, 0, 0, Internet Explorer_Server%Svr#%, %WinTitle%
   if (ErrorLevel != "FAIL") {
      lResult:=ErrorLevel, VarSetCapacity(GUID,16,0)
      if DllCall("ole32\CLSIDFromString", "wstr","{332C4425-26CB-11D0-B483-00C04FD90119}", "ptr",&GUID) >= 0 {
         DllCall("oleacc\ObjectFromLresult", "ptr",lResult, "ptr",&GUID, "ptr",0, "ptr*",pdoc)
         return ComObj(9,ComObjQuery(pdoc,IID,IID),1), ObjRelease(pdoc)
      }
   }
}
faran
Posts: 17
Joined: 15 Feb 2015, 11:25

Re: Ie issue in IEGET

17 Feb 2015, 12:31

i also need to unshare cookies as i m login to same site more thans once (4) times
User avatar
jigga
Posts: 93
Joined: 24 Jan 2014, 00:31
Facebook: joel.fazio
Google: +JoelFazio

Re: Ie issue in IEGET

17 Feb 2015, 13:09

From user tmplinshi:

Code: Select all

ClearCookies() {
    static CmdLine := 0x0002 | 0x0100 ; CLEAR_COOKIES | CLEAR_SHOW_NO_GUI
    static INTERNET_OPTION_END_BROWSER_SESSION := 42
    DllCall("inetcpl.cpl\ClearMyTracksByProcessW", "UInt", 0, "UInt", 0, "Str", CmdLine, "Int", 0)
    DllCall("wininet\InternetSetOption", "Int", 0, "Int", INTERNET_OPTION_END_BROWSER_SESSION, "Int", 0, "Int", 0)
}
User avatar
tank
Posts: 2833
Joined: 28 Sep 2013, 22:15
Facebook: charlie.simmons.7334
Google: ttnnkkrr
GitHub: ttnnkkrr
Location: Irving TX
Contact:

Re: Ie issue in IEGET

17 Feb 2015, 13:49

clearing cookies is not the same as forcing them into separate sandboxes
i suggest using noframemerging instead of nomerge
https://msdn.microsoft.com/en-us/librar ... s.85).aspx
if you are closing alerts or modals before this action i suggest sleeping a full second after
We are troubled on every side‚ yet not distressed; we are perplexed‚
but not in despair; Persecuted‚ but not forsaken; cast down‚ but not destroyed;
https://www.facebook.com/ahkscript.org
If you have forum suggestions please submit a pull request
Check Out WebWriter
Thanks Tank :thumbup:
faran
Posts: 17
Joined: 15 Feb 2015, 11:25

Re: Ie issue in IEGET

18 Feb 2015, 05:10

i didnt understand what u want to clear to me
beside nomerge is not my issue as i am login to same site 4 times without any issue
faran
Posts: 17
Joined: 15 Feb 2015, 11:25

Re: Ie issue in IEGET

19 Feb 2015, 05:34

nope i have all seprate windows for each IE
between i also tried noframemerging but same issue its keep showing nagivation errors :headwall:

Return to “Ask For Help”

Who is online

Users browsing this forum: Gedzas, Google [Bot], hackkk745, haichen, hasantr, mikeyww, Rikk03, Trisolaris and 53 guests