Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 04/03/2020 in all areas

  1. This is a known querk with SciTE.... Just hit the End key and the scrollbar will adapt. No much I can do as this is something in the Standard version I use. Jos EDIT @seadoggie01... get out of my head please !
    2 points
  2. Automate all windows and browser applications with one UDF function library. Based on the microsoft automation API this library high level supports Recognition of conttrols from EDGE, Chrome, FF, Opera, Safari and Windows native apps Small testing framework to split object repository from coding away Introduction Quickstart - Getting started quickly Simple scripts With this module you can automate all applications/programs that support ui automation and/or accesibility api from microsoft you can recognize more controls than AutoIT can recognize "out of the box" you can use concepts from other testing frameworks like http://download.freedesktop.org/ldtp/doc/ldtp-tutorial.pdf http://safsdev.sourceforge.net/Default.htm coded ui testing from microsoft Some of those controls / applications are chrome browser (partly mainwindow has to be done with MSAA for navigating) chrome://accessibility in the adress bar of chrome or start with "--force-renderer-accessibility" silverlight controls Ribbon control controlbars of Excel/Word IE and FF browsers Windows Media Player Windows clock AFX .. controls (partly) .... Based on the initial AIO Object I now have made the interface file to work with objCreateInterface function which is in the latest beta's automate clicking and querying basic information It gives you a lot of basic information to be able to automate clicking, querying basic information where it goes further in certain situations than AutoIt is identifying Starting threads for background on the ui automation api of microsoft (not for starters) http://en.wikipedia.org/wiki/Microsoft_UI_Automation http://msdn.microsoft.com/en-us/library/ms747327.aspx Previous threads in general help/support Interface AutoItObject IUIAutomation ObjCreateInterface and struct tagPoint in method ElementFromPoint Be aware that API is not allways installed under XP/Vista see http://support.microsoft.com/kb/971513 Within Windows 7 and Windows 8 it should be preinstalled by default. Be aware on 32 and 64 bits way of running your script #AutoIt3Wrapper_UseX64=Y or N Basic example of usage / showing and retrieving the default information, will post multiple examples later Hover your mouse to an area of interest and press ctrl+w and information will be shown in the edit box of the form Simple spy demo (see simplespy.au3 or use latest ZIP attachment for latest version) Main features Recognize windows and html controls for the major browsers Logical and physical description for controls (UI mapping, Application map) Simple repository logic to abstract logical and physical descriptions Store Runtime Type Information in RTI. variables Rubberbanding/highlighting of objects Simple spy to help in making / identifying the physical description Support of regular expression(s) in identifying objects recognize objects on multiple properties supported properties: name ,title, automationid, classname, class, iaccessiblevalue, iaccessiblechildId, controltype, processid, acceleratorkey The actions provided so far "leftclick", "left", "click", "leftdoubleclick", "leftdouble", "doubleclick", _ "rightclick", "right", "rightdoubleclick", "rightdouble", _ "middleclick", "middle", "middledoubleclick", "middledouble", "mousemove", "movemouse" "setvalue","settextvalue" "setvalue using keys" "setValue using clipboard" "getvalue" "sendkeys", "enterstring", "type", "typetext" "invoke" "focus", "setfocus", "activate" "close" "move","setposition" "resize" "minimize", "maximize", "normal", "close", "exist", "exists" "searchcontext", "context" "highlight" "getobject","object" "attach" "capture","screenshot", "takescreenshot" "dump", "dumpthemall" "propertyvalue", "property" match on multiple properties like: name:=((Zoeken.*)|(Find.*)); ControlType:=Button; acceleratorkey:=Ctrl+F Support for 117 different properties see $UIA_propertiesSupportedArray in uiawrappers like for example title, regexptitle, class, regexpclass, iaccessiblevalue, iaccessiblechildid, name, accesskey, automationid, classname IAccessible, IAccessible2, ISimpleDom interfaces debuglogging to a file log.txt (no output in scitewindow) Examples Example 1 Iterating thru the different ways of representing the objects in the tree (#comment-1105548) Example 2 Finding the taskbar and clicking on the start menu button (#comment-1105680) Example 3 Clicking a litlle more and in the end displaying all items from the clock (thats not directly possible with AU3Info) (#comment-1108849) Example 4 that demonstrates the calculator Example 5 Automating chrome Example 6 Demonstrates all stuff within chrome to navigate html pages, find hyperlink, click hyperlink, find picture, click picture, enter data in inputbox Example 7 The chrome example modified to a firefox example Example 8 The other major browser Internet Explorer automated (made on Example 6 and 7) Example 9 Windows media player Example 10 Automating mach 3 (AFX windows and other hard to get recognized by AutoIT) Lot of links are broken due to forum upgrade just search for the text like "Example 11 Demonstrate Word, Notepad and Calculator actions" Example 11 Demonstrate Word, Notepad and Calculator actions ... Example 13 Details 1 about the right pane of the windows explorer Example 14 Details 2 about the right pane of the windows explorer Example 15 Details 3 about the right pane of the windows explorer Example 16 Details 4 about the right pane of the windows explorer Example 17 Details 5 about the right pane of the windows explorer WITH CACHING Example 18 Details 6 about the right pane of the windows explorer WITH VIRTUAL ITEMS Example 19 Eventhandling examples Example 20 Eventhandling examples Example 21a Eventhandling examples Internet Explorer Example 21b Eventhandling examples Internet Explorer Example 22 Eventhandling examples Follow focus Example 23 Eventhandling examples structure changed Example 24 Eventhandling examples IUIAutomationEventHandler Example 25 SAFEARRAYS Example 26 IACCESSIBLE / MSAA Example 27 IACCESSIBLE2 / MSAA Example 28 IACCESSIBLE / MSAA events Example 29 IACCESSIBLE2 events Example 30 ISimpleDOM Example 31 Notepad window move, maximize, minimize Example 32 Three browsers doing the same stuff with small differences in scripting only .. TODO Build recorder Enhance the spy with a nicer UI UI for the repository (now in the script with dot notation) Enhance mapping / identifying on multiple properties instead of 1 combined with index If speed becomes an issue use the caching logic of the MS UIA framework Add the other patterns later Generalize the concept of System Under Test of starting the SUT (for testing framework purposes) Remote running of scripts Fix issue on finding within dynamic context ... edit august 18th 2013 initial post Only zip files are needed to download , just unzip in 1 directory edit july 2016 Made V0_63 and examples works with AutoIt v3.3.14 Windows 10 tested Simple spy gives some basic code as a present Chrome latest versions seems to be having issues with IUIAutomation on tabs/buttons of mainwindow use MSAA for accessing tabsheets / buttons more cleanup to be in UDF style More comments in the source see changelog.txt for previous changes edit september 2017 All examples fixed for the IE, Firefox and Chrome browser Some small but essential fixes in UIAWrappers edit april 2018 Enhanced logic on fallback / dynamic search, still not perfect, to slow Retested with latest Chrome, FF, Edge and IE11 and some extensions to show how to get text from the webpage (examples 5,6,7) Some small bugfixes Some comments as given in forum incorporated edit may 2019 Speed enhancements on especially fallback searching UIA.CFG works now in a better way to turn on/off debug, highlighting, debug2file More stable and consistent behavior Internal cleanup and refactoring of bigger functions Checked with W10 (not tested on W7) Added some W10 properties Run with 3.3.14.5 on W10 UIA_V0_51.zip EXAMPLES_V0_5.zip UIA_V0_63.zip EXAMPLES_V0_63.zip UIA_V0_64.zip EXAMPLES_V0_64.zip EXAMPLES_V0_66.zip UIA_V0_66.zip EXAMPLES_V0_70.zip UIA_V0_70.zip
    1 point
  3. I love the help file and all the information it contains. Its fatal flaw is that it can't be added to. I create a lot of wrapper functions and install a lot of UDFs, so it gets tiring opening the include file each time I need to remember if it returns a 0 or 1 based array, what this particular error means, or what the argument should be. I've been fed up with this for too long, hence this script. Features Reads *.au3 files to parse UDF style headers to get function information (the UDF header style is defined here, thanks water!) Supports multiple search paths Integration with SciTe (more on this later) Stores function documentation so it doesn't need to re-read files each startup (Currently, in a config file) Only updates a file based on it's last modification date Will update another instance instead of launching a new one before exiting. Planned Updates Optionally (user's choice) use a SQLite Database to increase storage/read speeds Redirect unknown functions to AutoItHelper.exe to open the almighty Help File Remove functions from folders not in the search folders (would be a lot easier with SQLite) Fully support and parse UDF headers SciTE Integration This took me a while to figure out (I thought I needed to use lua), but it's totally worth it. By editing your "User Options File" aka SciTEUser.properties files, you can launch this file with a keyboard shortcut. I put this in mine: (After compiling) command.41.$(au3)="$(SciteDefaultHome)\..\FunctionDocs.exe" "$(CurrentWord)" command.name.41.$(au3)=Personal Function Docs command.shortcut.41.$(au3)=Shift+F1 command.subsystem.41.$(au3)=2 command.save.before.41.$(au3)=2 command.quiet.41.$(au3)=1 (Note that 41 is an unused command number. You may need to change this if you've added other tools) It says (respectively): * Launch FunctionDocs.exe from the directory above SciTE.exe with the currently selected word as a command line parameter * Make the MenuItem in SciTE named "Personal Function Docs" * Use Shift F1 as the shortcut to start the program * (I don't know) * Don't save the file before launching the program * (And my favorite) Don't clear SciTE's output panel
    1 point
  4. Thanks An other flavour #include <GUIConstants.au3> #include <MsgBoxConstants.au3> #include <WindowsConstants.au3> #include <SendMessage.au3> Opt("GUIOnEventMode", 1) Global Const $SC_DRAGMOVE = 0xF012 Create_GUI() While 1 Sleep(10) WEnd Func Create_GUI() Global $GUI_Main = GUICreate("Main GUI", 200, 100) Global $GUI_Main_Button = GUICtrlCreateLabel("Button", 0, 0, 200, 100, BitOR($SS_CENTERIMAGE, $SS_CENTER, $SS_RIGHTJUST)) GUICtrlSetOnEvent($GUI_Main_Button, "Drag") GUISetOnEvent($GUI_EVENT_CLOSE, "Exiting_Function") GUISetState(@SW_SHOW, $GUI_Main) EndFunc Func Drag() $pos = WinGetPos($GUI_Main) _SendMessage($GUI_Main, $WM_SYSCOMMAND, $SC_DRAGMOVE, 0) Sleep(10) $pos2 = WinGetPos($GUI_Main) If $pos[0] = $pos2[0] and $pos[1] = $pos2[1] Then Button_Function() EndFunc Func Button_Function() MsgBox($MB_OK,"You did the thing", "I only want the thing done if I didn't use the label/button to drag the GUI") EndFunc Func Exiting_Function() Exit EndFunc
    1 point
  5. Not easy but this might work BTW declaring global variables inside a func is not nice #include <GUIConstants.au3> #include <MsgBoxConstants.au3> Opt("GUIOnEventMode", 1) Create_GUI() While 1 Sleep(10) WEnd Func Create_GUI() Global $GUI_Main = GUICreate("Main GUI", 200, 100) Global $GUI_Main_Button = GUICtrlCreateLabel("Button", 0, 0, 200, 100, BitOR($SS_CENTERIMAGE, $SS_CENTER, $SS_RIGHTJUST)) ;, $GUI_WS_EX_PARENTDRAG) GUICtrlSetOnEvent($GUI_Main_Button, "Drag") GUISetOnEvent($GUI_EVENT_CLOSE, "Exiting_Function") GUISetState(@SW_SHOW, $GUI_Main) EndFunc Func Drag() $pos = WinGetPos($GUI_Main) DllCall("user32.dll", "int", "ReleaseCapture") DllCall("user32.dll", "int", "SendMessage", "hWnd", $GUI_Main, "int", 0xA1, "int", 2, "int", 0) ;WM_NCLBUTTONDOWN Sleep(10) $pos2 = WinGetPos($GUI_Main) If $pos[0] = $pos2[0] and $pos[1] = $pos2[1] Then Button_Function() EndFunc Func Button_Function() MsgBox($MB_OK,"You did the thing", "I only want the thing done if I didn't use the label/button to drag the GUI") EndFunc Func Exiting_Function() Exit EndFunc
    1 point
  6. Yea right .... just some game script from some game forum as an example. Sometimes I really wonder what people think when they type these kind of avoiding crazy answers. Jos
    1 point
  7. Simple... I won't be wasting any more of my time to help you solve your issues. Bye!
    1 point
  8. Sorry, but "didn't work" isn't going to cut it if you really want help. Show us your code and the resulting output of running it in Scite. Note: This will only work with an marionette enabled instance of Firefox. You either have to launched Firefiox with the --marionette option, or go to About:Config page and change "marionette.enabled" to true (untested) P.S. I use this method daily to interact with an existing Firefox instance.
    1 point
  9. @grablestyp See the following wiki entry for how to specify an existing user profile -- https://www.autoitscript.com/wiki/WebDriver#FAQ Everything else -- Provide more details so that we can better know how to assist you. Show us the contents of your spreadsheet. Give more details on the data you want to retrieve from the website, etc.
    1 point
  10. and I see you COMPLETELY ignored the simple questions I gave you. Seeing you are not even bothering to help yourself, I'm out.
    1 point
  11. You are getting the error due to running 32-bit AutoIt. It needs to be run in as 64-bit. Add the following to the top of your script, and it will work, at least for me it does. #AutoIt3Wrapper_UseX64=Y ;(Y/N) Use AutoIt3_x64 or Aut2Exe_x64. Default=N #include <SQLite.au3> #include <SQLite.dll.au3> _SQLite_Startup(@ScriptDir & "\Config\sqlite3_x64.dll", False, 1) If @error Then MsgBox(16, "SQLite Error", "SQLite3.dll Can't be Loaded! - " & $__g_hPrintCallback_SQLite & @CRLF & @CRLF & "Exiting application / Zavolej Honzovi") Exit -1 EndIf Adam
    1 point
  12. That something you need to ask here: https://groups.google.com/forum/#!forum/scite-interest Jos
    0 points
×
×
  • Create New...