Jump to content

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Find out more here. X
X


Photo

FF.au3 (V0.6.0.1b-10)


  • Please log in to reply
647 replies to this topic

#401 LOULOU

LOULOU

    loulou

  • Active Members
  • PipPipPipPipPipPip
  • 484 posts

Posted 02 July 2012 - 06:22 AM

Hi,
Try with FFxpath with that you can do what you want







#402 felcadz

felcadz

    Seeker

  • Active Members
  • 8 posts

Posted 14 July 2012 - 12:59 AM

guys i need help,

can you make a sample script for "_FFImageClick" using FF.au3. i don't know how to use it. i need to click an image link on a website using firefox.


hope you can help me guys..
thanks

#403 ELeong

ELeong

    Seeker

  • Normal Members
  • 2 posts

Posted 22 July 2012 - 03:37 AM

Hi,
I'm new to FF.au3.
I downloaded it and copied to to C:Program FilesAutoIt3Include so that my scripts can find the user defined functions.
Then I copied some examples and executed something like this (and it worked fine):


#include <FF.au3>
$url = "http://www.autoit.de"
If _FFStart($url) Then
_FFFrameEnter(1) ;0-n index
MsgBox(0, "Frame 2 URL", _FFCmd(".location.href"))
_FFFrameLeave()
MsgBox(0, "Top URL", _FFCmd(".location.href"))
EndIf

But when I append this:

If _FFIsConnected() Then
MsgBox(0, "success", "connected")
Else
MsgBox(0, "fail", "failed")
EndIf

I'm getting back failed for _FFIsConnected.

I'm running on Win7 VM, FF14.0. What can I check to see why it's failing to confirm that FF is connected?

#404 ELeong

ELeong

    Seeker

  • Normal Members
  • 2 posts

Posted 22 July 2012 - 04:31 AM

I added MozRepl to my Firefox as it is required to by FF.au3, but I think the connection still will not work.

Read some past posts by LouLou that since FF8 there have been problems connecting to it.

What is the latest stable version of Firefox that FF.au3 can work with? I do not have the option to revert, so I probably have to consider another solution for what I'm doing.

#405 somdcomputerguy

somdcomputerguy

  • Active Members
  • PipPipPipPipPipPip
  • 2,864 posts

Posted 22 July 2012 - 05:09 AM

What is the latest stable version of Firefox that FF.au3 can work with?

I use 14.0.1, successfully. Part of the code you posted works for me (returns "connected"), if I _FFconnect() before I run _FFIsConnected(). Like this:
_FFConnect() If _FFIsConnected() Then     MsgBox(0, "success", "connected") Else     MsgBox(0, "fail", "failed") EndIf

- Bruce /*somdcomputerguy */  If you change the way you look at things, the things you look at change.


#406 selevo

selevo

    Seeker

  • Normal Members
  • 5 posts

Posted 30 July 2012 - 05:25 AM

hi, what can i do clliking on this element ?ScreenShot664.jpg

Attached Thumbnails

  • ScreenShot665-2.jpg

Edited by selevo, 30 July 2012 - 05:25 AM.


#407 Kantanshi

Kantanshi

    Seeker

  • Normal Members
  • 7 posts

Posted 30 July 2012 - 10:00 PM

<Post edited as this section referred to a flame "skirmish" which has now been deleted from the thread>

I have a question. Please excuse my newbie-ness with this. I've only been trying to figure out scripting in the last few weeks. While I can see that the help and examples currently available most likely explain a lot to experienced scripters, there are many things that elude me. I'm trying my best to learn on my own but there are things I just have to ask help with.

I frequently visit picture sites such as 4chan. I'd like to be able to set up a script that can find the links on a page and click them for me as I sometimes miss seeing a few. In the documentation for FF.au3 there's an instruction for clicking links. I believe it is "_FFLinkClick" but as it seems the documentation page is down right now I can not check to make sure. How would I scan the page for links then have the script click them without following links that have already been loaded? I didn't see a setting to ignore followed links in the documentation.

