LOULOU Posted July 2, 2012 Share Posted July 2, 2012 Hi, Try with FFxpath with that you can do what you want Link to comment Share on other sites More sharing options...
felcadz Posted July 14, 2012 Share Posted July 14, 2012 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 Link to comment Share on other sites More sharing options...
ELeong Posted July 22, 2012 Share Posted July 22, 2012 Hi, I'm new to FF.au3. I downloaded it and copied to to C:\Program Files\AutoIt3\Include\ 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? Link to comment Share on other sites More sharing options...
ELeong Posted July 22, 2012 Share Posted July 22, 2012 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. Link to comment Share on other sites More sharing options...
somdcomputerguy Posted July 22, 2012 Share Posted July 22, 2012 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. Link to comment Share on other sites More sharing options...
selevo Posted July 30, 2012 Share Posted July 30, 2012 (edited) hi, what can i do clliking on this element ? Edited July 30, 2012 by selevo Link to comment Share on other sites More sharing options...
Kantanshi Posted July 30, 2012 Share Posted July 30, 2012 (edited) <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 August 1, 2012 by Melba23 Post edited to remove section Link to comment Share on other sites More sharing options...
yogi Posted August 2, 2012 Share Posted August 2, 2012 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! Link to comment Share on other sites More sharing options...
Kantanshi Posted August 5, 2012 Share Posted August 5, 2012 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. Link to comment Share on other sites More sharing options...
Kantanshi Posted August 5, 2012 Share Posted August 5, 2012 (edited) 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("http://ff-au3-example.thorsten-willert.de/") ; 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 August 5, 2012 by Kantanshi Link to comment Share on other sites More sharing options...
musicrab Posted August 7, 2012 Share Posted August 7, 2012 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 _FFLinkClickElse 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") EndIfEndIf_FFConnect doesn't always work and if it doesn't best to do a _FFStartThe 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 opensSo I then manually close the new window and set the focus to the "4242" tab and re-run and it works fine. Link to comment Share on other sites More sharing options...
RichardL Posted August 7, 2012 Share Posted August 7, 2012 @musicrab - that 4242 tab is because of an error, fixed by cramaboule in post #389. Link to comment Share on other sites More sharing options...
Acanis Posted August 8, 2012 Share Posted August 8, 2012 (edited) 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 August 8, 2012 by Acanis Link to comment Share on other sites More sharing options...
musicrab Posted August 15, 2012 Share Posted August 15, 2012 @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: 10061Do I have to change mozrepl ports (and if so, how). Many thanks guys. Link to comment Share on other sites More sharing options...
EmptySpace Posted August 17, 2012 Share Posted August 17, 2012 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.... Link to comment Share on other sites More sharing options...
Danp2 Posted October 7, 2012 Share Posted October 7, 2012 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. Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
Danp2 Posted October 10, 2012 Share Posted October 10, 2012 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. ;-) DanFF V0.6.0.1b-8.au3 Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
RichardL Posted October 17, 2012 Share Posted October 17, 2012 @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. Link to comment Share on other sites More sharing options...
foozoor Posted November 3, 2012 Share Posted November 3, 2012 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. Link to comment Share on other sites More sharing options...
Danp2 Posted November 4, 2012 Share Posted November 4, 2012 What information shows in the output window when you run this command in sciTE? Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now