Danp2

FF.au3 (v0.6.0.1b-15)

171 posts in this topic

#1 ·  Posted (edited)

UDF to control FireFox via MozRepl:

 FF_V0.6.0.1b-15_au3

Change Log:

Spoiler

    V0.6.0.1b-15 (by Danp2)
    - Fixed: Restored declaration of return variable in _FFCmd
    - Fixed: SelectWin check of individual tabs by Title

    V0.6.0.1b-14 (by Danp2)    
    - Changed: _FFWindowOpen to allow private browsing    
    - Changed: _FFWindowGetHandle to improve functionality    
    - Fixed: _FFTableWriteToArray    
    - Fixed: __FFStartProcess    
    - Fixed: __FFWaitForRepl
    
    V0.6.0.1b-13    
    - Fixed: Changed: CLASS:MozillaUIWindowClass to CLASS:MozillaWindowClass
    
    V0.6.0.1b-12    
    - Fixed: error in __FFIsIp

Original thread: http://www.autoitscript.com/forum/topic/95595-ffau3-v0601b-10/

Current development is occurring over on GitHub. The repo can be found here.

 

Edited by Danp2
2 people like this

Share this post


Link to post
Share on other sites



Does Stilgar no longer support the FF UDF?


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

You would have to ask him. He hasn't been active in a while so it just made sense to start a new thread where it could be maintained. Stilgar can pick up where we leave off any time he likes.  :thumbsup:

Share this post


Link to post
Share on other sites

I see. He hasn't been active on the german forum since Mid-December too.


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

Hi.

I trying submit from recaptcha form. Please help me.

This is my code:

<snip>

Thank.

Edited by Melba23
Removed code

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

MarkLee,

Welcome to the AutoIt forum. :)

Unfortunately you appear to have missed the Forum rules on your way in. Please read them now (there is also a link at bottom right of each page) - particularly the bit about not discussing Bypassing of security measures - log-in and security dialogs, CAPTCHAs, anti-bot agents, software activation, etc - and then you will understand why you will get no help. :naughty:

See you soon with a legitimate question I hope. :)

M23

Edited by Melba23
Cut'n'paste error!

Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

How to check connection status a site ?

sr . My bad English.

Share this post


Link to post
Share on other sites

#Include <FF.au3>

; trying to connect to a running FireFox with MozRepl on
If _FFConnect(Default, Default, 3000) Then
    ; open a page
    _FFOpenURL("http://ff-au3-example.thorsten-willert.de/")
    Sleep(3000)
    ; disconnect from FireFox
    If _FFDisConnect() Then MsgBox(64, "", "Disconnected from FireFox!")
Else
    MsgBox(64, "", "Can't connect to FireFox!")
EndIf

i test above code,and found that erro on my dell laptop.

Can't connect to FireFox!

my firefox is 36.0.4   win7 64bit ff.au3 is   V0.6.0.1b-14

Share this post


Link to post
Share on other sites

Do you have the Mozrepl addon installed and started?

Post the details from the Scite output window.

Share this post


Link to post
Share on other sites

#10 ·  Posted (edited)

Is there any examples of using this FF.Au3 UDF, as I am unable to find it in the help file? It is also not part of the includes, so I had to download it.

 

EDIT

I have tried the following code after adding the addon - https://github.com/bard/mozrepl/wiki-->> https://addons.mozilla.org/en-US/firefox/addon/mozrepl/

#Include <FF.au3>

; trying to connect to a running FireFox with MozRepl on
If _FFConnect(Default, Default, 3000) Then
    ; open a page
    _FFOpenURL("http://google.com/")
    Sleep(3000)
    ; disconnect from FireFox
    If _FFDisConnect() Then MsgBox(64, "", "Disconnected from FireFox!")
Else
    MsgBox(64, "", "Can't connect to FireFox!")
EndIf

I get the message that it Can't connect to Firefox - yet it is open and able to access google.com, no not a network issue.

EDIT 2

The output form scite:

_FFConnect: OS:    WIN_XP WIN32_NT 2600 Service Pack 3
_FFConnect: AutoIt:    3.3.12.0
_FFConnect: FF.au3:    0.6.0.1b-14
_FFConnect: IP:    127.0.0.1
_FFConnect: Port:    4242
_FFConnect: Delay:     2ms
_FFConnect ==> Timeout: TCPConnect Error: 10061
_FFConnect ==> General Error: Timeout: Can not connect to FireFox/MozRepl on: 127.0.0.1:4242

