Jump to content
Danp2

FF.au3 (v0.6.0.1b-15) [End of life]

Recommended Posts

Sorry, I was sure I said thank you.

My project has evolved and now I need to know: is there a way to intercept Firefox error notifications? For instance, if Flash crashes, or plugin-container. Is it possible to "read" somewhere these events in order to set a reaction? I have a thread here https://www.autoitscript.com/forum/topic/178852-how-to-check-if-a-process-is-responding/ 

 

Share this post


Link to post
Share on other sites

Hi, I was wondering if there is updated documentation on FF.au3, or if the original documentation still holds up now that it's being controlled by someone else.

Share this post


Link to post
Share on other sites

I've been working with the FF library for a bit now, and I'm having some issues interacting with HTML elements.

Take this script for example, that I built to prove the process I will need to use.

Local $FF_url_start = "https://www.youtube.com/";"https://zenoss.ops.absolute.com/"
_FFStart($FF_url_start)
WinActivate("[Title:YouTube - Mozilla Firefox]")
Local $FF_element = _FFObjGet("News","title")
Local $FF_pos = _FFGetPosition($FF_element)
_FFClick($FF_element)

The code should open a new firefox window and load Youtube, and then click the "News" button on the left hand side, and then put the position of that html object into a variable for me to use.

My issue is that it does not click the button, and the co-ordinates it gives me are horribly incorrect. What am I doing wrong? 

Here is my autoit's debug log:

_FFConnect: OS: WIN_7 WIN32_NT 7601 Service Pack 1
_FFConnect: AutoIt: 3.3.14.2
_FFConnect: FF.au3: 0.6.0.1b-15
_FFConnect: IP: 127.0.0.1
_FFConnect: Port:   4242
_FFConnect: Delay:  2ms
_FFConnect: Socket:     552
_FFConnect: Browser:    Mozilla/5.0 (Windows NT 6.1; WOW64; rv:43.0) Gecko/20100101 Firefox/43.0
__FFSendJavaScripts: Sending functions to FireFox .......... done
_FFLoadWait: . loaded in 10ms
[object HTMLDocument] - {logoutForm: {...}, location: {...}, getElementsByName: function() {...}, getItems: function() {...}, open: function() {...}, close: function() {...}, write: function() {...}, ...}
_FFObjGet ==> Invalid value: (id|name|class|tag) $sMode: title
__FFSend: try{window.content.top.document.location.href}catch(e){'_FFCmd_Err';};
__FFRecv: https://www.youtube.com/
__FFSend: try{window.content.top.document.title}catch(e){'_FFCmd_Err';};
__FFRecv: YouTube
__FFSend: try{FFau3.tmp=document.title;document.title='FFAU31116941983'}catch(e){'_FFCmd_Err';};
__FFRecv: FFAU31116941983
__FFSend: try{document.title=FFau3.tmp}catch(e){'_FFCmd_Err';};
__FFRecv: YouTube - Mozilla Firefox
_FFWindowGetHandle: 0x00100596
__FFSend: try{FFau3.simulateEvent(,'MouseEvents','click');}catch(e){'_FFCmd_Err';};
__FFSend: ;

__FFWaitForRepl ==> Error return value: MozRepl ....>
__FFRecv: 
_FFClick ==> No match: $sElement: 
__FFSend: try{window.content.top.document.getElementById('exceptionDialogueButton')?1:0;}catch(e){'_FFCmd_Err';};
__FFRecv: !!! SyntaxError: expected expression, got ','

Details:


 0
_FFObjGet ==> No match: $sElement not found: exceptionDialogueButton
__FFSend: try{FFau3.simulateEvent(,'MouseEvents','click');}catch(e){'_FFCmd_Err';};
__FFSend: ;

__FFWaitForRepl ==> Error return value: MozRepl ....>
__FFRecv: 
_FFClick ==> No match: $sElement:

 

Share this post


Link to post
Share on other sites

It's been a while since I checked, but last time I looked Stilgar was releasing updates to the UDF over on the German forum. My intent was never to "take over" development of this UDF. Perhaps he can be persuaded to reengage with this forum so that we can continue to benefit from his efforts.

Share this post


Link to post
Share on other sites

I have a strange behaviour.

 

I'm trying to click an item, the console seems okay but the item isn't actually clicked

 

here is my code:

_FFConnect(Default, Default, 3000)
$setSymbol = _FFObjGet("quote_EURUSD", "id") ;
_FFClick($setSymbol);

and here is the log

 

