Jump to content

FF.au3 (V0.6.0.1b-10)


Stilgar
 Share

Recommended Posts

@Valery:

Nice example! Why don't you made a thread? So it's easier to find.

The "CHM Reader"-AddOn is only working up to FF3.0.x >_<

About special thread. It's good idea to make "AFireFox" thread. Thank you.

AddOn CHM Reader can work nice with FireFox 3.5.1, also.

About this read here, please.

Thank you for creation of FF.au3.

Sincerely,

Valery

The point of world view

Link to comment
Share on other sites

About special thread. It's good idea to make "AFireFox" thread. Thank you.

AddOn CHM Reader can work nice with FireFox 3.5.1, also.

About this read here, please.

Thank you for creation of FF.au3.

Sincerely,

Valery

Yes, ok, I know how I change the AddOn files (xpi), so they work with other FF versions, too. I mean the problem is, the "official" AddOn doesn't work >_<

@trinitrotoluen:

Have you tried to increase the AutoIt-option for TCPTimeout?

[EDIT]

@n8gk:

Sure you can load an image from the web into a GUI. If you know the adress of the image you don't need the FF.au3 to do this.

Download it with InetGet an put it like any other image in your GUI.

Edited by Stilgar
Link to comment
Share on other sites

Hi stilgar,

THis code is IE automation and allow clicking on an "Input type=file"

$fichier = _IEFormElementGetObjByName($form, "nomFic")

MouseMove(_IEPropertyGet($fichier, "screenx") + _IEPropertyGet($fichier, "width") - 10, _IEPropertyGet($fichier, "screeny") + _IEPropertyGet($fichier, "height") / 2)

MouseClick("left")

Is-it possible wit firefox to have a function like _IEPropertyGet

This function allow to determinate the location on the screen of button Input type

Thanks in advance

Link to comment
Share on other sites

Hi stilgar,

THis code is IE automation and allow clicking on an "Input type=file"

Is-it possible wit firefox to have a function like _IEPropertyGet

This function allow to determinate the location on the screen of button Input type

Thanks in advance

Hi,

why do you click on it? You can just set the value (_FFSetValueBy* doesn't work!)

_FFXpath("//input[@type='file' and @name='nomFic']","",9) ; I hope that's the right input name
_FFObj("xpath","value","c:\\test.txt")

Or if you wanna made a MouseClick then you can use this function to find the position of the button:

http://thorsten-willert.de/Themen/FFau3/Beispiele/_FF_ElementGetPosition.au3

Edited by Stilgar
Link to comment
Share on other sites

Hi,

why do you click on it? You can just set the value (_FFSetValueBy* doesn't work!)

_FFXpath("//input[@type='file' and @name='nomFic']","",9) ; I hope that's the right input name
_FFObj("xpath","value","c:\\test.txt")

Or if you wanna made a MouseClick then you can use this function to find the position of the button:

http://thorsten-willert.de/Themen/FFau3/Beispiele/_FF_ElementGetPosition.au3

My problem is that nomfic is an Input type = file an due to security you can't assign a value to this type of object

Am i wright ? If yes what you show me does'nt works. Thanks to confirm

Link to comment
Share on other sites

Have you tried it?

Via DOM you can't assign the value but via Xpath it works.

That's the reasen why I said you can't do it with the _FFSetValueBy* functions.

Example:

#include <FF.au3>

If _FFConnect() Then
    _FFOpenURL("http://ff-au3-example.thorsten-willert.de/")

    _FFXpath("//input[@type='file']","",9)
    _FFObj("xpath","value","c:\\test.txt")
EndIf
Edited by Stilgar
Link to comment
Share on other sites

#Include <FF.au3>
_FFStart()
; trying to connect to a running FireFox with MozRepl on
If _FFConnect("204.188.224.100",1080, 3000) Then
; open a page
    _FFOpenURL("http://www.ip-adress.com/")
    Sleep(3000)
; disconnect from FireFox
    If _FFDisConnect() Then
    MsgBox(64, "", "Disconnected from FireFox!")
    Else
    MsgBox(64, "", "Can't connect to FireFox!")
    EndIf
EndIf

What wrong

FF not to http://www.ip-adress.com/

SciTE :

__FFStartProcess: ""C:\Program Files\Mozilla Firefox\firefox.exe" -new-window "about:blank" -repl 4242

_FFConnect: OS: WIN_XP WIN32_NT 2600 Service Pack 2

_FFConnect: AutoIt: 3.3.0.0

_FFConnect: FF.au3: 0.5.3.7b

_FFConnect: IP: 127.0.0.1

_FFConnect: Port: 4242

_FFConnect: Delay: 2ms

_FFConnect: Socket: 1676

__FFSend: try{window.content.frames["top"].document.browserDOMWindow}catch(e){'_FFCmd_Err';};

__FFRecv:

__FFSend: try{navigator.userAgent}catch(e){'_FFCmd_Err';};

__FFRecv: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.10) Gecko/2009042316 Firefox/3.0.10

_FFConnect: Browser: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.10) Gecko/2009042316 Firefox/3.0.10

_FFSendJavascripts: Sending functions to FireFox ........... done

_FFLoadWait: . loaded in 33ms

_FFConnect: OS: WIN_XP WIN32_NT 2600 Service Pack 2

_FFConnect: AutoIt: 3.3.0.0

_FFConnect: FF.au3: 0.5.3.7b

_FFConnect: IP: 204.188.224.100

_FFConnect: Port: 1080

_FFConnect: Delay: 386ms

_FFConnect: Socket: 1664

__FFWaitForRepl ==> Error TCPSend / TCPRecv: TCPRecv :-1

please !help me

Edited by Unfrog
Link to comment
Share on other sites

1) Do you really wanna connect to an FF somewhere in your network/internet?

2) Or you wanna connect to FF on your own PC?

If 1) Is there a firewall or something blocking this ports in your script?

If 2) Just use_FFConnect(). You can see in the output from SciTE that the first connection (_FFStart) on localhost (127.0.0.1:4242) is working and your second connection (not really usefull without saving the first socket) doesn't work (204.188.224.100:1080).

So if you wanna using FF on your own PC:

#Include <FF.au3>
_FFStart() ; open FF and made a connection to it

If _IsConnected() Then
    _FFOpenURL("http://www.ip-adress.com/") ; open a page
    Sleep(3000)
    _FFDisConnect() ; close the connection
Else
    MsgBox(64, "", "Can't connect to FireFox!")
EndIf
Link to comment
Share on other sites

Hi, I can't do with this :

<input type="file" size="35" name="upfile"/>

__FFSend: FFau3.xpath=null;try{FFau3.xpath=window.content.frames["top"].document.evaluate("//input[@type='file']",window.content.frames["top"].document,null,XPathResult.FIRST_ORDERED_NODE_TYPE,null).singleNodeValue;}catch(e){'_FFXPath_Error: '+e;};

__FFRecv: [object XPCNativeWrapper [object HTMLInputElement]] — {ownerDocument: {…}, id: "", parentNode: {…}, namespaceURI: null, localName: "INPUT", name: "upfile", previousSibling: null, ...}

__FFSend: try{FFau3.xpath.hasAttribute('value')}catch(e){'_FFCmd_Err';};

__FFRecv: 0

_FFObj ==> Invalid value: $sAttrib not found: value

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