EDIT 3

I found this on the OP, so I will take a look

Edited by nitekram

All by me:

"Sometimes you have to go back to where you started, to get to where you want to go." 

"Everybody catches up with everyone, eventually" 

"As you teach others, you are really teaching yourself."

From my dad

"Do not worry about yesterday, as the only thing that you can control is tomorrow."

 

WindowsError.gif

WIKI | Tabs; | Arrays; | Strings | Wiki Arrays | How to ask a Question | Forum Search | FAQ | Tutorials | Original FAQ | ONLINE HELP | UDF's Wiki | AutoIt PDF

AutoIt Snippets | Multple Guis | Interrupting a running function | Another Send

StringRegExp | StringRegExp Help | RegEXTester | REG TUTOR | Reg TUTOT 2

AutoItSetOption | Macros | AutoIt Snippets | Wrapper | Autoit  Docs

SCITE | SciteJump | BB | MyTopics | Programming | UDFs | AutoIt 123 | UDFs Form | UDF

Learning to script | Tutorials | Documentation | IE.AU3 | Games? | FreeSoftware | Path_Online | Core Language

Programming Tips

Excel Changes

ControlHover.UDF

GDI_Plus

Draw_On_Screen

GDI Basics

GDI_More_Basics

GDI Rotate

GDI Graph

GDI  CheckExistingItems

GDI Trajectory

Replace $ghGDIPDll with $__g_hGDIPDll

DLL 101?

Array via Object

GDI Swimlane

GDI Plus French 101 Site

GDI Examples UEZ

GDI Basic Clock

GDI Detection

Ternary operator

Share this post


Link to post
Share on other sites

You have to actually start the MozRepl add-in. Look for the menu entry under the Tools menu.

Share this post


Link to post
Share on other sites

Sorry, did not know an addon needed to be started, but now that I have in on 'activate on startup', I assume that it will remain started from now on.

I was able to get the code to work - thanks.

I assume that the only examples are on the website from the creator - it is a slow server on that end, so it takes a while just to get the site. Might be that I am in the USA?


All by me:

"Sometimes you have to go back to where you started, to get to where you want to go." 

"Everybody catches up with everyone, eventually" 

"As you teach others, you are really teaching yourself."

From my dad

"Do not worry about yesterday, as the only thing that you can control is tomorrow."

 

WindowsError.gif

WIKI | Tabs; | Arrays; | Strings | Wiki Arrays | How to ask a Question | Forum Search | FAQ | Tutorials | Original FAQ | ONLINE HELP | UDF's Wiki | AutoIt PDF

AutoIt Snippets | Multple Guis | Interrupting a running function | Another Send

StringRegExp | StringRegExp Help | RegEXTester | REG TUTOR | Reg TUTOT 2

AutoItSetOption | Macros | AutoIt Snippets | Wrapper | Autoit  Docs

SCITE | SciteJump | BB | MyTopics | Programming | UDFs | AutoIt 123 | UDFs Form | UDF

Learning to script | Tutorials | Documentation | IE.AU3 | Games? | FreeSoftware | Path_Online | Core Language

Programming Tips

Excel Changes

ControlHover.UDF

GDI_Plus

Draw_On_Screen

GDI Basics

GDI_More_Basics

GDI Rotate

GDI Graph

GDI  CheckExistingItems

GDI Trajectory

Replace $ghGDIPDll with $__g_hGDIPDll

DLL 101?

Array via Object

GDI Swimlane

GDI Plus French 101 Site

GDI Examples UEZ

GDI Basic Clock

GDI Detection

Ternary operator

Share this post


Link to post
Share on other sites

You can find some examples on this site and on the net (use your favorite search engine to find them). If you need help, post here and hopefully someone will jump in and offer assistance.

Share this post


Link to post
Share on other sites

__FFStartProcess: ""E:\Program Files (x86)\Mozilla Firefox\firefox.exe" -new-window "http://www.baidu.com"  "-repl 4242 "
_FFConnect: OS: WIN_7 WIN32_NT 7600 
_FFConnect: AutoIt: 3.3.11.3
_FFConnect: FF.au3: 0.6.0.1b-14
_FFConnect: IP: 127.0.0.1
_FFConnect: Port:   4242
_FFConnect: Delay:  2ms
_FFConnect ==> Timeout: TCPConnect Error: 10061
_FFConnect ==> General Error: Timeout: Can not connect to FireFox/MozRepl on: 127.0.0.1:4242
_FFIsConnected ==> Socket Error: -1