>"E:\Program Files (x86)\AutoIt3\SciTE\..\AutoIt3.exe" "E:\Program Files (x86)\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.au3" /run /prod /ErrorStdOut /in "C:\Users\Jeff\Desktop\FFtest.au3" /UserParams    
+>13:53:02 Starting AutoIt3Wrapper v.16.306.1237.0 SciTE v.3.6.2.0   Keyboard:0000040C  OS:WIN_7/Service Pack 1  CPU:X64 OS:X64  Environment(Language:040C)  CodePage:0  utf8.auto.check:4    # detect ascii high characters and if none found set default encoding to UTF8 and do not add BOM
+>         SciTEDir => E:\Program Files (x86)\AutoIt3\SciTE   UserDir => C:\Users\Jeff\AppData\Local\AutoIt v3\SciTE\AutoIt3Wrapper   SCITE_USERHOME => C:\Users\Jeff\AppData\Local\AutoIt v3\SciTE 
>Running AU3Check (3.3.14.2)  from:E:\Program Files (x86)\AutoIt3  input:C:\Users\Jeff\Desktop\FFtest.au3
+>13:53:02 AU3Check ended.rc:0
>Running:(3.3.14.2):E:\Program Files (x86)\AutoIt3\autoit3.exe "C:\Users\Jeff\Desktop\FFtest.au3"    
--> Press Ctrl+Alt+Break to Restart or Ctrl+Break to Stop
_FFConnect: OS: WIN_7 WIN32_NT 7601 Service Pack 1
_FFConnect: AutoIt: 3.3.14.2
_FFConnect: FF.au3: 0.6.0.2b
_FFConnect: IP: 127.0.0.1
_FFConnect: Port:   4242
_FFConnect: Delay:  2ms
_FFConnect: Socket:     548
_FFConnect: Browser:    Mozilla/5.0 (Windows NT 6.1; WOW64; rv:44.0) Gecko/20100101 Firefox/44.0
__FFSendJavaScripts: Sending functions to FireFox .......... done
__FFSend: try{window.content.top.document.getElementById('quote_EURUSD')?1:0;}catch(e){'_FFCmd_Err';};
__FFRecv: 1
__FFSend: try{FFau3.simulateEvent(FFau3.WCD.getElementById('quote_EURUSD'),'MouseEvents','click');}catch(e){'_FFCmd_Err';};
__FFRecv: 1
_FFLoadWait: . loaded in 24ms
[object HTMLDocument] - {flashFilesList: {...}, videoFilesList: {...}, location: {...}, getElementsByName: function() {...}, getItems: function() {...}, open: function() {...}, close: function() {...}, ...}
+>13:53:04 AutoIt3.exe ended.rc:0
+>13:53:04 AutoIt3Wrapper Finished.
>Exit code: 0    Time: 2.068

webpage is https://demo.ayrex.com/

 

thanks!

 

Jeff

Share this post


Link to post
Share on other sites

I'm experiencing a problem with _FFTabSetSelected().  If there is a better place to post this, please let me know...

The problem is that the function keeps returning with invalid combinations of return value and @error (at least if I understand the extremely limited documentation correctly).  For example, the function can return a value of 2 with @error set to 0, or a return value of 0 with @error set to 2 -- neither of which the documentation describes or seems to allow (see: http://english.documentation.ff-au3.thorsten-willert.de/ff_functions/_FFTabSetSelected.php )

Let me explain what I'm trying to do (because perhaps there's a better way). What I really want is a list of the labels of all the tabs currently open in Firefox. Since I can't find any function to actually do that in one call, I'm taking a brute-force approach of looping through every tab, one at a time, and setting the current tab to a specific index in the loop, then obtaining the label associated with that tab.

Here's a code snippet:

For $i = 0 To $L_TotalTabCount
    $L_Stat = _FFTabSetSelected( $i, "index" )      ; Force/Set the selected tab 
    If $L_Stat <> 1 Then
        ; Error handling
    EndIf
    $L_CurTabLbl = _FFTabGetSelected("label")       ; Get the label of the currently selected tab
Next

But occasionally $L_Stat is set to 2 (which is unexplained), but most often it's set to 0 and @error is set to 0 (which should never happen, also according to the documentation).