Edited by Melba23, 01 August 2012 - 07:24 AM.
Post edited to remove section


#408 yogi

yogi

    Seeker

  • Normal Members
  • 1 posts

Posted 02 August 2012 - 10:16 AM

I am trying to read the message in the status bar to see when a page is loaded.
I cannot use the _FFLoadWait() function, because here the initial loading is over, and other parts of the page load, when it is scrolled horizontally or vertically.
I can see that the status bar in firefox shows the "done" message correctly after each partial loading is over. (yes I enabled the status bar again in the new firefox via an addon even though it was removed)
I am not sure what function to use to get this message. Can someone please help?
Thanks!

#409 Kantanshi

Kantanshi

    Seeker

  • Normal Members
  • 7 posts

Posted 05 August 2012 - 03:54 PM

How could I scan an element on a page for for certain text? I tried using the FF frame commands but haven't been able to get it to detect the text I'm looking for. The element I'm trying to scan is "div.padding_content.center" for the text "Success".

Like I stated in my previous post, I'm completely new to this and am trying to figure things out but I don't really even know where to start.

#410 Kantanshi

Kantanshi

    Seeker

  • Normal Members
  • 7 posts

Posted 05 August 2012 - 08:01 PM

The more I try to figure this out the more I'm getting lost.... Could someone post some useful links for some information that would help me figure some of this out? Such as where on earth are people getting values for things like this?

#Include <FF.au3> _FFConnect() If _FFIsConnected() Then ; href of the current page $sHref = _FFCmd(".location.href") If Not @error Then MsgBox(64,"Current href:",$sHref) _FFOpenURL("<a href='http://ff-au3-example.thorsten-willert.de/' class='bbc_url' title='External link' rel='nofollow external'>http://ff-au3-example.thorsten-willert.de/"</a>) ; href from an image link $sHref = _FFCmd(".images[0].parentNode.href") If Not @error Then MsgBox(64,"Href of the first image-link:",$sHref) ; title of the current page $sTitle = _FFCmd( ".title") If Not @error Then MsgBox(64,"Title of the current page:",$sTitle) ; browser version $sVersion = _FFCmd("navigator.userAgent") If Not @error Then MsgBox(64,"Browser version:",$sVersion) Else MsgBox(64,"Error:","Can't conncect to FireFox") EndIf


"images[0].parentNode.href", "location.href"? I'm assuming these are set values, but where could I find a list of them and what they are for? I don't even know where to begin looking. The help available for ff.au3 doesn't give examples or references for many things I need to know. I'm on the verge of just giving up because I have no clue where to look or what to look for. Over 7 hours spent today and I've gotten nowhere.

Edited by Kantanshi, 05 August 2012 - 08:03 PM.


#411 musicrab

musicrab

    Seeker

  • Normal Members
  • 2 posts

Posted 07 August 2012 - 11:11 AM

Thanks to the author of FF.au3 UDF - I've just spent an interesting coffee break playing with some simple FF automation (14.0.1). I've been playing with http://ifttt.com (which provides some cool web-service automation especially via Dropbox) but which is limited to a 15 minute polling period. So I just wanted an automated button presser ("check my ifttt recipes now"). The main problem was working out the best way to connect to a FF window (tab). I ended up with the following:

If _FFConnect(Default, Default, 3000) Then

; do work including _FFLinkClick

Else
MsgBox(0, "Connect", "failed to connect; will force a start next, then try again")
If _FFStart("about:blank") Then
MsgBox(0, "_FFStart", "started")
Else
MsgBox(0, "_FFStart", "failed")
EndIf
EndIf

