JesuZ 0 Posted May 4, 2010 I'm building little form-filler script, that should place information in form fields... I've got it working, IF, I've attached script to IE in right time... Is there way to check out, that script is correctly attached into browser, before starting to run form fill functions...? I was thinking about some kind of of function: Func checkBrowsetStatus() if _IE_Attached_Properly Then Return True Else $var = Try to attach script correctly if $var Then Return True Else Return False EndIf EndIf EndFunc And then I could check out easily before trying to fill form, If checkBrowserStatus() Then ; Go ahead, let's fill the form! Else MsgBox(0,"Information", "Sorry, but couldn't attach script to IE properly. Please try again." ) EndIf Share this post Link to post Share on other sites
Juvigy 49 Posted May 4, 2010 $oIE = _IEAttach("Microsoft.com", "url") If IsObj($oIE) = 0 Then ;ieattach has failed Share this post Link to post Share on other sites
PsaltyDS 39 Posted May 4, 2010 If there are multiple instances available, and you might be connected to the wrong one, test for a known property like the document title or a form with a unique name: If _IEPropertyGet($oIE, "title") == "The Right Page" Then ; Note this is the document title in HTML, not the window title EndIf $oForm = _IEFormGetObjByName($oIE, "SomeUniqueFormName") If @error = 0 Then ; Got the right page, because it contains the right form EndIf Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Share this post Link to post Share on other sites