Sign in to follow this  
Followers 0
Overlord

reading the wrong page

7 posts in this topic

it's probable me who's tired but I can't see what's the problem here...

The page opens, moves to the hospital page but when it reads, it reads from the frontpage instead of the text that's on the hospitalpage...

#include <IE.au3>
#include <String.au3>
$oIE = _IECreate  ("http://apps.facebook.com/inthemafia/")
_IELinkClickByText ($oIE, "Hospital")
WinWaitActive("Facebook | Mafia Wars - Windows Internet Explorer")
Sleep(5000)
$sText = _IEBodyReadText ($oIE)

input plz?

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

#include <IE.au3>
#include <String.au3>
$oIE = _IECreate  ("http://apps.facebook.com/inthemafia/")
_IELinkClickByText ($oIE, "Hospital")
WinWaitActive("Facebook | Mafia Wars - Windows Internet Explorer")
Sleep(5000)
$sText = _IEBodyReadText ($oIE)

Hmm, I don't have a facebook account, so I'm not sure why you're getting the wrong source, but since _IELinkClickByText waits for the page to load (unless you tell it not to), do you really need the WinWaitActive and the Sleep?

Edited by exodius

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

I added those to see if they would solve the problem... I wanted to try either sleep or WinWaitActive...

the problem is that it's not clicking the link I want...

$oIE = _IECreate  ("http://apps.facebook.com/inthemafia/") ;open page
_IELinkClickByText ($oIE, "Fight")
_IELinkClickByText ($oIE, "Attack")

as far as I get it, the script should open the webpage, click on the Fight link and then on teh Attack link.

but there I always get this error: --> IE.au3 V2.4-0 Warning from function _IELinkClickByText, $_IEStatus_NoMatch

any idea? the link is there...

that is why I tried reading the webpage to text to verify that the link is actually there. but even the code on top doesn't give a result...

Edited by Overlord

Share this post


Link to post
Share on other sites

i don't have facebook , but is it possible that those "links" , are not REAL-Links? i mean java based buttons or perhaps images

_IEFormImageClick

_IEImgClick

_IEAction

try those

Share this post


Link to post
Share on other sites

Cabium, nope sorry they are definattely not images nor buttonstyle

they are textlinks just like you would have a emailadres on a website...

Share this post


Link to post
Share on other sites

*BUMP* anyone plz, what am I doing wrong??

Share this post


Link to post
Share on other sites

Please get DebugBar (see my sig) so that you can more readily examine the interpretted source. Watch closely for Frames and iFrames.

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

Share this post


Link to post
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
Sign in to follow this  
Followers 0