MikahS Posted October 23, 2014 Posted October 23, 2014 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 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
AutoFan Posted October 24, 2014 Posted October 24, 2014 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 ?
Rickname Posted October 25, 2014 Posted October 25, 2014 (edited) 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 October 25, 2014 by Rickname AutoFan 1
timothy855 Posted November 9, 2014 Posted November 9, 2014 How do I download the FF.au3 UDF? Like I'm not finding the link...
water Posted November 9, 2014 Posted November 9, 2014 Have a look at post #1 of this thread. My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.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 (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
RichardL Posted November 24, 2014 Posted November 24, 2014 (edited) 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 November 24, 2014 by RichardL
Danp2 Posted November 24, 2014 Posted November 24, 2014 It's a >known issue. Latest Webdriver UDF Release Webdriver Wiki FAQs
RichardL Posted November 24, 2014 Posted November 24, 2014 Ah, thanks. I did look first, but search was too narrow.
try67 Posted November 27, 2014 Posted November 27, 2014 What happened to _FFGetTitle? Anyone know how I can get the title of the currently active tab?
Danp2 Posted November 27, 2014 Posted November 27, 2014 The function is actually _FF_GetTitle, and it's located in FFEx.au3. Latest Webdriver UDF Release Webdriver Wiki FAQs
try67 Posted November 27, 2014 Posted November 27, 2014 I managed without it, but thanks for the info, anyway...
Danp2 Posted November 27, 2014 Posted November 27, 2014 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 benlein 1 Latest Webdriver UDF Release Webdriver Wiki FAQs
TomSirler Posted January 7, 2015 Posted January 7, 2015 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)
Danp2 Posted January 7, 2015 Posted January 7, 2015 Looks like the local declaration of $sRet got removed after the b10 release. Have you tried just declaring the variable without assigning it a value to see if that fixes your issue? Latest Webdriver UDF Release Webdriver Wiki FAQs
TomSirler Posted January 7, 2015 Posted January 7, 2015 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?)
Danp2 Posted January 7, 2015 Posted January 7, 2015 You shouldn't be receiving the socket error from __FFSend. Do you have MozRepl installed / started? Does your script run properly if you use the b10 version of FF.au3? Latest Webdriver UDF Release Webdriver Wiki FAQs
TomSirler Posted January 8, 2015 Posted January 8, 2015 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.
Danp2 Posted January 8, 2015 Posted January 8, 2015 Please post a short script that demonstrates the issue. Latest Webdriver UDF Release Webdriver Wiki FAQs
DuyAnh Posted January 9, 2015 Posted January 9, 2015 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 : expandcollapse popupFunc __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
Danp2 Posted January 9, 2015 Posted January 9, 2015 @DuyAnh, You replied to a very old post. I believe this issue has already been fixed in one of the later beta versions. FWIW, I don't believe that your code will work properly as written. because you've added a line between the RegRead and the @error check. Regards, Dan Latest Webdriver UDF Release Webdriver Wiki FAQs
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