At first, I thought this might be related to the fact that I love and use the TabMixPlus addon, and I found an old comment on the fora that noted there was a problem if that addon was being used (but I have no idea if that's still an issue now in May 2016). In any event, I disabled it and re-started, but that didn't resolve the issue.

Any ideas?  Or maybe there's a better way of controlling Firefox with Autoit?

Thanks!

Edited by Mbee
Improved explanations

Share this post


Link to post
Share on other sites

i have some strange problem :

#Include "FF.au3"

If _FFConnect() Then
    MsgBox(64,_FFIsConnected(),"Connected")
    _FFOpenURL("https://en.wikipedia.org/wiki/AutoIt")

Else
    MsgBox(64,_FFIsConnected(),"Can't connect to FireFox")
EndIf

it working, URL is opened, but i get "0" from _FFIsConnected() func and also this output:

_FFConnect: OS: WIN_XP WIN32_NT 3790 Service Pack 2
_FFConnect: AutoIt: 3.3.14.0
_FFConnect: FF.au3: 0.6.0.1b-12
_FFConnect: IP: 127.0.0.1
_FFConnect: Port:   4242
_FFConnect: Delay:  2ms
_FFConnect: Socket:     628
_FFConnect: Browser:    
__FFSendJavaScripts: Sending functions to FireFox .......... done
__FFSend: try{FFau3 != null?1:0}catch(e){'_FFCmd_Err';};
__FFRecv: 
_FFIsConnected ==> Socket Error: 628
_FFOpenURL: https://en.wikipedia.org/wiki/AutoIt
__FFSend: try{window.content.top.document.location.href='https://en.wikipedia.org/wiki/AutoIt'}catch(e){'_FFCmd_Err';};
__FFRecv: 
_FFOpenURL ==> No match: https://en.wikipedia.org/wiki/AutoIt

what it can be?

Share this post


Link to post
Share on other sites

Yes, with same result.

--> Press Ctrl+Alt+Break to Restart or Ctrl+Break to Stop
_FFConnect: OS: WIN_XP WIN32_NT 3790 Service Pack 2
_FFConnect: AutoIt: 3.3.14.0
_FFConnect: FF.au3: 0.6.0.1b-15
_FFConnect: IP: 127.0.0.1
_FFConnect: Port:   4242
_FFConnect: Delay:  2ms
_FFConnect: Socket:     632
_FFConnect: Browser:    
__FFSendJavaScripts: Sending functions to FireFox .......... done
__FFSend: try{FFau3 != null?1:0}catch(e){'_FFCmd_Err';};
__FFRecv: 
_FFIsConnected ==> Socket Error: 632
_FFOpenURL: https://en.wikipedia.org/wiki/AutoIt
__FFSend: try{window.content.top.document.location.href='https://en.wikipedia.org/wiki/AutoIt'}catch(e){'_FFCmd_Err';};
__FFRecv: 
_FFOpenURL ==> No match: https://en.wikipedia.org/wiki/AutoIt
+>05:48:40 AutoIt3.exe ended.rc:0
+>05:48:40 AutoIt3Wrapper Finished.
>Exit code: 0    Time: 103.9

 

Share this post


Link to post
Share on other sites

sorry, it's on my side - it was one of FF addons acting up- i deleted it and _FFIsConnected() working again

Share this post


Link to post
Share on other sites
#include <IE.au3>
Local $page = 0

Local $oIE = _IECreate ("http://mywebsite.com/" & $page)

Local $oInputs = _IETagNameGetCollection($oIE, "a")

For $oInput in $oInputs
    if StringInStr($oInput.getAttribute("href"), "dl.php") Then
        _IECreate("http://mywebsite.com/" & $oInput.getAttribute("href"))
    EndIf
Next

Hi, i'm a newbie with AutoIt. I have this script written with IE.au3, how i translate it with FF.au3?

Thanks for the support, the documentation is really poor... I don't find how i can get an object by his tag name (i'm trying to collect all links).

 

Edited by DevPre24

Share this post


Link to post
Share on other sites

Welcome to AutoIt and the forum!

This is your first post so do you think it is a good idea to nag about something that is (in your eyes) missing or poor?
All users are volunteers and code or help other users in their spare free time.

