Jump to content

FF.au3 (V0.6.0.1b-10)


Stilgar
 Share

Recommended Posts

_FFConnect: OS: WIN_XP WIN32_NT 2600 Service Pack 3

_FFConnect: AutoIt: 3.3.6.0

_FFConnect: FF.au3: 0.6.0.1b-3

_FFConnect: IP: 127.0.0.1

_FFConnect: Port: 4242

_FFConnect: Delay: 2ms

_FFConnect: Socket: 1640

__FFWaitForRepl ==> Timeout: 10031ms > 10000ms $iTimeOut

I am getting Timeout message in the console, when i use the functions, could you please help

Here it is (sorry for the delay, I did not came here for quite a long time)

Of cours, I share with no guarantee: there may be problems, so if you can improve this code, don't hesitate.

I've added this warning at beginning of the file:

*****************************************************************

** THIS IS A MODIFIED, NON OFFICIAL VERSION

** THERE IS NO GUARANTEE MY CHANGES ARE VALID, OR WILL BE KEPT

** BY THE AUTHOR IN HIS NEXT RELEASES...

**

** I've added the minimum I needed to have working event handlers

** on the following:

** onclick for _FFFormRadioButtons, _FFFormCheckBoxes, _FFFormOptionselect

** onchange on _FFSetValue,

** (the onclick was already working on the _FFClick)

**

** my changes are identified with "GJ start" and "GJ end" comments

** or simply with my initals "GJ"

** and I did rename the original FF.au3 to FFgj.au3 to avoid any confusion.

**

*****************************************************************

Link to comment
Share on other sites

Hi, I have a question regarding Xpath and ff.au3. I have tried a few examples and _FFXpath works pretty well. Now I am curious whether it is possible to get the HTML code instead of just the content. I mean would like to specify a path and then retrieve everything including the HTML tags. Is this possible with _FFXpath?

PS thanks for ff.au3. It is really useful. You must have spent a lot of time on this :-)

Link to comment
Share on other sites

hi,

"UDF to control FireFox (Flock) via MozRepl"

I am in china. most of webSite is chinese, so i can not use FF and MozRepl to get content which contains chinese character. For instance, i want get the title of a website(中国, Chinese character), when i use ff function, it return the scrambled characters. Do you have any solution for this, or some thing to support chinese characts.

Thank you!

Link to comment
Share on other sites

Here is the answer: innerHTML could be used as second parameter.

Hi, I have a question regarding Xpath and ff.au3. I have tried a few examples and _FFXpath works pretty well. Now I am curious whether it is possible to get the HTML code instead of just the content. I mean would like to specify a path and then retrieve everything including the HTML tags. Is this possible with _FFXpath?

PS thanks for ff.au3. It is really useful. You must have spent a lot of time on this :-)

Link to comment
Share on other sites

Hi, I got a some problems.

First, FF Page Analyzer don't work for me. It shows me errors :

ERROR: AdlibDisable(): undefined function. AdlibDisable(), 
ERROR: _FFFrameGetSelected(): undefined function. Local $tmp = _FFFrameGetSelected(), 
ERROR: AdlibEnable(): undefined function. AdlibEnable("_getURL", $iURLTimer)

I've got a newest FF.au3 in my Includes, I don't know why I got these errors

Second problem, I want to use _FFSetValue, but it don't really works for me.

I got this HTML code of input and button :

<input type="text" name="duellName" value="name" id="duel_search">
<input type="submit" name="Submit" value="atak" id="submit">

and in AutoIT i got this code :

_FFSetValue($aText[$i], "duellName", "duel_search")

It returns me error :

_FFLoadWait: .......... loaded in 2443ms
__FFSend: try{FFau3.WCD=window.content.top.document;}catch(e){'_FFCmd_Err';};
__FFRecv: [object XPCNativeWrapper [object HTMLDocument]] — {contentType: "text/html", addEventListener: function() {…}, title: "BattleKnight", location: {…}, forms: {…}, documentURI: "http://s3.battleknight.onet.pl/bk.php?loc=raid&old=3", characterSet: "UTF-8"}
_FFLoadWait: . loaded in 21ms
_FFSetValue ==> Invalid value: (elements|id|name|class|tag) $sMode: duel_search