I don't know how to solve this problem.anyone help?thanks very much!!! :ILA3:

Share this post


Link to post
Share on other sites

Looks like you don't have the MozRepl add-in installed / started.

Share this post


Link to post
Share on other sites

#16 ·  Posted

Hi,

I've been using autoitscript for years with IE and have had great success, but I need to use it on FF for a project I am working on. I have MozRepl installed and it is running.  I am using this basic script to test it out.

#include <ff.au3>

If _FFConnect(Default, Default, 3000) Then
    ; open a page
    _FFOpenURL("http://ff-au3-example.thorsten-willert.de/")
    Sleep(3000)
    ; disconnect from FireFox
    If _FFDisConnect() Then MsgBox(64, "", "Disconnected from FireFox!")
Else
    MsgBox(64, "", "Can't connect to FireFox!")
EndIf

and i Keep getting an error message

_FFConnect: OS: WIN_81 WIN32_NT 9600 
_FFConnect: AutoIt: 3.3.12.0
_FFConnect: FF.au3: 0.6.0.1b-14
_FFConnect: IP: 127.0.0.1
_FFConnect: Port:   4242
_FFConnect: Delay:  2ms
_FFConnect: Socket:     612

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

Is there something that could be interfering with running MozRepl where it is not forming a connecting to the autoitscript?

I'm running Windows 8.1 64bit, w/ the latest version of AutoIt.

Any help would be appreciated.

 

Thank you,

 

Mike

Share this post


Link to post
Share on other sites

#17 ·  Posted

I know that you stated Mozrepl was running, but are you sure? Look under Tools > Mozrepl. Does it say Start or Stop? Also, make sure Activate on Startup is enabled.

You can try connecting directly to Mozrepl by dropping to a command prompt and entering the command

telnet localhost 4242

If it responds with "Connect failed", then Mozrepl isn't functioning properly.

Share this post


Link to post
Share on other sites

#18 ·  Posted

Danp2, 

Mozrepl, is definitely running. It shows "Stop" on the menu, as if the program is already running. Also the check box next to "activate on startup is enabled. I tried your telnet suggestion and it did not work. I have attached a screen shot of what happened. Do you have any idea why telnet would not be recognized? Am i in the wrong screen?

CommandPrompt.jpg

Share this post


Link to post
Share on other sites

#19 ·  Posted

Danp2,

I looked into this further, and realized I have to enable telnet under windows features. I did this, and initially the command prompt reads that it is connection to server, but I end up with this screen.

CommandPrompt2.jpg

Share this post


Link to post
Share on other sites

#20 ·  Posted

As I suspected, something isn't working correctly. You should see the message "Welcome to MozRepl" and be presented with the "repl" prompt. It's possible that something else is already using port 4242. 

You can see which app has the port open with the command

netstat -a -n -o -p tcp -b

Share this post


