Jump to content

FF.au3 (V0.6.0.1b-10)


Stilgar
 Share

Recommended Posts

Return Value ..: Success      - 1 and sets
;                  @EXTENDED    - Window handle
;                  Failure      - 0 and sets
;                  @ERROR       -
;                  @EXTENDED    - ""

_FFWindowOpen("http://www.youtube.com", True, True)
MsgBox(0, "", @extended)

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

Return Value ..: Success      - 1 and sets
;                  @EXTENDED    - Window handle
;                  Failure      - 0 and sets
;                  @ERROR       -
;                  @EXTENDED    - ""
_FFWindowOpen("http://www.youtube.com", True, True)
MsgBox(0, "", @extended)

Yes I tested it now and its returning 0 for me but the browser window appears and is working well but it doesn't retrieveing the handle o.O

Anyways if its a problem only for me but it works good for the others... I will investigate further...

Edited by Rickname
Link to comment
Share on other sites

Yes I tested it now and its returning 0 for me but the browser window appears and is working well but it doesn't retrieveing the handle o.O

Anyways if its a problem only for me but it works good for the others... I will investigate further...

 

Hm. See if you can get the handle to the window after the fact with _FFWindowGetHandle().

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

Hm. See if you can get the handle to the window after the fact with _FFWindowGetHandle().

I have tried, it works but if I start the window hidden or without being activated, it results in 0

Im wondering if you have the same problem. Have you tried it ? Is it showing in the Console the handle of the opened window ?

Edited by Rickname
Link to comment
Share on other sites

Try using _FFStart(), I am not at the office and am on a small net book. I will give this a try when I get back to the office ;)

_FFStart([$sURL = "about:blank"[, $sProfile = "default"[, $iMode = 1[, $bHide = False[, $IP = "127.0.0.1"[, $iPort = 4242]]]]]])

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

Well _FFStart returns only the PID of the process who has the new window. I can do a thing to find the handle by listing all the associated windows of the process by PID, but Im not sure if this will work when the window is started hidden...

Good luck at your office tho ;)

Edited by Rickname
Link to comment
Share on other sites

Well _FFStart returns only the PID of the process who has the new window. I can do a thing to find the handle by listing all the associated windows of the process by PID, but Im not sure if this will work when the window is started hidden...

Good luck at your office tho ;)

 

Same result as you got in @extended. Successfully navigated to the page, but no window handle for @extended

Return Value ..: Success      - 1 and sets
;                  @EXTENDED    - Window handle

Not sure if it is my lack of knowledge for FF functions, but it seems like it is not correctly setting the window handle in the return value for _FFWindowOpen().

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

Same result as you got in @extended. Successfully navigated to the page, but no window handle for @extended

Return Value ..: Success      - 1 and sets
;                  @EXTENDED    - Window handle

Not sure if it is my lack of knowledge for FF functions, but it seems like it is not correctly setting the window handle in the return value for _FFWindowOpen().

Exactly. I had this problem like since long time ago, and I see noone fixed it >.< I will try to fix the function myself and post it here if I resolve something...

Link to comment
Share on other sites

Exactly. I had this problem like since long time ago, and I see noone fixed it >.< I will try to fix the function myself and post it here if I resolve something...

 

I will look into it as well, but do not have extensive experience so I doubt I will be the one to fix it :)

Good luck ;)

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

Can I disable/enable/install/remove addon using FF.au3 UDF ?

 

Theres no special function in the UDF to do this, but I think you can command Firefox to do this via the _FFCmd() function. But since I don't know Javascript language, I don't know whats the command to make the browser to disable/enable/install/remove the addon. Sure someone will know !

Link to comment
Share on other sites

  • 2 weeks later...

Does there any method to add/modify cookies in Firefox via FF.au3?

Thanks!

Have a look: >link

Does anybody knows what this function does ?? :

__FFSetTopDocument()

I have seen it appearing many times in the FF.au3 UDF >.< and has no visual effect when run !

 

That's because:

Internal function __FFSetTopDocument()

as you can see it is an internal 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

Have a look: >link

 

That's because:

Internal function __FFSetTopDocument()

as you can see it is an internal function.

Hey, thanks for replying :)

I saw it is an internal function, but I dont understand what it does more exactly, why is it needed there ? For example in the _FFLoadWait function :

Func _FFLoadWait($iTimeOut = $_FF_LOADWAIT_TIMEOUT, $bStop = $_FF_LOADWAIT_STOP)
    Local Const $sFuncName = "_FFLoadWait"

    Local $iLoadingTime = 0
    If $iTimeOut < 1000 Then $iTimeOut = 1000

    Local $bTrace = $_FF_COM_TRACE
    $_FF_COM_TRACE = False

    If Not $_FF_COM_TRACE Then ConsoleWrite("_FFLoadWait: ")

    Local $TimeOutTimer = TimerInit()

    While TimerDiff($TimeOutTimer) < $iTimeOut
        If Not $_FF_COM_TRACE Then ConsoleWrite(".")
        If _FFCmd("FFau3.tmp=window.getBrowser().webProgress;FFau3.tmp.isLoadingDocument && FFau3.tmp.busyFlags ? false: true;") Then
            $iLoadingTime = Round(TimerDiff($TimeOutTimer))
            ConsoleWrite(" loaded in " & $iLoadingTime & "ms" & @CRLF)
            Sleep($_FF_CON_DELAY * 1.4)
            __FFSetTopDocument()
            $_FF_COM_TRACE = $bTrace
            Return SetError(0, $iLoadingTime - $_FF_CON_DELAY * 1.4, 1)
        EndIf
        Sleep(250)
    WEnd

    If $bStop Then _FFAction("stop")

    __FFSetTopDocument()
    $_FF_COM_TRACE = $bTrace
    ConsoleWrite(@CRLF & @CRLF)

    Return SetError(__FFError($sFuncName, $_FF_ERROR_Timeout, "Can not check site status."), $iLoadingTime, 0)
EndFunc   ;==>_FFLoadWait

Im asking because I import line of code by line of code those functions in my program and I want to be as less complicated, practical, and small as possible, so I want to get rid of those useless calls of this __FFSetTopDocument() function, but Im not sure if is it vital or not >.<

Thanks in advance ! :sweating:

Edited by Rickname
Link to comment
Share on other sites

Well, have a try with not having those function calls in the function that you would like to use, and see if it still functions as it normally would.

But, I think this __FFSetTopDocument() just sets the document at the top of the current page.

Func __FFSetTopDocument()
    $_FF_FRAME = 'top'
    __FFSend("FFau3.WCD=window.content.top.document;")
    Local $sRet = __FFRecv(2000)
    ConsoleWrite($sRet & @CRLF)
    Return
EndFunc   ;==>__FFSetTopDocument

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

 

Well, have a try with not having those function calls in the function that you would like to use, and see if it still functions as it normally would.

But, I think this __FFSetTopDocument() just sets the document at the top of the current page.

Func __FFSetTopDocument()
    $_FF_FRAME = 'top'
    __FFSend("FFau3.WCD=window.content.top.document;")
    Local $sRet = __FFRecv(2000)
    ConsoleWrite($sRet & @CRLF)
    Return
EndFunc   ;==>__FFSetTopDocument

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

Link to comment
Share on other sites

What's the best way to download a file specified by a url using firefox? Is there a FF function similar to InetGet?

or

a more advanced question, how to parse FF cache so I can retrieve a file that is already in FF cache?

 

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