If i change code :

_FFSetValue($aText[$i], "duellName")
or
_FFSetValue($aText[$i], "duel_search")

I got other error :

_FFLoadWait: ...... loaded in 1324ms
__FFSend: try{FFau3.WCD=window.content.top.document;}catch(e){'_FFCmd_Err';};
__FFRecv: [object XPCNativeWrapper [object HTMLDocument]] — {contentType: "text/html", addEventListener: function() {…}, title: "BattleKnight", forms: {…}, documentURI: "http://s3.battleknight.onet.pl/bk.php?loc=raid&old=3", location: {…}, characterSet: "UTF-8"}
_FFLoadWait: . loaded in 10ms
__FFSend: try{duellName.value='Klelek\r'}catch(e){'_FFCmd_Err';};
__FFRecv: _FFCmd_Err
_FFSetValue ==> No match: $sElement: duellName

Hopefully waiting for answers.

wiz

Link to comment
Share on other sites

Hi, I got a some problems.

First, FF Page Analyzer don't work for me. It shows me errors :

...

Second problem, I want to use _FFSetValue, but it don't really works for me.

...

Short answers:

- FF Page Analyzer seems to be designed for an old version of FF.au3 (since the _FFFrameGetSelected function disappeared a long time ago - see change log) and it seems that Stilgar did not upgrade this tool, though it is still listed on the first page. As I do not know how this function should be replaced, I cannot help upgrading this tool.

As FF.au3 interface is not stable (sometimes functions disappear) it is a good practice when creating a tool or an UDF on top of FF.au3 and other stuffs like Firefox extensions to always indicate the exact versions for which the tool has been designed or tested with... but it is not oftenly done.

- the FFSetValue needs 3 parameters to be used with a name or id, as you are trying to do (see function definition inside ff.AU3 source code) so you should use either _FFSetValue($aText[$i], "name", "duellName") or _FFSetValue($aText[$i], "id", "duel_search")

Link to comment
Share on other sites

Thanks for help, u gave me a new way of thinking :idea:)

btw. in _FFSetValue($aText[$i], "id", "duel_search") I switched for _FFSetValue($aText[$i], "duel_search", "id") and it works ;]

Anyway again thanks

@edit

eww got some new idea with blocks of text. I got smth like :

<div id="gold_container">
    50</div>

Is it possible to read this value ? I tried with _FFObj & _FFObjGet, but I only can get the id of it.

Edited by Wizath
Link to comment
Share on other sites

I got new problem o.O

It's all about this code

<input type="submit" name="Submit" value="atak" id="button">

This button is on the bottom of this site, i need to scroll down to see it. Can it cause errors?

I got smth like this

_FFClick("button", "id")

and i get this error ::

_FFSend: try{FFau3.simulateEvent(FFau3.WCD.getElementById('button'),'MouseEvents','click');}catch(e){'_FFCmd_Err';};
__FFRecv: -3
_FFClick ==> No match: $sElement: FFau3.WCD.getElementById('button')

Waiting for help :idea:

Link to comment
Share on other sites

  • 1 month later...

@Stilgar or anyone

Are there any plans to intergrate this in the normal release as was done with IE.au3?

Post your code because code says more then your words can. SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y. Use Opt("MustDeclareVars", 1)[topic="84960"]Brett F's Learning To Script with AutoIt V3[/topic][topic="21048"]Valuater's AutoIt 1-2-3, Class... is now in Session[/topic]Contribution: [topic="87994"]Get SVN Rev Number[/topic], [topic="93527"]Control Handle under mouse[/topic], [topic="91966"]A Presentation using AutoIt[/topic], [topic="112756"]Log ConsoleWrite output in Scite[/topic]

Link to comment
Share on other sites

  • 3 weeks later...

Hi, I got a some problems.

First, FF Page Analyzer don't work for me. It shows me errors :

