Rickname Posted September 29, 2014 Posted September 29, 2014 (edited) Post your code, please. The problem with the private Window I have resolved. But the function _FFWindowOpen still doesn't returns the Handle of the opened window. Just 0x000000 #include "FF.au3" _FFConnect(default,Default,6000) _FFWindowOpen("http://www.youtube.com", True, True) Edited September 29, 2014 by Rickname
Danp2 Posted September 29, 2014 Posted September 29, 2014 (edited) How are you checking? According to the function header for _FFWindowOpen, @Extended is supposed to hold the window handle. Edited September 29, 2014 by Danp2 Latest Webdriver UDF Release Webdriver Wiki FAQs
MikahS Posted September 29, 2014 Posted September 29, 2014 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 ~ getENVvarsMy 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
Rickname Posted September 29, 2014 Posted September 29, 2014 (edited) 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 September 30, 2014 by Rickname
MikahS Posted September 29, 2014 Posted September 29, 2014 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 ~ getENVvarsMy 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
Rickname Posted September 29, 2014 Posted September 29, 2014 (edited) 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 September 29, 2014 by Rickname
MikahS Posted September 29, 2014 Posted September 29, 2014 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 ~ getENVvarsMy 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
Rickname Posted September 29, 2014 Posted September 29, 2014 (edited) 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 September 30, 2014 by Rickname
MikahS Posted September 30, 2014 Posted September 30, 2014 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(). Rickname 1 Snips & Scripts My Snips: graphCPUTemp ~ getENVvarsMy 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
Rickname Posted September 30, 2014 Posted September 30, 2014 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...
MikahS Posted September 30, 2014 Posted September 30, 2014 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 ~ getENVvarsMy 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
AutoFan Posted October 2, 2014 Posted October 2, 2014 (edited) Can I disable/enable/install/remove addon using FF.au3 UDF ? Edited October 2, 2014 by AutoFan
Rickname Posted October 3, 2014 Posted October 3, 2014 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 !
david678 Posted October 16, 2014 Posted October 16, 2014 Does there any method to add/modify cookies in Firefox via FF.au3? Thanks!
Rickname Posted October 21, 2014 Posted October 21, 2014 (edited) 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 ! Edited October 21, 2014 by Rickname
MikahS Posted October 21, 2014 Posted October 21, 2014 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 ~ getENVvarsMy 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
Rickname Posted October 21, 2014 Posted October 21, 2014 (edited) 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 ! Edited October 21, 2014 by Rickname
MikahS Posted October 22, 2014 Posted October 22, 2014 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 ~ getENVvarsMy 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
Rickname Posted October 22, 2014 Posted October 22, 2014 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
sjx Posted October 23, 2014 Posted October 23, 2014 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?
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now