Jump to content

1 Screenshot

About This File

Opera Browser Automation UDF Library!

32 (and more to go) adapted functions to manipulate the most common routines for Opera Browser!

Note: This UDF Library tested on Opera versions: 8.54-9.5, 10.63.3516, few critical functions tested also on 11.x-12.x.

Change Log:

v1.08 [21.Jun.2013]

  • Fixed issue with getting opera profile path (mostly related to _OperaGetMailDir).

v1.07 [04.Jun.2013]

  • + Added _OperaGetDownloadsDir function.
  • + Added _OperaGetSessionFiles function.
  • + Added global $i_Opera_SearchAllDrives variable to allow profile dir detection on other drives. Usefull when installed more than one OS.
  • + Added global $s_Opera_ProfileDir variable to specify custom profile dir (this variable should be empty if you need to use _OperaGetProfileDir).
  • Fixed few functions to work better with new Opera versions.
  • Fixed internal __Opera_GetOperaPageHandle function (used in public _OperaScreenCapture function).

v1.06 [12.Jul.2012]

  • Fixed _OperaGetDir function:
    - To be compatible with x64 system.
    - Changed/expanded parameters, now used $iFlag to determine the function behavior, see function header for more details.
  • _OperaIsRuning function renamed to _OperaIsRunning. Old function name still supported.
  • Renamed internal functions to __Opera_*.

v1.05 [08.Jul.2012]

  • Fixed _OperaGetTitle function, the title was incorrect if $sOpDir was specified and $iRet <> 2.
  • Fixed __Correct_Opera_Path internal function to replace back slashes (/).

v1.04 [26.Jun.2011]

  • Fixed following functions to be more compatible with Opera 11.x:
    _OperaGetProfileDir
    _OperaMultiUserModeIsOn
    _OperaGetUserJSDir
    __Correct_Opera_Path
  • Fixed major bugs with recognizing Opera Dir (if $sOpDir parameter is passed as wrong Opera dir path).
  • Fixed _OperaGetUserJSDir function (now working better with relative pathes).
  • Renamed and changed _Opera_Integration_Example function. Now it's considered active function and named _Opera_Integration_Module.
  • Changed _OperaSelectFolder function. Added new optional parameter $hParent.
  • Changed _OperaAddMenuItem and _OperaRemoveMenuItem functions. Added new optional parameter $iBackup.
  • Fixed _OperaAddMenuItem function. Encoding issues.
  • + Added _OperaGetCacheDir function.
  • + Added optional $iGetLastInstallPath parameter to _OperaGetDir function.
    If this parameter is 1, then function will try to detect the last installed Opera path,
    instead of the path that Opera.exe was last time launched from.

v1.03 [16.May.2011]

  • UDF renamed to Opera.au3.
  • Fixed _OperaScreenCapture function (now compatible with Opera 10.6, but still having an issue with capturing panels).
  • Fixed few major issues with getting preference file's pathes.
  • Fixed _OperaGetDir() function.
  • Fixed _OperaGetProfileDir() function (errors when getting profile dir on multiuser mode).
  • Changed _OperaFindDir function.
    - Now the $sInitPath parameter can accept pathes (delimited with "|").
    - Now -1 as second parameter ($iRetCount) tels to the function to return all found Opera dirs.
    - Also the function now works faster.
  • + Opera 10.6 support.
  • + Added _OperaToggleMenuItemState function.
  • + Added optional $sStandard_Name parameter to _OperaSetConfigFile function:
    If this parameter is a string (default is -1), then it's used as standard file name
    (instead of "standard_" & $sConfig_Prefix & ".ini").

v1.02 [03.Jul.2009]

  • Now compatible with AutoIt 3.3.0.0.
  • + Opera 10 support.
  • + Added _OperaGetBookmarksFile() function.
  • + Added _OperaScreenCapture() function...
    ATTENTION: supported only for v3.2.10.0 or higher, due to (lack of) callback support.
  • + Added _OperaAddMenuItem()/_OperaRemoveMenuItem() function.
  • Fixed few function to read relative paths in opera prefs file.

v1.01 [5.Jan.2008]

  • Now compatible with AutoIt 3.2.10.0.
  • Variable names and spell corrections.
  • + Added 2 more UDFs:



    _OperaRestart()

    _OperaMultiUserModeIsOn()

v1.0 [28.Dec.2007]

First Release..


What's New in Version 1.08

Released

  • See «Change Log» above.

User Feedback

