Jump to content

[SOLVED] Need help with FF.au3 Firefox portable


Recommended Posts

my FF.au3 does get included but my script does not open firefox. 

here is my code so far:

#include <FF.au3>
_FFStart("https://www.google.com", Default, 0)

I am using firefox portable version 52.0 Any and all help would be greatly appreciated.  

The code runs but nothing happens. I think the FF.au3 cannot find or connect to the firefox portable.  

Edited by nooneclose
Link to comment
Share on other sites

Did you install the MozRepl plugin? Is there any indication as to why it' s not starting, error messages, warnings, etc.?

If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Link to comment
Share on other sites

I did install the MozRepl plugin. (It says it is an extension) and as far as I know, there is no error message. 

here is the console output from start to finish:

>"C:\Program Files (x86)\AutoIt3\SciTE\..\AutoIt3.exe" "C:\Program Files (x86)\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.au3" /run /prod /ErrorStdOut /in "C:\Users\a\Desktop\Bots\MyBotScripts\FF_WO_AI.au3" /UserParams    
+>14:57:20 Starting AutoIt3Wrapper v.18.708.1148.0 SciTE v.4.1.0.0   Keyboard:00000409  OS:WIN_10/  CPU:X64 OS:X64  Environment(Language:0409)  CodePage:0  utf8.auto.check:4
+>SciTEDir => C:\Program Files (x86)\AutoIt3\SciTE   UserDir => C:\Users\a\AppData\Local\AutoIt v3\SciTE\AutoIt3Wrapper   SCITE_USERHOME => C:\Users\a\AppData\Local\AutoIt v3\SciTE 
>Running AU3Check (3.3.14.5)  from:C:\Program Files (x86)\AutoIt3  input:C:\Users\a\Desktop\Bots\MyBotScripts\FF_WO_AI.au3
+>14:57:20 AU3Check ended.rc:0
>Running:(3.3.14.5):C:\Program Files (x86)\AutoIt3\autoit3.exe "C:\Users\a\Desktop\Bots\MyBotScripts\FF_WO_AI.au3"    
--> Press Ctrl+Alt+Break to Restart or Ctrl+Break to Stop
+>14:57:26 AutoIt3.exe ended.rc:0
+>14:57:26 AutoIt3Wrapper Finished.
>Exit code: 0    Time: 5.978

Link to comment
Share on other sites

Make sure the MozRepl extension is started (there should be a Mozrepl meou under the main Tools menu). Also, you can try setting $_FF_COM_TRACE = True

I haven't used this UDF in a while since it no longer works with current versions of FF. I suspect that you will need to manually launch the portable version of FF and then call _FFConnect.

Link to comment
Share on other sites

@Danp2Here is what I have so far. 

#include <OutlookEX.au3>                                                ;Allows the Outlook functions
#include <FF.au3>                                                       ;Allows Firefox funcations
#include <AD.au3>                                                       ;Allows Active Directory functions
#include "DTC.au3"                                                      ;Allows Custom Date and Time functions
#include <Date.au3>                                                     ;Allows Date and Time functions
#include <DateTimeConstants.au3>                                        ;Allows Date and Time constant functions
#include <StringConstants.au3>                                          ;Allows String constant functions
#include <Array.au3>                                                    ;Allows special Array functions
#include <Misc.au3>                                                     ;Allows the "is pressed" function to be used
#include <MsgBoxConstants.au3>                                          ;Allows Message box function to be used
#include <Constants.au3>                                                ;Allows constants to be used
#include <Timers.au3>                                                   ;Allows timer functions
;#RequireAdmin                                                          ;Requests admin privliges before starting program

; Sets the script to accept coordinates off the program window and not the screen
AutoItSetOption('MouseCoordMode', 0)
; Defines the time it takes to send text to the software/program
AutoItSetOption('SendKeyDelay', 10)

