Jump to content

Search the Community

Showing results for tags 'FF.au3'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Announcements and Site News
    • Administration
  • AutoIt v3
    • AutoIt Help and Support
    • AutoIt Technical Discussion
    • AutoIt Example Scripts
  • Scripting and Development
    • Developer General Discussion
    • Language Specific Discussion
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • AutoIt Team
    • Beta
    • MVP
  • AutoIt
    • Automation
    • Databases and web connections
    • Data compression
    • Encryption and hash
    • Games
    • GUI Additions
    • Hardware
    • Information gathering
    • Internet protocol suite
    • Maths
    • Media
    • PDF
    • Security
    • Social Media and other Website API
    • Windows
  • Scripting and Development
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Member Title


Location


WWW


Interests

Found 25 results

  1. This is for those pages that seem to load when you use _FFOpenURL(), but they have a text saying "please wait while we load your page..." but according to _FFOpenURL() the page has loaded. An example seen in popular sites is the Cloudflare page saying "Checking your browser before...". It's the opposite of pausing a script until an element is visible on a page. It takes Elements in the form of id, xpath or text search. Global $BrowserPort = 4242 Global $TimeOut = 60000 Global $LocalHost = "127.0.0.1" Func _FFWaitWhileElement($thiselement, $elementtype = "xpath", $timeoutms = 60000) _FFConnect($LocalHost, $BrowserPort, $TimeOut) Local $Element Local $ElementFound = 1 Local $TimeoutCountdown = 0 While $ElementFound <> 0 And $TimeoutCountdown < $timeoutms If $elementtype = "xpath" Then $Element = _FFXPath($thiselement) EndIf If $elementtype = "id" Then Local $ConstructXPath = ".//*[@id='" & $thiselement & "']" $Element = _FFXPath($ConstructXPath) EndIf ; MsgBox(0, "", $Element) Local $ElementXPathTextContent = _FFCmd("FFau3.xpath.textContent") ; MsgBox(0, "", $ElementXPathTextContent) Local $ElementXPathInnerHTML = _FFCmd("FFau3.xpath.innerHTML") ; MsgBox(0, "", $ElementXPathInnerHTML) If $ElementXPathTextContent = "_FFCmd_Err" Or $ElementXPathInnerHTML = "_FFCmd_Err" Then $ElementFound = 0 Else $ElementFound = 1 EndIf If $elementtype = "text" Then $ElementFound = _FFSearch($thiselement) ; MsgBox(0, "", $ElementFound) EndIf $TimeoutCountdown += 1000 _FFDisConnect() _FFConnect($LocalHost, $BrowserPort, $TimeOut) WEnd Return $ElementFound EndFunc _FFConnect($LocalHost, $BrowserPort, $TimeOut) _FFOpenURL("https://www.site.com/page", True) _FFWaitForElement("Please Wait...","text", 60000) MsgBox(0,"","Page finished loading") It's pretty simple, hope it helps some of you who are working with FF.au3 :)
  2. my FF.au3 does get included but my script does not open firefox. here is my code so far: #include <FF.au3> _FFStart("https://www.google.com", Default, 0) I am using firefox portable version 52.0 Any and all help would be greatly appreciated. The code runs but nothing happens. I think the FF.au3 cannot find or connect to the firefox portable.
  3. Hello Experts, I am working on modifying table data of a browser currently in IE (soon in FF) My sequence of operations: 1. Activate Browser 2. Get Browser table 3. Modify data in table 4. Suppress any warning/error message from webpage 5. Activate the Webpage again 6. Send {F11} key sequence twice to achieve some update without Updating form ( {F5}) My problem is at Step 5, as it activates the wrong window ( last used application rather than my browser window) My code snippet for it as follows $bFoundWindow = False Local $aList = WinList("[REGEXPTITLE:(?i)(.*Internet Explorer.*)]") Local $hWND = 0 For $i = 1 To $aList[0][0] If False = $bFoundWindow And $aList[$i][0] <> "" And BitAND(WinGetState($aList[$i][1]), 1) Then WinActivate($aList[$i][1]) ; 1. Activate Browser window WinSetState ( $aList[$i][1], "", @SW_MAXIMIZE) $hWND = $aList[$i][1] $objEditIE = _IEAttach ($aList[$i][1], "hwnd") $oTitles = _IETagNameGetCollection($objEditIE, "TITLE") For $oTitle In $oTitles $sTitle = $oTitle.innerText If $sTitle = $searchString Then MsgBox(0,"APPLICATION Found", "Got Edit List Window", 1) $bFoundWindow = True ExitLoop EndIf Next EndIf Next If False = $bFoundWindow Then MsgBox(0,"Error","Please launch Edit window for updating values in Browser prior to script execution",10) Exit EndIf ; MY CODE HERE TO MODIFY TABLE ; 2. Get Browser table ; 3. Modify data  in table ; Check if message from webpage pop-up window exists if so click ok on it Local $nCounter = 0 Local $nMaxCounter = 5 while 1 If WinExists("Message from webpage","") Then ControlClick("Message from webpage","","Button1","primary",1) ;4. Suppress any warning/error message from webpage Else $nCounter = $nCounter + 1 Sleep(100) ;MsgBox(0,"Counter", $nCounter, 1) If $nCounter = $nMaxCounter Then ExitLoop EndIf WEnd ;5. Activate the Webpage again  WinActivate($hWND) ; have already tried WinActivate($aList[$i][1]) but no success ;6. Send {F11} key sequence twice to achieve some update without Updating form ( {F5}) Send("{F11}") WinActivate($hWND) ;WinActivate($aList[$i][1]) Sleep(100) Send("{F11}") Any support will be highly appreciated
  4. I am using FF.au3, Since its proprietary I can't share image or link for the data I am using. But here is my problem abstract code . ; Test if I get table contents correctly ;$sCurr= _FFXPath("/html/body/form[1]/div[2]/div[3]/div[2]/table[@id='bodyTable']/tbody/tr[3]/td[4]", "textContent") ;MsgBox(0, "Current Value ", $sCurr, 2) ; output " -254.4" $sObj = _FFXPath("/html/body/form[1]/div[2]/div[3]/div[2]/table[@id='bodyTable']/tbody/tr[3]/td[4]") MsgBox(0, "Object", $sObj, 2) ; output "OBJECT|FFau3.xpath" $sRet = _FFObj($sObj, "value", "-253.4") MsgBox(0, "Return Value", $sRet); output " -253.4" $s = _FFXPath("/html/body/form[1]/div[2]/div[3]/div[2]/table[@id='bodyTable']/tbody/tr[3]/td[4]", "textContent") MsgBox(0, "New Value", $s); output " -254.4" My expectation is that that last MsgBox shows new value that I had set that is "-253.4" I would highly appreciate any support on this
  5. Hello. We work with the BMC Remedy site to manage incidents and would like to automate the processes of clicking through this button code: <a href="javascript:" class="btn btn3d menu" style="top:21; left:184; width:21; height:21;"> <img class="btnimg" src="../../../../resources/images/mt_sprites.gif" alt="menu category issue" title=""> </a> I use firefox with mozrepl and autoit with include FF.au3 I need your help I read the topic https://www.autoitscript.com/forum/topic/95595-ffau3-v0601b-10/ but I could not run the code from the listed commands ... It is necessary to press the button and from the list of the menu of cahorsations to select the item = "zone of trust abonent" Screen # 1 http://joxi.ru/52aJK7bh4a7ypA or below. 1) Press button <a href="javascript:" class="btn btn3d menu" style="top:21; left:184; width:21; height:21;"> <img class="btnimg" src="../../../../resources/images/mt_sprites.gif" alt="menu category issue" title=""> </a> 2) After pressing the button, I need to choose in this menu of 4 items to select an item called "zone of trust abonent", Screen # 2 - http://joxi.ru/p27gwQKHo71VQ2 html code table items <table class="MenuTable" cellpadding="0" cellspacing="0" style="width: 179px;"> <tbody class="MenuTableBody"> <tr class="MenuTableRow"> <td class="MenuEntryName" nowrap="">zone of trust abonent</td> <td class="MenuEntryNoSub" arvalue="zone of trust abonent"></td> </tr> <tr class="MenuTableRow"><td class="MenuEntryName" nowrap="">zone of trust operator</td> <td class="MenuEntryNoSub" arvalue="zone of trust operator"></td> </tr> <tr class="MenuTableRow"><td class="MenuEntryName" nowrap="">zone of trust third operator</td> <td class="MenuEntryNoSub" arvalue="zone of trust third operator"></td></tr> <tr class="MenuTableRow"><td class="MenuEntryNameHover" nowrap="">No settings</td> <td class="MenuEntryNoSubHover" arvalue="No settings"></td> </tr> </tbody> </table> More in detail, I choose from the menu item "zone of trust abonent" Screen # 3 - http://joxi.ru/GrqVq4ZIQEPW4m 3) The choice is made, Screen # 4 http://joxi.ru/v297w6aC3PovLr <textarea class="text sr " wrap="off" id="arid_WIN_0_1000002488" cols="20" maxlen="60" style="top:21; left:0; width:179; height:21;" armenu="CFG:PRC:CategoryHPD-Res-T1-Q" mstyle="2" arautoc="1" arautocmb="1" arautocak="0" arautoctt="400" rows="1"> </textarea> It's all. I would be very grateful to you =) !!!!!!!!!! Here are more detailed codes in the attachment. button1.txt menu - table.txt all.txt
  6. How can I check if element is focused in Firefox using FF.au3 UDF? This is my try: I have prepared a function that checks if the object is focused: _FFCmd('FFau3.isfocused=function isfocused(a){try{return (a === document.activeElement)}catch(e){return}}') $oElm = _FFXPath("//*[@id='someId']") ConsoleWrite(_FFIsFocused($oElm)) Func _FFIsFocused($sElement = "") Local $isFoc = _FFCmd("FFau3.isfocused(" & $sElement & ")") Return $isFoc EndFunc ;==>_FFIsFocused Now, the javascript part is tested and it does return successfully. After a lot of try/fails I inserted an alert box in order to display the object being compared. Here is what I got The focused object is: [object XULElement] The object that I send for comparing is [object HTMLInputElement] Why is that?
  7. I'm trying to determine the latest/easiest/best way (as of May 2016) to control & interact with Firefox using Autoit. To the best I've been able to determine, there have been two different ways to do this. Once upon a time, there was something called "Mozilla ActiveX control", but given all the security warnings I receive whenever I try to download it (the original host site appears to be absent or invalid), I'd prefer to avoid it. The other approach is/was to use a UDF called "FF.au3" developed -- but apparently no longer supported for English speakers -- by Stilgar (old thread is here: https://www.autoitscript.com/forum/topic/95595-ffau3-v0601b-10/). The most recent thread I could find (in English) was started by Danp2 here: https://www.autoitscript.com/forum/topic/167661-ffau3-v0601b-15/ Although it certainly seems like using the FF UDF is the most recent and possibly only still-valid approach, getting anything sufficiently useful done with it strikes me as rather difficult, in part because the English documentation is so incomplete as to be unhelpful (and apparently incorrect as well), but also because it appears that to accomplish what I need to do might well require intimate knowledge of Firefox internals or APIs (maybe XULs too). For example, there are functions such as _FFCmd() that takes arbitrary/undocumented strings, and _FFGetValue() and_FFSetValue() with no English documentation at all (besides the minimal function descriptions in the FF.au3 file itself). So, my question is: What is the latest and/or easiest and/or best way of interacting with Firefox using Autoit? And what else do I need to learn first in order to use it effectively (such as Firefox developer APIs, etc)? Thanks!
  8. I have 2 exe file (autoit's compiled script) running. Both are using FF.AU3. When 1 of the script execute _FFQuit() command, why does it close both firefox browser? Shouldn't it only close it's own firefox and left the other firefox untouchable? Thanks!
  9. I'm trying to automate login on this site in the last few days, and I have to admit it drive me crazy. Seems like there is no solution. The site is rumah123 dot com Click on the "Login atau Daftar" link at top right screen. (I am using this code that work beautifully to click on that link): $oInput = _FFXPath('//*[@data-target="#LoginAgentModal"]') Sleep(250) _FFDispatchEvent($oInput, 'keypress', 13) A login form will displayed. The problem no matter what code I tried, it can not fill the "username" and "password" part. Tried these without success: _FFXPath('//input[@id="username"]') _FFCmd("FFau3.xpath.value='me@me.com'") _FFSetValue("me@me.com", "username", "id") _FFSetValue("$me@me.com", "username", "name") Tried also with SEND command, but the SEND command is very not reliable: sometime it works, sometime not: BlockInput(1) Sleep(500) WinActivate("[CLASS:MozillaWindowClass]", "") Sleep(50) For $a = 1 to 5 Sleep(50) Send("{TAB}") Next Sleep(50) Send($Username[1]) Sleep(50) Send("{TAB}") Sleep(50) Send($Password[1]) Sleep(50) Send("{TAB}") Sleep(50) Send("{SPACE}") BlockInput(0) Is there is any way to automate this kind of form/site using FF.AU3 ? Thanks a lot!
  10. Examples Is it possible for ff.au3 or Autoit to pause the script if Firefox crashes? The script I am working on opens and closes a series of random URLs taken from an array. If I close FF simulating a crash I get this error (taken from the SciTE log): __FFWaitForRepl ==> MozRepl Exception: !!! [Exception... "Failure" nsresult: "0x80004005 (NS_ERROR_FAILURE)" Or this, depending on when I close FF _FFCmd ==> Error return value .__FFSend ==> Error TCPSend / TCPRecv: TCPSend: try{FFau3.tmp=window.getBrowser().webProgress;FFau3.tmp.isLoadingDocument && FFau3.tmp.busyFlags ? false: true;}catch(e){'_FFCmd_Err';}; Or both, right in the order I reported them. Can you help me?
  11. I'd skip of firefox timeout. Please, Can you tell me,
  12. Hello. I need to execute this script var i; var select = document.getElementById("test"); for(i=1;i<select.options.length;i++) { select.options[i].selected=false; }Using autoit with FF.au3. I tried using it like - _FFCmd('var i;var select = document.getElementById("test");for(i=1;i<select.options.length;i++) { select.options[i].selected=false;}');But it doesn't work. _FFConnect: AutoIt: 3.3.14.1 _FFConnect: FF.au3: 0.6.0.1b-15 _FFConnect: IP: 127.0.0.1 _FFConnect: Port: 4242 _FFConnect: Delay: 2ms _FFConnect: Socket: 696 _FFConnect: Browser: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:42.0) Gecko/20100101 Firefox/42.0 __FFSendJavaScripts: Sending functions to FireFox .......... done __FFSend: try{var i;var select = document.getElementById("test");for(i=1;i<select.options.length;i++) { select.options[i].selected=false;}}catch(e){'_FFCmd_Err';}; __FFRecv: _FFCmd_ErrIf I paste it manually into firebug it works. I need to reset two selects inside a form on page but_FFFormReset() sometimes doesnt work for me. Thank you in advance and best regards
  13. #include <ImageSearch.au3> #include <AutoItConstants.au3> #RequireAdmin #Include <FF.au3> If _FFConnect () Then ;_FFWindowOpen("http://www.geopostcodes.com/",True,True) _FFTabAdd( "http://www.geopostcodes.com/USA") ;WinWaitActive("Postal and ZIP Code database - GeoPostcodes - Mozilla Firefox") ;.//*[@id='browse']/table[2]/tbody/tr[51]/td[1]/a Global $i=2 _FFWindowSelect() For $i=2 To $i=51 Step 1 MsgBox(0,"","ss") $sObj = _FFXpath("//td[@id='browse']/table[2]/tbody/tr["&$i&"]/td[1]/a","",9) _FFClick($sObj) _FFAction("back") NextPlesae, help me
  14. have to convert code over to FF as IE.au3 will not open local file when html page is also file:///. Cannot work out the equivalent of Local $oIEEvents = ObjEvent(_IEGetObjById($oIE, "mylink"), "_MyLink_", "HTMLAnchorEvents2") Func _MyLink_onclick() MsgBox(0, "Yes!", "You clicked!") EndFunc ;==>_MyLink_onclick Tried to use _FFXPath to get object string representation to plug into ObjEvent but got nowhere. Is there an example of e.g. trapping a FF button click within AutoIt? tia.
  15. #include <ff.au3> _FFStart("www.autoitscript.com") When I start this I get error __FFStartProcess ==> General Error: Error reading registry entry for FireFox. HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Mozilla\Mozilla Firefox\*CurrentVersion*\Main\PathToExe Error from RegRead: 1 Please give me simply answer and dont use hard words
  16. Hi, need help to change in firefox useragent My script is very simple: Run('"C:Program FilesMozilla Firefoxfirefox.exe"') Sleep(5000) Send("http://www.google.com") Send("{ENTER}") Sleep(5000) ... So,i need to open browser each time with new UserAgent Currently i am using User Agent Switcher add for firefox and with mouse move/select manual useragent but,i am curious if t could set useragent direct with au3 function *NOTE: Only for Firefox
  17. I downloaded FF.au3 , installed MozRepl, started it, put 4242 as port in it, then when Im trying to run this simple script : #include "FF.au3" _FFConnect(default,Default,6000) _FFWindowOpen("http://www.youtube.com", True, True) The thing is, it actually works, but it is still gives me a very annoying error : What can do ?
  18. I recently had issues with the >_FFTableWriteToArray which turned out to be a bug with the function. I am having troubles again, but with a different FF function for the _FFTabSetSelected. The documentation for this function is contained in the attached picture (and below). Again, this is probably on me but I appreciate the help as I can't tell what I am doing wrong. It seems like the first parameter for this function can be a name or index of the tab and the second can be the parameter type. I also assume that if there is only one instance of FF open you can leave _FFWindowSelect() void of parameters and still select a tab. I also expect that if you if the function works it will select the tab and make it the active tab. My problem: the code only works if I manually select that tab. If another tab is selected it will crash. I can't get this function to work. documentation: $vTab (Optional) Label, index (0-n) or keyword: 0 = (default) index (0-n) of the tab. prev = next tab. next = previous tab. first = first tab. last = last tab. $sMode (Optional) Selection mode: index = (default) index (0-n) of the tab. label = Label (RegExp) of the tab. I am trying to use the label as the first parameter. I have tried this approach with the second parameter $name="3Dcart v6.4.1 Store Manager" _FFConnect() _FFWindowSelect() $setTab=_FFTabSetSelected($name,"label") and without $name="3Dcart v6.4.1 Store Manager" _FFConnect() _FFWindowSelect() $setTab=_FFTabSetSelected($name) No joy. Any help would be greatly appreciated.
  19. I am embarrassed to ask this but it is not obvious to me after searching around the forum . I am trying to convert a working IE script to read shipping information from a table in our shopping cart solution to FF. This is the working IE version: Local $oTable = _IETableGetCollection($oIE,20) Local $3dcartShipToTable = _IETableWriteToArray($oTable) I grabbed the ff.au3 UDF and found the thread to replace the "/" in the code. I can start it up etc. Then I found the thread to grab the MozRepl plugin (which I did). However, this code: _ffStart("http://pacebands.3dcartstores.com/admin") MsgBox("","","hold the phone") $ffarray=_FFTableWriteToArray(11) _ArrayDisplay($ffarray) Results in this error: __FFStartProcess: ""C:\Program Files (x86)\Mozilla Firefox\firefox.exe" -new-window "http://pacebands.3dcartstores.com/admin" "-repl 4242 " _FFConnect: OS: WIN_81 WIN32_NT 9600 _FFConnect: AutoIt: 3.3.12.0 _FFConnect: FF.au3: 0.6.0.1b-10 _FFConnect: IP: 127.0.0.1 _FFConnect: Port: 4242 _FFConnect: Delay: 2ms _FFConnect ==> Timeout: TCPConnect Error: 10061 _FFConnect ==> General Error: Timeout: Can not connect to FireFox/MozRepl on: 127.0.0.1:4242 __FFSend ==> Socket Error _FFCmd ==> Error return value _FFTableWriteToArray ==> Invalid value: (INT) $vTable: 11 I am sure this is simple and I am doing something wrong but I am getting a bit lost in all the ff.au3 threads. Can anyone set me straight?
  20. Hi, Using FF.au3 and Autoit beta 3.3.13.12. I've noticed something, given the code: #include <FF.au3> #include <Array.au3> $url1 = 'http://www.autoitscript.com/site/autoit/' _FFStart($url1) Sleep(3000) $aLinks = _FFLinksGetAll() _ArrayDisplay($aLinks) ; displays autoit site links Sleep(3000) $url1 = 'http://www.autoitscript.com/site/uncategorized/gimagex-v2-1-1-released/' _FFOpenURL($url1) Sleep(3000) $aLinks = _FFLinksGetAll() _ArrayDisplay($aLinks) ; displays gimagex site links as I assumed it would and _ArrayDisplay shows the links for the current page in Firefox - different page then different links shown as I expected. But if I use _FFLinkClick (instead of _FFOpenURL) to get to the different page the links shown by FFLinksGetAll and _ArrayDisplay are for the previous page in Firefox not the current page. Try: #include <FF.au3> #include <Array.au3> $url1 = 'http://www.autoitscript.com/site/autoit/' _FFStart($url1) _FFLoadWait() Sleep(10000) $aLinks = _FFLinksGetAll() _ArrayDisplay($aLinks) ; displays autoit site links, note Row 24 link for example Sleep(3000) _FFLinkClick("GImageX v2.1.1 Released", "text") Sleep(3000) $aLinks = _FFLinksGetAll() _ArrayDisplay($aLinks) ; still displays same autoit site links Why the difference? Shouldn't the links displayed reflect the current page in the browser no matter how you get there? Thanks.
  21. Hi, I am trying to write an autoit script so that it will automatically click on a button on an html page.I think I can do this using firefox automation(using FF.au3). But, I want it to happen without opening the html file in a browser. Means ,It should happen in the background.Please give me an idea. Thanks
  22. Trying out the ff.au3 and wanting to get the text of an element by class. I see _FFGetValue() but all of the are void of the syntax for it . Is there another function I'm supposed to use for this?
  23. Hello, i have problem with FF.au3, i can't click on element by using any of function. I don't have name/ id of the element, here is screenshot from FF_Page_Analyzer : _FFFormSubmit( 3) didn't work, so i tried _FFClick('.forms[3].elements[1]') ; But nothing happen too :/ Can someone help me?
  24. Hello, i have problem with FF.au3, i can't click on element by using any of function. I don't have name/ id of the element, here is screenshot from FF_Page_Analyzer : _FFFormSubmit( 3) didn't work, so i tried _FFClick('.forms[3].elements[1]') ; But nothing happen too :/ Can someone help me?
  25. Hello, i trying to click an element with FF.au3, i usually don't have problem with that, but now nothing works. I tried : Xpath - Nothing happen. [ _FFClick(_FFXpath("//*[@id='mail-filters-simple-submit']", "", 9)) 2. _FFFormSubmit - Site just refresh _FFFormSubmit("mail-filters-simple", "id", "click") _FFFormSubmit("mail-filters-simple", "id") _FFFormSubmit(1) 3. _FFClick - Nothing happen _FFClick("mail-filters-simple-submit", "id") _FFClick("mail-filters-simple-submit", "name") $szukaj = _FFObjGet("mail-filters-simple-submit", "id") _FFClick($szukaj) Someone have any idea? Here is form code <form id="mail-filters-simple"> <img class="twisty " role="presentation" /><fieldset style=""> <img class="twisty " role="presentation" /><div id="mail-filters-simple-submit" class="image-button dropdown dropdown_ext_list" tabindex="0"> <span class="left"> </span> <img class="twisty " role="presentation" /><span class="inner"> <span class="icon"> </span> <img class="twisty " role="presentation" /><span class="label"> <span class="sep"> </span> <img class="twisty " role="presentation" /><span class="arrow-wrap"> </span> <span class="right"> </span> <img class="twisty " role="presentation" /><ul class="more" style="visibility: visible; left: 1164px; top: 129px; height: auto; margin-left: -15px; display: none;"> </div> <img class="twisty " role="presentation" /><span id="mail-filters-simple-query-wrap"> <div id="mail-filters-simple-query-suggestions" class="autosuggestion" style="display:none"></div> </fieldset> <img class="twisty " role="presentation" /><div id="mail-filters-simple-simple-wrap" style="display: none;"> </form> Thanks
×
×
  • Create New...