_FFConnect doesn't always work and if it doesn't best to do a _FFStart
The problem with _FFStart is :- (I always have FF open)
1. it opens a new tab (window) with URL 4242 (I know that's the port number!)
2. when that fails a totally new FF window opens

So I then manually close the new window and set the focus to the "4242" tab and re-run and it works fine.

#412 RichardL

RichardL

    Prodigy

  • Active Members
  • PipPipPip
  • 175 posts

Posted 07 August 2012 - 12:21 PM

@musicrab - that 4242 tab is because of an error, fixed by cramaboule in post #389.

#413 Acanis

Acanis

    Seeker

  • Active Members
  • 25 posts

Posted 08 August 2012 - 02:27 PM

Hey,

is there any way, that you update it again^^?
I think, there is an error again, with the communication between MozRepl and the Script/the FF?!...

If I use
#include _FFStart("http://de.wikipedia.org/wiki/Wikipedia:Hauptseite", "default", 1, False)


, he starts the FF two times... One with the site and one with "4242" as URL...
Get errors with all scripts using the FF.au3... :/

I downloaded the newest MozRepl and FF:au3.
And I have the newest FF (http://www.mozilla.org/en-US/firefox/update/ -> up2date, 14.0.1)!

MozRepl is started...

Any ideas?!^^

Best regards,
Aca


*EDIT*
OK, #389 should work here... xD

Edited by Acanis, 08 August 2012 - 02:29 PM.


#414 musicrab

musicrab

    Seeker

  • Normal Members
  • 2 posts

Posted 15 August 2012 - 09:13 AM

@musicrab - that 4242 tab is because of an error, fixed by cramaboule in post #389.

Thanks for the prompt - I didn't look far enough back!

I'm doing something wrong. With the fix _FFStart is now timing out I think (when it calls _FFConnect) IE
_FFConnect ==> Timeout: TCPConnect Error: 10061

Do I have to change mozrepl ports (and if so, how). Many thanks guys.

#415 EmptySpace

EmptySpace

    Universalist

  • Active Members
  • PipPipPipPipPip
  • 294 posts

Posted 17 August 2012 - 10:54 AM

Guys, have little problem. Can open FF.au3 include file. Idk why. Checked it 10times. Downloaded new FF.au3 and placed in icludes but it just cant open it....

#416 Danp2

Danp2

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 949 posts

Posted 07 October 2012 - 11:41 PM

Anyone able to successfully call the function _FFGetPosition? I get the error "_FFGetPosition ==> No match: Cant find 'MozillaContentWindowClass'-control 1" every time I attempt to use it.

#417 Danp2

Danp2

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 949 posts

Posted 10 October 2012 - 08:13 PM

Here's an updated version of FF.au3, containing changes that I have applied to v0.6.0.1b-7.

For tracking purposes, I've labeled it v0.6.0.1b-8. I am not the original author, nor am I the maintainer of this code base. This is just the current version of FF.au3 that I use for my own scripts. It works for me, but YMMV. Use at your own risk. ;-)

Dan

Attached Files



#418 RichardL

RichardL

    Prodigy

  • Active Members
  • PipPipPip
  • 175 posts

Posted 17 October 2012 - 11:26 PM

@DanP2, I've used _FFGetPosition where I couldn't get any other method to click a button. Hope this helps.

 $elem = "window.content.wrappedJSObject.top.document.getElementsByName('ok')[0]" $posarr = _FFGetPosition($elem) AutoItSetOption("MouseCoordMode", 2) $x1 = $posarr[0] + $posarr[2] + 40 $y1 = $posarr[1] + $posarr[3] + 10 MouseMove($x1, $y1, 1)


Thanks for updated FF.au3, I'll download it when I next work on FF prog.

#419 foozoor

foozoor

    Seeker

  • Normal Members
  • 3 posts

Posted 03 November 2012 - 08:53 PM

Someone know how to click on an input:file with FF.au3?

This is my input.
<input name="upfile[]" id="file1" multiple="multiple" type="file">

I tried this.
_FFClick("file1", "id") ; It doesn't work!!!

Thanks for the updated FF.au3, DanP2.

#420 Danp2

Danp2

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 949 posts

Posted 04 November 2012 - 01:43 AM

What information shows in the output window when you run this command in sciTE?




4 user(s) are reading this topic

0 members, 4 guests, 0 anonymous users