The documentation in german/english can be found on page on of this thread.


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2020-07-21 - Version 1.5.1.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2020-06-27 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (NEW 2020-06-27 - Version 1.3.2.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
Task Scheduler (2019-12-03 - Version 1.5.1.0) - Download - General Help & Support - Wiki

Tutorials:
ADO - Wiki, WebDriver - Wiki

 

Share this post


Link to post
Share on other sites
2 hours ago, water said:

Welcome to AutoIt and the forum!

This is your first post so do you think it is a good idea to nag about something that is (in your eyes) missing or poor?
All users are volunteers and code or help other users in their spare free time.

The documentation in german/english can be found on page on of this thread.

I don't find Function like _IEGetTagCollection for FF.au3. Can you help me?

Edited by DevPre24

Share this post


Link to post
Share on other sites

There are a few comments that the documentation on FF.au3 is not comprehensive.  I'm using this document.  FFGetValue and FFSetValue don't have anything.  Lots of the pages have very brief descriptions, some have no examples.

Is that the latest and best? 

What if all those pages were copied to a new section in the AutoIt Wiki?  Then anyone interested could add comments, questions, examples etc.  The documentation would get better without any one person having to do it all.

 

Share this post


Link to post
Share on other sites

Hello all, im trying to change the volume in youtube, but can't figure out how to translate it to the UDF.

<div class="ytp-volume-panel"

role="slider"

aria-valuemin="0"

aria-valuemax="100"

tabindex="0"

aria-valuenow="68"

aria-valuetext="68% volume">

<div class="ytp-volume-slider">

<div class="ytp-volume-slider-handle"

style="left: 27.3077px;">

</div></div></div>

Tried many things, but none worked, even changing the value myself through the inspector tool in developer tools doesn't change the volume.

_FFSetValue('50', 'aria-valuenow', 'name')


Spoiler

Renamer - Rename files and folders, remove portions of text from the filename etc.

GPO Tool - Export/Import Group policy settings.

MirrorDir - Synchronize/Backup/Mirror Folders

BeatsPlayer - Music player.

Params Tool - Right click an exe to see it's parameters or execute them.

String Trigger - Triggers pasting text or applications or internet links on specific strings.

Inconspicuous - Hide files in plain sight, not fully encrypted.

Regedit Control - Registry browsing history, quickly jump into any saved key.

Time4Shutdown - Write the time for shutdown in minutes.

Power Profiles Tool - Set a profile as active, delete, duplicate, export and import.

Finished Task Shutdown - Shuts down pc when specified window/Wndl/process closes.

NetworkSpeedShutdown - Shuts down pc if download speed goes under "X" Kb/s.

IUIAutomation - Topic with framework and examples

Au3Record.exe

Share this post


Link to post
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

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By mattia100
      HI!
      1) I want to create a FF web page in background... i want to say a web page that can't be seen in the application bar  but only in Windows Task Manager... 
      maybe using  __FFStartProcess? in fact i tried to use it but the parameter "hide" only can minimize the page, but not put it in background... 
      2) After creating this hide page, i would to open a macro of the iMacros addon, always all in hide mode...
      it is possible to do it?
      anybody can help me?
      Thanks!!
    • By rte7
      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
    • By 5ervant
      Go create a quick account in Zapier and go to https://zapier.com/app/dashboard and make some Zaps!
      Just need to click the specific instance of an .open-menu button and then click its a.run (anchor) element.
      Doing this IE.au3 script just causing to click its container element:
      $target = 1; Target the first instance #include <IE.au3> $oIE = _IEAttach("Dashboard - Zapier") $count = 0; $tags = _IETagNameGetCollection($oIE, "div") For $tag in $tags $class_value = $tag.GetAttribute("class") If $class_value = "open-menu" Then $count += 1 if $count = $target Then MsgBox(0, "Instance: ", $count) ; $tag.fireEvent("onmousedown") ; _IEAction($tag, "click") ; $tag.fireEvent("onmouseup") ; Or this but not working ; $tag.Click EndIf EndIf Next I also tried to do it using FF.au3
      $target = 1; Target the first instance #Include <Array.au3> #Include <FF.au3> $count = 0; If _FFConnect(Default, Default, 3000) Then $aArray = _FFXPath( "//div[@class='open-menu']", "", 7 ) ; _ArrayDisplay($aArray) For $tag in $aArray $count += 1 if $count = $target Then MsgBox(0, "Instance: ", $count) _FFClick($tag) EndIf Next EndIf Error: _FFClick ==> No match: $sElement: [number]
      Could some help me how to click such buttons on such kind of a dynamic page?
    • By jfcby
      I have a script that sends multiple lines of text to a textbox using Firefox. I using _FFSetValue($sCellValue[7], "line one" & @CR & "line two", "id") from ff.au3. If it's a single line of text it works but MozRepl give the following error with multiple lines of text.
      Error:  
      __FFSend: try{FFau3.simulateEvent(window.content.top.document.getElementById('line one
      line two'),'Event','change',13);}catch(e){'_FFCmd_Err';};
      __FFWaitForRepl ==> Error return value: MozRepl ....>
      __FFSend: ;
      __FFRecv:
      __FFSend: FFau3.WCD=window.content.top.document;
      __FFWaitForRepl ==> Error return value: MozRepl ....>
      __FFRecv: !!! SyntaxError: unterminated string literal
      Details:

       [object HTMLDocument] - {mainForm: {...}, location: {...}, getElementsByName: function() {...}, getItems: function() {...}, open: function() {...}, close: function() {...}, write: function() {...}, ...}
      !!! SyntaxError: unterminated string literal
      Will MozRepl plugin for Firefox send multiple lines of text to a textbox?
      Thanks for your help.
×
×
  • Create New...