ERROR: AdlibDisable(): undefined function. AdlibDisable(), 
ERROR: _FFFrameGetSelected(): undefined function. Local $tmp = _FFFrameGetSelected(), 
ERROR: AdlibEnable(): undefined function. AdlibEnable("_getURL", $iURLTimer)

Hello Wizath,

Try these modifications:

1. Replace AdlibDisable() with AdlibUnregister()

2. Replace AdlibEnable() with AdlibRegister()

3. Replace _FFFrameGetSelected() with _FFCmd("window.frames[0].document.getSelection")

4. Replace _FFFrameGetSelected("name") with _FFCmd("window.frames[0].document.name")

This is a quick and somewhat sloppy hack to get an analyze in. But you do get that analyze in.

Cheers,

Link to comment
Share on other sites

Hi,

I've been using AutoIt off and on for a while, but I'm new to FF.au3, and to this Forum. My questions directly deal with FF.au3, but I can't tell if this thread has become specialized to the point where it only deals with the actual development of FF.au3 now. I hope I will not offend if I post here, and not in General Help and Support.

I have two questions:

First, I have been successful at using _FFSearch to put a selection on text within a web page. This is text that I know will exist there somewhere, and _FFSearch finds it and selects it with no problem. My task is to then select the following 30 or so characters as well, and I don't know what they will be. I do not want to use _FFReadText, and then run string functions on it because the text of the entire page is way too big. The simplest approach seems to me to extend the selection by a fixed number of characters, like 30, or until a newline is encountered. So, my first question/request would be for guidance, if it is possible, in using the built-in functions of FF.au3, like _FFAction, _FFSearch, and _FFReadText in ways or with parameters that I don't know exist to extend the selection or capture the whole line up to a newline.

My Second question follows directly from the first. Having found _FFCmd, I thought that there might be a simple way to modify the Selection so as to extend it. With a few hours research on the gecko DOM (https://developer.mozilla.org/en/gecko_dom_reference) I found "sel.extend(parentNode, offset) (https://developer.mozilla.org/en/DOM/Selection/extend)". I couldn't get this to work, probably because I couldn't provide "parentNode". Am I barking up the wrong tree?

So, my second question/request two fold: a. what would be the way to use _FFCmd to extend the selection by 30 characters? and b. since there is so much that can be done with _FFCmd by going straight to the properties and methods of the browser object, how is that done really? Where do you go for a clear description of the objects, methods and properties of FireFox layed out in such a way that it is clear how to use _FFCmd with them to get into the browser and the document? It seems the Mozilla Developer site has the object structure, but not layed out in a useful way, and it also seems that there are a few pieces missing to the puzzle as to how to use the info with _FFCmd, particularly if outside the scope of "window.content.document".

Once again, I hope I'm not putting this in the wrong place by posting here.

Thanks

Link to comment
Share on other sites

I think my question is fairly simple, but I'm not sure where to find the answer. I'm running multiple Firefox processes on a single machine (with -no-remote), each using a different profile. I would like to use MozRepl (via AutoIt) to determine which profile is currently being used by a particular Firefox process (i.e., the process to which I'm currently connected using MozRepl). Is there a way to do that?

Link to comment
Share on other sites

  • 2 weeks later...

if i try to start with

_FFStart(url) (no mather what url)

i always get this error, how do i fix it?

__FFStartProcess ==> General Error: Error reading registry entry for FireFox.

HKEY_LOCAL_MACHINE\SOFTWARE\Mozilla\Mozilla Firefox\*CurrentVersion*\Main\PathToExe

Link to comment
Share on other sites

if i try to start with

_FFStart(url) (no mather what url)

i always get this error, how do i fix it?

__FFStartProcess ==> General Error: Error reading registry entry for FireFox.

HKEY_LOCAL_MACHINE\SOFTWARE\Mozilla\Mozilla Firefox\*CurrentVersion*\Main\PathToExe

Thanks for all who tried to help,

found the solution myself,

had to change my registery entry in FF.au3 to

HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Mozilla\Mozilla Firefox\*CurrentVersion*\Main\PathToExe

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