Jump to content

FF.au3 (V0.6.0.1b-10)


Stilgar
 Share

Recommended Posts

Yea I have tried the function without calling __FFSetTopDocument and it works with no difference !

Also I have tried alone the __FFSetTopDocument function on a visible down-scrolled webpage, and absolutely no effect it has ! It doesn't scroll the page up to the top. Thats why I was asking here about it, since I see its so useless..lol

 

I think the author is the only one that will be able to give us a clue on that function ;)

Snips & Scripts


My Snips: graphCPUTemp ~ getENVvars
My Scripts: Short-Order Encrypter - message and file encryption V1.6.1 ~ AuPad - Notepad written entirely in AutoIt V1.9.4

Feel free to use any of my code for your own use.                                                                                                                                                           Forum FAQ

 

Link to comment
Share on other sites

Hello,

Can anyone guide me to use this UDP to enable/disable addon in Firefox based on this concept : http://stackoverflow.com/questions/8429185/how-to-enable-disable-forefox-addon-using-javascript ?

Since I don't know Java (yet:) ) I don't know the command to enable/disable an addon, but the idea is this : send a javascript command to mozrepl to do it via _FFCmd :)

Edited by Rickname
Link to comment
Share on other sites

  • 3 weeks later...

Have a look at post #1 of this thread.

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

  • 2 weeks later...

I was getting an error in _FFStart() and it looks to me that in  __FFStartProcess there's a missing "".

$sHKLM &= 'Mozilla\Mozilla Firefox'
->
$sHKLM &= 'Mozilla\Mozilla Firefox\'
...
$sHKLM & "\*CurrentVersion*\Main\PathToExe" & @CRLF & _
->
$sHKLM & "*CurrentVersion*\Main\PathToExe" & @CRLF & _

I have 0.6.0.1b-10, WXP and can't see how this hasn't been found already. Someone please check.

Edited by RichardL
Link to comment
Share on other sites

Here's my latest rendition of FF.au3, which I'm calling b14. This takes the most recent updates from Stilgar and applies the following updates:

    V0.6.0.1b-14 (by Danp2)
    - Changed: _FFWindowOpen to allow private browsing
    - Changed: _FFWindowGetHandle to improve functionality
    - Fixed: _FFTableWriteToArray
    - Fixed: __FFStartProcess
    - Fixed: __FFWaitForRepl
 

Let me know if you run into any issues with this update.

Happy Thanksgiving!

Dan

FF V0.6.0.1b-14.au3

Link to comment
Share on other sites

  • 1 month later...

I had to insert this line near 2325 (Func _FFCmd...):

    Local $sRet="??FF??"

to make version "FF V0.6.0.1b-14.au3" run.

It works now, but though I get errormessages:

__FFSend ==> Socket Error
_FFCmd ==> Error return value: ??FF??
__FFSend ==> Socket Error
_FFCmd ==> Error return value: ??FF??
_FFFrameEnter ==> Invalid value: Frame not found $vFrame: 0
__FFSend ==> Socket Error
_FFCmd ==> Error return value: ??FF??
__FFSend ==> Socket Error
_FFCmd ==> Error return value: ??FF??
__FFStartProcess: ""C:\Program Files (x86)\Mozilla Firefox\firefox.exe" -new-window "about:blank"  "-repl 4242 "

(Win 7)

Link to comment
Share on other sites

Yes I did.

But stil an error, just without text:

__FFSend ==> Socket Error
_FFCmd ==> Error return value
__FFSend ==> Socket Error
_FFCmd ==> Error return value
_FFFrameEnter ==> Invalid value: Frame not found $vFrame: 0
__FFSend ==> Socket Error
_FFCmd ==> Error return value
__FFSend ==> Socket Error
_FFCmd ==> Error return value
__FFStartProcess: ""C:\Program Files (x86)\Mozilla Firefox\firefox.exe" -new-window "about:blank"  "-repl 4242 "

(so I intentionally stick to the assignement to remember my "improvement." Bad idea?)

Link to comment
Share on other sites

Version  10 raises several errors:

"C:\Program Files (x86)\AutoIt3\Include\FF.au3"(3906,303) : error: syntax error
    Return StringRegExp($IP, $sStart & '(25[... /snip/ ....  [0-9]{1}|[0-9])' & $sEnd) Or_
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
"C:\Program Files (x86)\AutoIt3\Include\FF.au3"(3907,82) : error: Statement cannot be just an expression.

After repairing ("or_" to "or _" 4 times) script ist running sucessfully (as before), but stil the same errors (as before):

__FFSend ==> Socket Error
_FFCmd ==> Error return value
__FFSend ==> Socket Error
_FFCmd ==> Error return value
_FFFrameEnter ==> Invalid value: Frame not found $vFrame: 0
__FFSend ==> Socket Error
_FFCmd ==> Error return value
__FFSend ==> Socket Error
_FFCmd ==> Error return value
_FFConnect: OS:    WIN_7 WIN32_NT 7601 Service Pack 1
_FFConnect: AutoIt:    3.3.12.0
_FFConnect: FF.au3:    0.6.0.1b-10
_FFConnect: IP:    127.0.0.1
_FFConnect: Port:    4242
__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: Delay:     2ms
_FFConnect: Socket:     520
_FFConnect: Browser:    Mozilla/5.0 (Windows NT 6.1; WOW64; rv:34.0) Gecko/20100101 Firefox/34.0
__FFSendJavaScripts: Sending functions to FireFox .......... done
_FFLoadWait: . loaded in 10ms

But script works properly.

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_MACHINESOFTWAREMozillaMozilla Firefox*CurrentVersion*MainPathToExe

 

I am not good at english

edit func __FFStartProcess :

 

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

   $r = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\mozilla.org\Mozilla", "CurrentVersion")
   $r1 = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Mozilla\Mozilla Firefox "&$r&"\bin", "PathToExe")

    Local $sFFExe = $r1
    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

    ; Updated per http://www.autoitscript.com/forum/topic/95595-ffau3-v0600b/page__st__380#entry958812
    Local $sCommand = StringFormat('"%s" %s %s %s "-repl %i %s"', $sFFExe, $sNewWin, $sURL, $sNoRemote, $iPort, $sProfile)
    $PID = Run($sCommand)
    If $bHide Then BlockInput(1)

    Local $iTimeOutTimer = TimerInit()
    While 1
        Sleep(2000)
        If ProcessExists($sProcName) Then ExitLoop
        If (TimerDiff($iTimeOutTimer) > $iTimeOut) Then
            SetError(__FFError($sFuncName, $_FF_ERROR_Timeout, "Browser process not exists: " & $sProcName))
            BlockInput(0)
            Return 0
        EndIf
    WEnd

    If $bHide Then
        Local $WINTITLE_MATCH_MODE = AutoItSetOption("WinTitleMatchMode", 4)
        WinWaitActive("[CLASS:MozillaUIWindowClass]")
        Sleep(500)
        WinSetState("[CLASS:MozillaUIWindowClass]", "", @SW_MINIMIZE)
        BlockInput(0)
        AutoItSetOption("WinTitleMatchMode", $WINTITLE_MATCH_MODE)
    Else
        Sleep(1000)
    EndIf

    If $_FF_COM_TRACE Then ConsoleWrite('__FFStartProcess: "' & $sCommand & @CRLF)

    SetExtended($PID)
    Return 1
EndFunc   ;==>__FFStartProcess
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...