Jump to content

IE help


 Share

Recommended Posts

  • Moderators

Take a peak at IE.au3, and if you have tried that already, post what you've tried.

Edit:

Sorry here's the link: http://www.autoitscript.com/forum/index.php?showtopic=13398

Edited by SmOke_N

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

heres the info

http://img217.imageshack.us/img217/1866/13qi.png

all i want to do is click on to that image, which turns out not to be an image :S

any ideas?

please keep in mind that i am a beginner at this :o

Zap, I know that you created code that was getting you pretty close in the PM's we exchanged. Please don't start over -- post the code you have and the last issue you were facing. You got to the point where you needed more help with basic debugging techniques than you did with IE.au3

Dale

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

Link to comment
Share on other sites

Ok heres what i've got for this part

$src = "hero/itemicons/lowmace.jpg"

$oInputs = _IETagNameGetCollection($o_IE, "input")

For $oInput in $oInputs

If $oInput.src = $src Then

$oInput.click

ExitLoop

EndIf

Next

ConsoleWrite($oInput.src & @CR) <--- not sure what this one does tho :S

Link to comment
Share on other sites

Still having trouble click on this thing whatever it is

$src = "hero/itemicons/ironknife.jpg"

$oInputs = _IETagNameGetCollection($oIE, "input")

For $oInput in $oInputs

If $oInput.src = $src Then

ConsoleWrite($oInput.src & @CR)

$oInput.click

ExitLoop

EndIf

Next

http://img217.imageshack.us/img217/1866/13qi.png is what i want to click and the info with it

anyone able to gimme a few pointers?

Link to comment
Share on other sites

Ok heres what i've got for this part

$src = "hero/itemicons/lowmace.jpg"

$oInputs = _IETagNameGetCollection($o_IE, "input")

For $oInput in $oInputs

If $oInput.src = $src Then

$oInput.click

ExitLoop

EndIf

Next

ConsoleWrite($oInput.src & @CR) <--- not sure what this one does tho :S

Put the ConsoleWrite inside the For loop and it will should you the image source for each input element. Also, if you're not using SciTe, a MsgBox will suit you better. Might also want to check the input element "type" so that you only examine the type=image elements:

$src = "hero/itemicons/lowmace.jpg"
$oInputs = _IETagNameGetCollection($o_IE, "input")
For $oInput in $oInputs
    If $oInput.type = "image" Then
        MsgBox(0, "Image Source", $oInput.src)
        If $oInput.src = $src Then
             $oInput.click
             ExitLoop
        EndIf
    EndIf
Next

Dale

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

Link to comment
Share on other sites

i did what you said but i am still getting the same error as before

Sorry, you haven't posted enough to help you. You'll need to post the error messsage and enough code to put it in context.

Dale

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

Link to comment
Share on other sites

http://img460.imageshack.us/img460/6947/18yn.png

is the error i am still getting :S

Sorry, if you want help you'll go back and reread my last reply and try again -- I won't try to drag it out of you.

Dale

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

Link to comment
Share on other sites

Assuming you are using beta,

does the collection "input" exist in the ... :geek:

Wait a moment, i need more code... :o

Go back to the declaration of $o_IE and everything up to the part that you break down.

Link to comment
Share on other sites

#include <IE.au3>

$o_IE = _IECreate ()
_IENavigate ($o_IE, "http://www.herorpg.net/herorpg.php")
_IEClickLinkByText ($o_IE, "Hunt")
$oForm = _IEFormGetObjByName($o_IE, "battle")
_IEFormSubmit($oForm)




;$oForm1 = _IEFormGetObjByName($o_IE, "fight")
;_IEFormSubmit($oForm1)



;$oSubmit = _IEFormElementGetObjByName($oForm1, "attack")
;$oSubmit.click




;$src = "hero/itemicons/ironknife.jpg"
;$oInputs = _IETagNameGetCollection($o_IE, "input")
;For $oInput in $oInputs
;   If $oInput.type = "image" Then
;       MsgBox(0, "Image Source", $oInput.src)
;       If $oInput.src = $src Then
;            $oInput.click
;            ExitLoop
;       EndIf
;   EndIf
;Next

is what i have and everything in ; wont work.

Dale this is my 1st so called bot i have really no idea what i am doing its just this one part thats got me stuck after this i can do everything by myself

Link to comment
Share on other sites

#include <IE.au3>

$o_IE = _IECreate ()
_IENavigate ($o_IE, "http://www.herorpg.net/herorpg.php")
_IEClickLinkByText ($o_IE, "Hunt")
$oForm = _IEFormGetObjByName($o_IE, "battle")
_IEFormSubmit($oForm)
;$oForm1 = _IEFormGetObjByName($o_IE, "fight")
;_IEFormSubmit($oForm1)
;$oSubmit = _IEFormElementGetObjByName($oForm1, "attack")
;$oSubmit.click
;$src = "hero/itemicons/ironknife.jpg"
;$oInputs = _IETagNameGetCollection($o_IE, "input")
;For $oInput in $oInputs
;   If $oInput.type = "image" Then
;       MsgBox(0, "Image Source", $oInput.src)
;       If $oInput.src = $src Then
;            $oInput.click
;            ExitLoop
;       EndIf
;   EndIf
;Next

is what i have and everything in ; wont work.

Dale this is my 1st so called bot i have really no idea what i am doing its just this one part thats got me stuck after this i can do everything by myself

One likely issue is that it is trying to get element information from a page that has not yet loaded.

After your $oSubmit.click add the line

_IELoadWait($o_IE)

This will make the script wait until the page is fully loaded before it moves to the next command. Most of the IE.au3 commands that cause page loads on this have an _IELoadWait built into them, but since you are interacting directly with the .click method you need to manage this yourself.

Dale

Dale

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

Link to comment
Share on other sites

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
 Share

  • Recently Browsing   0 members

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