Jump to content
Sign in to follow this  
supperfake

how to use FF.au3 in Firefox Portable

Recommended Posts

supperfake

I wonder how to use FF.au3 in Firefox Portable. Do you know how to do that? 

Share this post


Link to post
Share on other sites
Danp2

It shouldn't matter whether you are using a regular or portable version of Firefox as long as the MozRepl plugin is installed and running.

What version of FF are you running where MozRepl is still supported?

Share this post


Link to post
Share on other sites
supperfake
2 hours ago, Danp2 said:

It shouldn't matter whether you are using a regular or portable version of Firefox as long as the MozRepl plugin is installed and running.

What version of FF are you running where MozRepl is still supported?

I use firefox 55.0.2 (64bit)

So What version firefox should I use ? 

Thank you

 

 

Share this post


Link to post
Share on other sites
JLogan3o13

How about explaining what you have tried, and what isn't working for you, rather than the more general "will this work"?

  • Like 1

√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites
Danp2

I think the last Firefox version that supports MozRepl is 54.x. If you want to use a more recent version, then you should check out the WebDriver UDF (see my signature).

  • Like 1

Share this post


Link to post
Share on other sites
supperfake
I tried using firefox 52 and 50. But the _FFStart function does not automatically open a website like IECreate. Why it does not work? Was this function broken?

 

Share this post


Link to post
Share on other sites
Danp2

No way to know why it isn't working with the limited information you've given us. At a minimum --

  • Show us your code
  • Show us the contents of the output panel after running your code in Scite

Share this post


Link to post
Share on other sites
supperfake

Sorry,

Im using firefox portable 50.0 

My simple code is :

#Include <ff.au3>
 _FFStart("http://abc.com")

Then it show me error as follows:

__FFStartProcess ==> General Error: Error reading registry entry for FireFox.
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Mozilla\Mozilla Firefox\*CurrentVersion*\Main\PathToExe
Error from RegRead: 1
_FFConnect: OS:    WIN_7 WIN32_NT 7601 Service Pack 1
_FFConnect: AutoIt:    3.3.14.5
_FFConnect: FF.au3:    0.6.0.2b
_FFConnect: IP:    127.0.0.1
_FFConnect: Port:    4242
_FFConnect: Delay:     2ms
_FFConnect: Socket:     536
_FFConnect: Browser:    Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:50.0) Gecko/20100101 Firefox/50.0
__FFSendJavaScripts: Sending functions to FireFox .......... done
_FFLoadWait: . loaded in 15ms
[object HTMLDocument] - {location: {...}, getElementsByName: function() {...}, open: function() {...}, close: function() {...}, write: function() {...}, writeln: function() {...}, execCommand: function() {...}, ...}
+>02:56:56 AutoIt3.exe ended.rc:0
+>02:56:56 AutoIt3Wrapper Finished.
>Exit code: 0    Time: 2.27

I don't understand about that. Help me...

Share this post


Link to post
Share on other sites
supperfake

I see the problem in ff.au3 

Func __FFStartProcess($sURL = "about:blank", $bNewWin = False, $sProfile = "default", $bNoRemote = False, $bHide = False, $iPort = 4242, $iTimeOut = 30000)
    Local Const $sFuncName = "__FFStartProcess"
        Local $PID = -1
    Local $sNoRemote = "", $sNewWin
    Local $sProcName = $_FF_PROC_NAME
        If $sProfile = "default" Then
        $sProfile = ''
    Else
        $sProfile = ' -P "' & $sProfile & '"'
    EndIf
    If $bNoRemote Then $sNoRemote = "-no-remote"
    If $bNewWin Then $sNewWin = "-new-window"
    $sURL = '"' & $sURL & '"'
    If $iTimeOut < 2000 Then $iTimeOut = 2000
    
    Local $sHKLM = 'HKEY_LOCAL_MACHINE\SOFTWARE\'
       If @OSArch <> 'X86' Then $sHKLM &= 'Wow6432Node\'
       $sHKLM &= 'Mozilla\Mozilla Firefox'
    -------------------------------------------------------------------------
       Local $sFFExe = RegRead($sHKLM & "\" & RegRead($sHKLM, "CurrentVersion") & "\Main", "PathToExe")
       If @error Then
       SetError(__FFError($sFuncName, $_FF_ERROR_GeneralError, "Error reading registry entry for FireFox." & @CRLF & _
        $sHKLM&"\*CurrentVersion*\Main\PathToExe" & @CRLF & _
        "Error from RegRead: " & @error))
    -----------------------------------------------------------------------------
        Return 0
       EndIf

I use firefox portable . So  it show err "Error reading registry entry for FireFox". What do I need to do to resolve it??

I see the problem in ff.au3 

Func __FFStartProcess($sURL = "about:blank", $bNewWin = False, $sProfile = "default", $bNoRemote = False, $bHide = False, $iPort = 4242, $iTimeOut = 30000)
    Local Const $sFuncName = "__FFStartProcess"
        Local $PID = -1
    Local $sNoRemote = "", $sNewWin
    Local $sProcName = $_FF_PROC_NAME
        If $sProfile = "default" Then
        $sProfile = ''
    Else
        $sProfile = ' -P "' & $sProfile & '"'
    EndIf
    If $bNoRemote Then $sNoRemote = "-no-remote"
    If $bNewWin Then $sNewWin = "-new-window"
    $sURL = '"' & $sURL & '"'
    If $iTimeOut < 2000 Then $iTimeOut = 2000
    
    Local $sHKLM = 'HKEY_LOCAL_MACHINE\SOFTWARE\'
       If @OSArch <> 'X86' Then $sHKLM &= 'Wow6432Node\'
       $sHKLM &= 'Mozilla\Mozilla Firefox'
    -------------------------------------------------------------------------
       Local $sFFExe = RegRead($sHKLM & "\" & RegRead($sHKLM, "CurrentVersion") & "\Main", "PathToExe")
       If @error Then
       SetError(__FFError($sFuncName, $_FF_ERROR_GeneralError, "Error reading registry entry for FireFox." & @CRLF & _
        $sHKLM&"\*CurrentVersion*\Main\PathToExe" & @CRLF & _
        "Error from RegRead: " & @error))
    -----------------------------------------------------------------------------
        Return 0
       EndIf

I use firefox portable . So  it show err "Error reading registry entry for FireFox". What do I need to do to resolve it??

Share this post


Link to post
Share on other sites
supperfake

 I run your code. But nothing happens. And no error show in contents of the output panel after running your code. Maybe I should use  WebDriver instead of firefox.au3. Thank you

Share this post


Link to post
Share on other sites
Danp2

As previously stated --

16 hours ago, Danp2 said:

No way to know why it isn't working with the limited information you've given us. At a minimum --

  • Show us your code
  • Show us the contents of the output panel after running your code in Scite

 

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
Sign in to follow this  

×