Jump to content

Help with _IE functions


Rorax
 Share

Recommended Posts

Greetings,

I'm trying to do a script and I need to click "Next" once it reaches the end of the page. And with debugbar I get this information from the next "button"

I'm not sure how to click it. Or how to know when the script will have reached the end of the pages since the "Next" will have the same information according to debugbar but its still only text and not a clickable link.

Next looks like this:

<A class=clickBoxSNoBorder onclick="">Next</A> (removed the text in "onclick")

Tried to click it like this:

$next = IEGetObjByName ($oIE, "clickBoxSNoBorder")

_IEAction($next, "click") but obviously didnt work :)

Anyone that can help me out with this please?

Regards,

Rorax

Edited by Rorax
Link to comment
Share on other sites

Class and Name are different things.

Why not _IELinkClickByText($oIE, "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

Oh I missed that one, sadly it didnt work. I get "IE.au3 V2.3-1 Warning from function _IELinkClickByText, $_IEStatus_NoMatch"

Not really sure what to do about it..but I appreciate your help.

Basically I've made this so far (with the _IELinkClickByText($oIE, "Next"))

#include <IE.au3>
$oIE = _IECreate("Insert URL here")
$nr = 0

$1 = -1
While $1 = -1
$1 =_IEImgClick ($oIE, "http://74.86.142.203/~tearswep/humanpets/images/thumbsup.jpg", "src", $nr)
$nr = $nr + 1
WEnd
_IELinkClickByText($oIE, "Next")

Probably not the best code in the world but it works except the click "Next". After the click "Next" work I'll just put in another while statement to start clicking the images again and repeat until there are no more pages.

I took a screenshot of the page with the debugbar window open if that might explain it a bit more.

Image

Edited by Rorax
Link to comment
Share on other sites

The reason you get a NoMatch error is because, well, there is no match for what you asked for on that page. One likely cause is Frames or iFrames - they are document containers and you must attach to them with _IEFrame* functions in order to get access to the documents and content they contain.

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 cant get it to work so I'm trying a different approach. Is there a function/command that is like _IELoadWait but it waits for the page to refresh? As I understand the _IELoadWait will check if the currently attached page is loaded or not, and not wait for it to load. I'm thinking of making it semi-automated, so while I browse around it will click all the images and when its done wait for me to go to another page then click every instance of the image then wait again.

Sorry for asking all stupid questions :)

Link to comment
Share on other sites

Where did you get this impression?

_IELoadWait will check if the currently attached page is loaded or not, and not wait for it to load.

Helpfile:

_IELoadWait

--------------------------------------------------------------------------------

Wait for a browser page load to complete before returning.

You don it offer enough information or sample code to help 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

Hmm must be that I'm using it completely wrong. This is the code I have so far that kind of works except the _loadwait part.

I appreciate the time you are spending helping me out, its very kind of you :)

#include <IE.au3>
$oIE = _IEAttach ("Facebook")

While 1
  $1 = -1
  $nr = 0
 While $1 = -1
   $1 =_IEImgClick ($oIE, "http://74.86.142.203/~tearswep/humanpets/images/thumbsup.jpg", "src", $nr)
   $nr = $nr + 1
 WEnd
_IELoadWait($oIE)
WEnd

edit: I should probably add, I'll be away for most of the weekend so if I dont reply, then its because I'm not able to :)

Edited by Rorax
Link to comment
Share on other sites

This is still not nearly enough to help you.

If this doesn't work, you must provide error messages, a description of what you want to happen and what is happening instead.

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