You may only provide a review once you have downloaded the file.


  • Similar Content

    • By noellarkin
      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 :)
    • By noellarkin
      So I was trying to write a function that can find a button (or any other XPath Element) and scroll the page + move the mouse to the location of the button.
      My logic for this was:
      1. get position of button using _FFGetPosition
      2. get inner dimensions of browser window and total dimensions of page
      3. divide total dimensions by inner dimensions to get number of page down operations
      4. use Mod() to get remaining pixels offset
      5. MouseMove() and add requisite offsets for Titlebar etc (what the +5 and +54 is for in the last line)
      Example Code:
      _FFConnect($LocalHost, $BrowserPort, $TimeOut) Local $Button = _FFXPath(".//*[@id='thisbutton']") Local $ButtonPosition = _FFGetPosition($Button) Local $ElementWidth = $ButtonPosition[0] Local $ElementHeight = $ButtonPosition[1] Local $InnerWidth = _FFCmd("window.content.innerWidth") Local $InnerHeight = _FFCmd("window.content.innerHeight") Local $PageWidth = _FFCmd(".body.offsetWidth") Local $PageHeight = _FFCmd(".body.offsetHeight") Local $PGDNNo = Int($ElementHeight/$InnerHeight) Local $PGDNMod = Mod($ElementHeight, $InnerHeight) ; MsgBox(0,"","$ElementX: " & $ElementWidth & @CRLF & "$ElementY: " & $ElementHeight) ; MsgBox(0,"","$InnerWidth: " & $InnerWidth & @CRLF & "$InnerHeight: " & $InnerHeight) ; MsgBox(0,"","$PageWidth: " & $PageWidth & @CRLF & "$PageHeight: " & $PageHeight) ; MsgBox(0,"",$PGDNNo) ; MsgBox(0,"",$PGDNMod) Local $iter = 1 While $iter <= $PGDNNo WinActivate($BrowserWindowClass,"") _FFCmd("window.content.scrollByPages(1)") $iter += 1 WEnd MouseMove($ElementWidth + 5, $PGDNMod + 54) This isn't working. In some cases, it's not doing the page down operation the number of times needed, or not accurately pinpointing the location. I think there may be something wrong with the logic I'm using. What am I doing wrong?
      Thanks.
       
    • By water
      I have started to rewrite the PowerPoint UDF similar to the Word, Excel and Outlook UDF. The new UDF will not be compatible with the existing one.
      I will add examples, documentation, a section in the wiki etc.
      So far the following functions have been coded - more are on the ToDo list.
      _PPT_Open: Open a connection to a running instance of PowerPoint or start a new one _PPT_Close: Close a PowerPoint instance _PPT_CommentAdd: Add a Comment anywhere on a Slide or connected to a Shape (version 1.5.0.0 2021-08-31) _PPT_CommentDelete: Delete a single Comment from a Slide or all Comments from a SlideRange (version 1.5.0.0 2021-08-31) _PPT_CommentList: Get a list of all Comments in a Presentation (version 1.5.0.0 2021-08-31) _PPT_ConvertUnits: Convert units (like centimeters) to other units (like points) (version 1.3.0.0 2021-08-17) _PPT_HeaderFooterList: Returns a list of Headers and Footers for a Presentation (version 1.1.0.0 2021-07-25, removed with version 1.4.0.0 2021-08-25) _PPT_HeaderFooterSet: Sets the Header/Footer for a Slide/Slides or the Slide-/Notes-/Handout-/Title-Master of the Presentation (version 1.2.0.0 2021-08-09) _PPT_PresentationAttach: Attach to an already opened Presentation _PPT_PresentationClose: Close a Presentation _PPT_PresentationExport: Export one/multiple/all Slides as PDF or XPS. _PPT_PresentationExportGraphic: Export one/multiple/all Slides in a graphic format. _PPT_PresentationList: Returns a list of currently open Presentations (version 1.0.0.0 2021-07-20) _PPT_PresentationNew: Create a new Presentation _PPT_PresentationOpen: Open an existing Presentation _PPT_Print: Print one/multiple/all Slides of a Presentation (version 1.0.0.0 2021-07-20) _PPT_PresentationSave: Save a Presentation _PPT_PresentationSaveAs: Save a Presentation to another location or with another type _PPT_ShapeAdd: Add a Shape to a single or multiple Slides (version 1.1.0.0 2021-07-25) _PPT_ShapeAlignDistribute: Aligns and distributes the Shapes in the specified ShapeRange (version 1.6.0.0 - to be released) _PPT_ShapeCopyMove: Copy/move a Shape(s) of a single Slide to a Slide(s) in the same or a different Presentation (version 1.1.0.0 2021-07-25) _PPT_ShapeDelete: Delete a Shape or Shapes from a single or multiple Slides (version 1.1.0.0 2021-07-25) _PPT_SlideAdd: Add slide(s) to a Presentation _PPT_SlideCopyMove: Copy, move, duplicate Slide(s) _PPT_SlideDelete: Delete Slide(s) _PPT_SlideShow: Show a Presentation _PPT_TableGet: Extract data from a PowerPoint Table Shape to an array (version 1.3.0.0 2021-08-17) _PPT_TableSet: Write data to a PowerPoint Table Shape (version 1.3.0.0 2021-08-17) _PPT_TextFindReplace: Find & replace text throughout entire PowerPoint presentation (version 1.0.0.0 2021-07-20) _PPT_TextSet: Sets/modifies the Text of a Shape or Shapes of a single or multiple Slides (version 1.2.0.0 2021-08-09 Which functions do you want me to add to the UDF?
      ToDo list:
      create slide (JLogan3o13) - Done: _PPT_SlideAdd Apply template to slide (JLogan3o13) - Done: _PPT_SlideAdd Apply theme to slide (JLogan3o13) Cut/Copy/Duplicate/Move/Delete slide(s) (JLogan3o13) - Done: _PPT_SlideCopyMove, _PPT_SlideDelete Export slides (JLogan3o13) - Done: _PPT_PresentationExport Cut/Copy/Duplicate/Move/Delete shape(s) (JLogan3o13): Done : _PPT_ShapeCopyMove, _PPT_ShapeDelete (version 1.1.0.0 2021-07-25) ApplyAnimation, Select, SetDefaultProperties, and zOrder for shape(s) (JLogan3o13) Searching and replacing text (pcjunki) - Done: _PPT_TextFindReplace (version 1.0.0.0 2021-07-20) Export slides in a graphic format (JPG, GIF, PNG ...) (UEZ) - Done: _PPT_PresentationExportGraphic The UDF can be downloaded from the download forum.
       
    • By p4sCh
      Hello everyone,
      I've created a UDF for basic communication with SSH servers. I know there is already such a UDF, but I wasn't satisfied with it for my purpose, so I created a new one.
      This UDF also acts as a wrapper for the plink executable. Its essential functions are _SSHConnect, _SSHSend, _SSHRecv and _SSHCloseSocket.
      It does support multiple simultaneous connections and aims to be pretty robust. Feel free to share your opinions
      Two of the included examples use a slightly modified version of Vintage Terminal by @Chimp
      Download
      The download includes ssh.au3 (UDF), plink.exe (necessary), vintage terminal and code examples:
      SSH UDF.zip
    • By mLipok
      Anybody could help with using QueryInterface in AutoIt to embed Microsoft Edge using WebView2 Interface ?
      Here are links to information/documentation:

      Image comes from: https://docs.microsoft.com/en-us/microsoft-edge/webview2/media/webview2/whatwebview.png
      Introduction to Microsoft Edge WebView2
      https://docs.microsoft.com/en-us/microsoft-edge/webview2/

      Understand WebView2 SDK versions
      https://docs.microsoft.com/en-us/microsoft-edge/webview2/concepts/versioning
      Download:
      https://developer.microsoft.com/en-US/microsoft-edge/webview2/
      https://developer.microsoft.com/en-US/microsoft-edge/webview2/#download-section
      https://docs.microsoft.com/en-us/microsoft-edge/webview2/concepts/distribution
      API Reference:
      https://docs.microsoft.com/en-us/microsoft-edge/webview2/reference/win32/?view=webview2-1.0.622.22

      HowTo/Concepts:
      https://docs.microsoft.com/en-us/microsoft-edge/webview2/concepts/versioning
      https://docs.microsoft.com/en-us/microsoft-edge/webview2/gettingstarted/win32
      https://docs.microsoft.com/en-us/microsoft-edge/webview2/howto/debug?tabs=devtools
      https://docs.microsoft.com/en-us/microsoft-edge/webview2/concepts/security
      https://docs.microsoft.com/en-us/microsoft-edge/webview2/concepts/userdatafolder
      https://mybuild.microsoft.com/sessions/9198aeac-0c8e-4d32-96d1-cbb99a390aa6
      Example:
      https://github.com/MicrosoftEdge/WebView2Samples
      Related:
      https://www.essentialobjects.com/Products/WebBrowser/Default.aspx?gclid=CjwKCAiA17P9BRB2EiwAMvwNyMe6UI9VHej-JYDBUoyGDFz40KaaJ_RidY-75Fhr-PHz65sSVC0XlxoC5loQAvD_BwE
      https://docs.microsoft.com/en-us/microsoft-edge/webview2/howto/webdriver
       
      btw.
      I'm not WindowsApi expert (QueryInterface, C++, DllCall).
      What I trying to say is:     It means that I do not done anything in this regards .... as so far.
       
       
      TIMELINE/ChangeLog:
       
      2020-11-12 - Project propsed by @mLipok 2021-02-03 - First version provided by @LarsJ
×
×
  • Create New...