Search the Community
Showing results for tags 'ieattach'.
-
Is there an equivalent function to attach to a specific chrome tab? Similar to the IEAttach in e IE UDF
-
Hey guys I tried to attach to currently running Internet Explorer process, but without success. I even looped it, just like DaleHohm said $hWnd = WinGetHandle("Google - Windows Internet Explorer") Do Local $oIE = _IEAttach($hWnd, "HWND") Sleep(500) Until IsObj($oIE) MsgBox(0, "IE URL", _IEPropertyGet($oIE, "locationurl")) Sadly, it can't attach. I'm getting error: --> IE.au3 V2.4-0 Warning from function _IEAttach, $_IEStatus_NoMatch I was working on IE 9 before and couldn't attach, so I installed IE 10, hoping it will resolve this issue, but nope... Have you got any ideas? Would greatly appreciate any help!
-
I asked this question in another post, but everyone ignored it, so I will ask it here in a new post... sorry for the redundency... I have a web page that is slow to load at times, and I work in frames. I've tried _LoadWait, but it returns before all the frames load, and the objects don't get created because it can't find the paths to the objects within the frames. If I put just sleep commands in it works but takes too long. I'd like it to return to the user after the page loads 100 % completely and my commands don't fail. I've been doing it by checking isobj() $Count = 0 Do $Count+=1 $oIE = _IEAttachHDL($DQMwHndl) Sleep(200) If $Count > 10 Then MsgBox(0,$DQMerror1,$DQMerror2) Return EndIf Until IsObj($oIE) This works, but takes up CPU time checking a lot until the page loads. ($DQMwHndl is the handle to the IECREATE(web address) - _IEAttachHDL is a shorned version only using HWND's) After the attach, I have to check for the frame, and form, using the same logic, or sometimes my script fails, as it cant get past all that stuff. The short version: $oIE = _IEAttachHDL($DQMwHndl) $oIFrame = _IEFrameGetObjByName($oIE, "ifmPage") $oForm = _IEFormGetObjByName($oIFrame, "frmADT") $oSubmit = _IEGetObjByName($oForm, "button2") $oSearchCompID = _IEFormElementGetObjByName($oForm, $CompanyPicker) _IEFormElementSetValue($oSearchCompID,$ClientFacility) _IEAction($oSubmit, "click") the long version is what works, with each line above having a loop to check IsObj(). Basically because _loadwait() really doesn't work well. So each time I click a link, i have to verify all the objects again. Func _ADTDefs() If WinExists($DQMwHndl) Then $oIE = _IEAttachHDL($DQMwHndl) _IELinkClickByIndex ($oIE, $ClickADTDefSearch);link 43 search ADT defs. Sleep(200) $Count = 0 Do $Count+=1 $oIE = _IEAttachHDL($DQMwHndl) Sleep(200) If $Count > 10 Then MsgBox(0,$DQMerror1,$DQMerror2) Return EndIf Until IsObj($oIE) Sleep(200) $Count = 0 Do $Count+=1 $oIFrame = _IEFrameGetObjByName($oIE, "ifmPage") Sleep(200) If $Count > 10 Then MsgBox(0,$DQMerror1,$DQMerror2) Return EndIf Until IsObj($oIFrame) Sleep(200) $Count = 0 Do $Count+=1 $oForm = _IEFormGetObjByName($oIFrame, "frmADT") Sleep(200) If $Count > 10 Then MsgBox(0,$DQMerror1,$DQMerror2) Return EndIf Until IsObj($oForm) Sleep(200) $Count = 0 Do $Count+=1 $oSubmit = _IEGetObjByName($oForm, "button2") Sleep(200) If $Count > 10 Then MsgBox(0,$DQMerror1,$DQMerror2) Return EndIf Until IsObj($oSubmit) Sleep(300) $Count = 0 Do $Count+=1 $oSearchCompID = _IEFormElementGetObjByName($oForm, $CompanyPicker);this is the call that is failing... if @error then $Temp = 0;nothing Sleep(400) If $Count > 10 Then MsgBox(0,$DQMerror1,$DQMerror2) Return EndIf Until IsObj($oSearchCompID) Sleep(400) _IEFormElementSetValue($oSearchCompID,$ClientFacility) Sleep(500) _IEAction($oSubmit, "click") EndIf EndFunc Is there a better way to make sure each object is a valid object other than what I preset here (too lengthy-not a clean script, too much CPU time) or a better way to ensure the page is really loaded instead of relying on LoadWait that will allow the short version to run properly? Thanks in Advance!