Jump to content

Recommended Posts

Posted (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 error

i 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 _IEAttach

the 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 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

Posted (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 by anyday
Posted

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)
Posted

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
Posted

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
Posted (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 by anyday

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...