Link to post
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

  • Similar Content

    • mattia100
      By mattia100
      HI!
      1) I want to create a FF web page in background... i want to say a web page that can't be seen in the application bar  but only in Windows Task Manager... 
      maybe using  __FFStartProcess? in fact i tried to use it but the parameter "hide" only can minimize the page, but not put it in background... 
      2) After creating this hide page, i would to open a macro of the iMacros addon, always all in hide mode...
      it is possible to do it?
      anybody can help me?
      Thanks!!
    • rte7
      By rte7
      Hello. We work with the BMC Remedy site to manage incidents and would like to automate the processes of clicking through this button code:
      <a href="javascript:" class="btn btn3d menu" style="top:21; left:184; width:21; height:21;"> <img class="btnimg" src="../../../../resources/images/mt_sprites.gif" alt="menu category issue" title=""> </a> I use firefox with mozrepl and autoit with include FF.au3
      I need your help
      I read the topic https://www.autoitscript.com/forum/topic/95595-ffau3-v0601b-10/ but I could not run the code from the listed commands
      ...
      It is necessary to press the button and from the list of the menu of cahorsations to select the item = "zone of trust abonent"
      Screen # 1 http://joxi.ru/52aJK7bh4a7ypA or below.
      1) Press button
      <a href="javascript:" class="btn btn3d menu" style="top:21; left:184; width:21; height:21;"> <img class="btnimg" src="../../../../resources/images/mt_sprites.gif" alt="menu category issue" title=""> </a>
      2) After pressing the button, I need to choose in this menu of 4 items to select an item called "zone of trust abonent", Screen # 2 - http://joxi.ru/p27gwQKHo71VQ2
      html code table items
      <table class="MenuTable" cellpadding="0" cellspacing="0" style="width: 179px;"> <tbody class="MenuTableBody"> <tr class="MenuTableRow"> <td class="MenuEntryName" nowrap="">zone of trust abonent</td> <td class="MenuEntryNoSub" arvalue="zone of trust abonent"></td> </tr> <tr class="MenuTableRow"><td class="MenuEntryName" nowrap="">zone of trust operator</td> <td class="MenuEntryNoSub" arvalue="zone of trust operator"></td> </tr> <tr class="MenuTableRow"><td class="MenuEntryName" nowrap="">zone of trust third operator</td> <td class="MenuEntryNoSub" arvalue="zone of trust third operator"></td></tr> <tr class="MenuTableRow"><td class="MenuEntryNameHover" nowrap="">No settings</td> <td class="MenuEntryNoSubHover" arvalue="No settings"></td> </tr> </tbody> </table>
       
       
      More in detail, I choose from the menu item "zone of trust abonent" Screen # 3 - http://joxi.ru/GrqVq4ZIQEPW4m

       
      3) The choice is made, Screen # 4 http://joxi.ru/v297w6aC3PovLr
      <textarea class="text sr " wrap="off" id="arid_WIN_0_1000002488" cols="20" maxlen="60" style="top:21; left:0; width:179; height:21;" armenu="CFG:PRC:CategoryHPD-Res-T1-Q" mstyle="2" arautoc="1" arautocmb="1" arautocak="0" arautoctt="400" rows="1"> </textarea>
       
      It's all. I would be very grateful to you =) !!!!!!!!!!
      Here are more detailed codes in the attachment. 
      button1.txt
      menu - table.txt
      all.txt
    • 5ervant
      By 5ervant
      Go create a quick account in Zapier and go to https://zapier.com/app/dashboard and make some Zaps!
      Just need to click the specific instance of an .open-menu button and then click its a.run (anchor) element.
      Doing this IE.au3 script just causing to click its container element:
      $target = 1; Target the first instance #include <IE.au3> $oIE = _IEAttach("Dashboard - Zapier") $count = 0; $tags = _IETagNameGetCollection($oIE, "div") For $tag in $tags $class_value = $tag.GetAttribute("class") If $class_value = "open-menu" Then $count += 1 if $count = $target Then MsgBox(0, "Instance: ", $count) ; $tag.fireEvent("onmousedown") ; _IEAction($tag, "click") ; $tag.fireEvent("onmouseup") ; Or this but not working ; $tag.Click EndIf EndIf Next I also tried to do it using FF.au3
      $target = 1; Target the first instance #Include <Array.au3> #Include <FF.au3> $count = 0; If _FFConnect(Default, Default, 3000) Then $aArray = _FFXPath( "//div[@class='open-menu']", "", 7 ) ; _ArrayDisplay($aArray) For $tag in $aArray $count += 1 if $count = $target Then MsgBox(0, "Instance: ", $count) _FFClick($tag) EndIf Next EndIf Error: _FFClick ==> No match: $sElement: [number]
      Could some help me how to click such buttons on such kind of a dynamic page?
    • jfcby
      By jfcby
      I have a script that sends multiple lines of text to a textbox using Firefox. I using _FFSetValue($sCellValue[7], "line one" & @CR & "line two", "id") from ff.au3. If it's a single line of text it works but MozRepl give the following error with multiple lines of text.
      Error:  
      __FFSend: try{FFau3.simulateEvent(window.content.top.document.getElementById('line one
      line two'),'Event','change',13);}catch(e){'_FFCmd_Err';};
      __FFWaitForRepl ==> Error return value: MozRepl ....>
      __FFSend: ;
      __FFRecv:
      __FFSend: FFau3.WCD=window.content.top.document;
      __FFWaitForRepl ==> Error return value: MozRepl ....>
      __FFRecv: !!! SyntaxError: unterminated string literal
      Details:

       [object HTMLDocument] - {mainForm: {...}, location: {...}, getElementsByName: function() {...}, getItems: function() {...}, open: function() {...}, close: function() {...}, write: function() {...}, ...}
      !!! SyntaxError: unterminated string literal
      Will MozRepl plugin for Firefox send multiple lines of text to a textbox?
      Thanks for your help.