Jump to content

_FFLinksGetAll() from FF.au3 - Interesting Behavior Noted...


Recommended Posts

Hi,

Using FF.au3 and Autoit beta 3.3.13.12. I've noticed something, given the code:

#include <FF.au3>
#include <Array.au3>

$url1 = 'http://www.autoitscript.com/site/autoit/'
_FFStart($url1)

Sleep(3000)

$aLinks = _FFLinksGetAll()
_ArrayDisplay($aLinks) ; displays autoit site links

Sleep(3000)

$url1 = 'http://www.autoitscript.com/site/uncategorized/gimagex-v2-1-1-released/'
_FFOpenURL($url1)

Sleep(3000)

$aLinks = _FFLinksGetAll()
_ArrayDisplay($aLinks) ; displays gimagex site links as I assumed it would

and _ArrayDisplay shows the links for the current page in Firefox - different page then different links shown as I expected.

But if I use _FFLinkClick (instead of _FFOpenURL) to get to the different page the links shown by FFLinksGetAll and _ArrayDisplay are for the previous page in Firefox not the current page. Try:

#include <FF.au3>
#include <Array.au3>

$url1 = 'http://www.autoitscript.com/site/autoit/'
_FFStart($url1)
_FFLoadWait()
Sleep(10000)

$aLinks = _FFLinksGetAll()
_ArrayDisplay($aLinks) ; displays autoit site links, note Row 24 link for example

Sleep(3000)

_FFLinkClick("GImageX v2.1.1 Released", "text")

Sleep(3000)

$aLinks = _FFLinksGetAll()
_ArrayDisplay($aLinks) ; still displays same autoit site links

Why the difference? Shouldn't the links displayed reflect the current page in the browser no matter how you get there?

Thanks.

 

Link to comment
Share on other sites

Yes I put a copy of FF.au3 in the beta includes folder so it would work of course. Not sure what you're getting at... :)

If there's a source for the latest FF.au3 file and I could update then of course I'd try that before anything else.

Link to comment
Share on other sites

Actually, it's recommended that you don't store UDFs in the includes subdirectory. See here for more info.

I was trying to duplicate your issue earlier and I couldn't even get the FF functions to work. Turns out that I had previously put an old copy of FF.au3 in the includes subdirectory, which is why I used >_< above. <g>

What version of FF.au3 are you running? How many links are being returned for each page?

Link to comment
Share on other sites

  • 3 weeks later...

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

×
×
  • Create New...