DaleHohm Posted April 27, 2006 Posted April 27, 2006 (edited) ok i got a new question.i browse to a website and do some formelement stuff. i do a $obutton.click and it bring up a popup.how do i set that popup to $oIE or another words when i try to do a _IEFormGetObjByIndex( ) what do i put as the object since it is a popup, i tried $oIE but i get an errori did an _IEAttach on the popup window title does this set it to my $oIE?Give me a couple more days to release the new IE.au3 baselevel and you'll have what you need. Thanks to Larry (and Valik) there is new functionality in _IEAttachthe code will look like this:$hwnd = ControlGetHandle("Untitled", "", "Internet Explorer_Server1") $oIE = _IEAttach($hwnd, "controlHWND")nah... that's kind of ugly isn't it... the code will look more like this:$oIE = _IEAttach("A window title", "embedded")Dale Edited April 27, 2006 by DaleHohm Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model Automate input type=file (Related) Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded Better Better? IE.au3 issues with Vista - Workarounds SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead? Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble
anyday Posted April 27, 2006 Author Posted April 27, 2006 thanks dale i look forward to seeing it. these pop ups been causing me probs
anyday Posted April 27, 2006 Author Posted April 27, 2006 (edited) anyone know how i can make a while loop only run a certian number of times? This code works but it will just keep running if it never finds what its looking for, i need it to stop trying after about 10 times of clicking the next 20 link While 1 $text = _IEBodyReadHTML($Aobj1) $match = StringInStr($text, (GUICtrlRead($box))) If $match = 0 Then SetError(0) _IEClickLinkByText($Aobj1, "Next 20") Else Return(1) Return 0 EndIf Wend Edited April 27, 2006 by anyday
Simucal Posted April 27, 2006 Posted April 27, 2006 Use a For loop: For $i = 1 to 10 ; code goes here Next AutoIt Scripts:Aimbot: Proof of Concept - PixelSearching Aimbot with several search/autoshoot/lock-on techniques.Sliding Toolbar - Add a nice Sliding Toolbar to your next script. Click the link to see an animation of it in action!FontInfo UDF - Get list of system fonts, or search to see if a particular font is installed.Get Extended Property UDF - Retrieve a files extended properties (e.g., video/image dimensions, file version, bitrate of song/video, etc)
anyday Posted April 27, 2006 Author Posted April 27, 2006 but i also need it to stop when it finds the result so if the result is on the 3rd page if i use the example you gave is it just going to keep going after it see's the result?
Moderators big_daddy Posted April 27, 2006 Moderators Posted April 27, 2006 but i also need it to stop when it finds the result so if the result is on the 3rd page if i use the example you gave is it just going to keep going after it see's the result?Use ExitLoop
anyday Posted April 27, 2006 Author Posted April 27, 2006 (edited) EDIT: well i got it working, for some reason i cant get it to work right using _IEBodyReadHTML but if i use _IEBodyReadText it works fine. big daddy, this is the code i tried with no luck, it will run 10 times but it wont stop if it finds the $match you see anything wrong with my code? For $i = 1 to 10 $text = _IEBodyReadHTML($Aobj1) $addr2 = StringSplit(GUICtrlRead($addr), " ") ;MsgBox(4096, "", $addr2[1]) $match = StringInStr($text, (GUICtrlRead($box)) &" "& ($addr2[1])) ;MsgBox(4096, "", (GUICtrlRead($box)) & " " & ($addr2[0])) ;MsgBox(4096, " ", $addr2[1]) If $match = 0 Then SetError(0) _IEClickLinkByText($Aobj1, "Next 20") Else ExitLoop EndIf Next Edited April 27, 2006 by anyday
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now