;*******************************************************************************
; Close the script if "End" is pressed
;*******************************************************************************
$oMyError = ObjEvent("AutoIt.Error","MyErrFunc")

HotKeySet("{END}", "Terminate")
Func Terminate()
    MsgBox($MB_ICONINFORMATION, "DEATH", "AI Stoped!", 5)
    Exit
EndFunc


;*******************************************************************************
; Script has started
;*******************************************************************************
Sleep(2000)
MsgBox($MB_ICONINFORMATION, "WO_AI", "AI Started!", 5)
Sleep(1500)


;*******************************************************************************
; Global Variables
;*******************************************************************************


;*******************************************************************************
; Main functions of the program
;*******************************************************************************
OpenFirefox()



Func OpenFirefox()

    ;*******************************************************************************
    ; Opens Firefox
    ;*******************************************************************************
    ;_FFStart("https://www.google.com")
    MsgBox("", "", "Opening Firefox", 2)
    _FFStart("https://www.google.com", Default, 0)

    _FFConnect()

    $_FF_COM_TRACE = True
    ConsoleWrite($_FF_COM_TRACE)

EndFunc


MsgBox("", "", "Script Ended", 2)

here are the messages: 

_FFConnect: OS:    WIN_10 WIN32_NT 17134 
_FFConnect: AutoIt:    3.3.14.5
_FFConnect: FF.au3:    0.6.0.2b-1
_FFConnect: IP:    127.0.0.1
_FFConnect: Port:    4242
_FFConnect: Delay:     2ms
_FFConnect ==> Timeout: TCPConnect Error: 10060
True_FFConnect ==> General Error: Timeout: Can not connect to FireFox/MozRepl on: 127.0.0.1:4242
_FFIsConnected ==> Socket Error: -1

Link to comment
Share on other sites

@Danp2 Ok I tried it with Firefox already open and it gave me this:

_FFConnect: OS:    WIN_10 WIN32_NT 17134 
_FFConnect: AutoIt:    3.3.14.5
_FFConnect: FF.au3:    0.6.0.2b-1
_FFConnect: IP:    127.0.0.1
_FFConnect: Port:    4242
_FFConnect: Delay:     2ms
_FFConnect: Socket:     1084
_FFConnect: Browser:    Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:52.0) Gecko/20100101 Firefox/52.0
__FFSendJavaScripts: Sending functions to FireFox .......... done
_FFOpenURL: https://www.google.com
__FFSend: try{window.content.top.document.location.href='https://www.google.com'}catch(e){'_FFCmd_Err';};
__FFRecv: https://www.google.com
_FFLoadWait: ..... loaded in 1113ms
[object HTMLDocument] - {f: {...}, location: {...}, getElementsByName: function() {...}, open: function() {...}, close: function() {...}, write: function() {...}, writeln: function() {...}, ...}
__FFSend: FFau3.WCD=window.content.top.document;
__FFRecv: [object HTMLDocument] - {f: {...}, location: {...}, getElementsByName: function() {...}, open: function() {...}, close: function() {...}, write: function() {...}, writeln: function() {...}, ...}
[object HTMLDocument] - {f: {...}, location: {...}, getElementsByName: function() {...}, open: function() {...}, close: function() {...}, write: function() {...}, writeln: function() {...}, ...}
_FFConnect: OS:    WIN_10 WIN32_NT 17134 
_FFConnect: AutoIt:    3.3.14.5
_FFConnect: FF.au3:    0.6.0.2b-1
_FFConnect: IP:    127.0.0.1
_FFConnect: Port:    4242
_FFConnect: Delay:     2ms
_FFConnect: Socket:     1116
_FFConnect: Browser:    Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:52.0) Gecko/20100101 Firefox/52.0
__FFSendJavaScripts: Sending functions to FireFox .......... done
True+>08:07:28 AutoIt3.exe ended.rc:0

 

 

Does this mean it worked? 

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

×
×
  • Create New...