Jump to content
Sign in to follow this  
milkmoron

IUI Automation Help

Recommended Posts

https://www.autoitscript.com/forum/topic/153520-iuiautomation-ms-framework-automate-chrome-ff-ie/?do=findComment&comment=1156373 
At least we have an element title: [Entered By:] class: [WindowsForms10.EDIT.app.0.30495d1_r9_ad1]

Having the following values for all properties: 
Title is: <Entered By:> Class   := <WindowsForms10.EDIT.app.0.30495d1_r9_ad1>   controltype:= <UIA_EditControlTypeId>   ,<50004>    , (0000C354)    322;370;736;184
*** Parent Information top down ***
3: Title is: <View Activity>    Class   := <WindowsForms10.Window.8.app.0.30495d1_r9_ad1>   controltype:= <UIA_WindowControlTypeId> ,<50032>    , (0000C370)    306;72;784;605
"Title:=View Activity;controltype:=UIA_WindowControlTypeId;class:=WindowsForms10.Window.8.app.0.30495d1_r9_ad1""    
2: Title is: <> Class   := <WindowsForms10.Window.8.app.0.30495d1_r9_ad1>   controltype:= <UIA_PaneControlTypeId>   ,<50033>    , (0000C371)    314;103;768;542
"Title:=;controltype:=UIA_PaneControlTypeId;class:=WindowsForms10.Window.8.app.0.30495d1_r9_ad1""   
1: Title is: <> Class   := <WindowsForms10.Window.8.app.0.30495d1_r9_ad1>   controltype:= <UIA_PaneControlTypeId>   ,<50033>    , (0000C371)    314;103;749;451
"Title:=;controltype:=UIA_PaneControlTypeId;class:=WindowsForms10.Window.8.app.0.30495d1_r9_ad1""   
0: Title is: <Delete>   Class   := <WindowsForms10.Window.8.app.0.30495d1_r9_ad1>   controltype:= <UIA_PaneControlTypeId>   ,<50033>    , (0000C371)    314;122;749;432
"Title:=Delete;controltype:=UIA_PaneControlTypeId;class:=WindowsForms10.Window.8.app.0.30495d1_r9_ad1"" 


;~ *** Standard code maintainable ***
#include "UIAWrappers.au3"
AutoItSetOption("MustDeclareVars", 1)

_UIA_setVar("oP1","Title:=View Activity;controltype:=UIA_WindowControlTypeId;class:=WindowsForms10.Window.8.app.0.30495d1_r9_ad1")  ;View Activity
_UIA_setVar("oP2","Title:=;controltype:=UIA_PaneControlTypeId;class:=WindowsForms10.Window.8.app.0.30495d1_r9_ad1") ;
_UIA_setVar("oP3","Title:=;controltype:=UIA_PaneControlTypeId;class:=WindowsForms10.Window.8.app.0.30495d1_r9_ad1") ;
_UIA_setVar("oP4","Title:=Delete;controltype:=UIA_PaneControlTypeId;class:=WindowsForms10.Window.8.app.0.30495d1_r9_ad1")   ;Delete

_UIA_setVar("EnteredBy:.mainwindow","title:=Entered By:;classname:=WindowsForms10.EDIT.app.0.30495d1_r9_ad1")

;~ Actions split away from logical/technical definition above can come from configfiles 

;~_UIA_Action("oP1","highlight")
_UIA_Action("oP1","setfocus")
;~_UIA_Action("oP2","highlight")
_UIA_Action("oP2","setfocus")
;~_UIA_Action("oP3","highlight")
_UIA_Action("oP3","setfocus")
;~_UIA_Action("oP4","highlight")
_UIA_Action("oP4","setfocus")

_UIA_action("EnteredBy:.mainwindow","setfocus")


;~ *** Standard code Flexible***
#include "UIAWrappers.au3"
AutoItSetOption("MustDeclareVars", 1)

Local $oP3=_UIA_getObjectByFindAll($UIA_oDesktop, "Title:=View Activity;controltype:=UIA_WindowControlTypeId;class:=WindowsForms10.Window.8.app.0.30495d1_r9_ad1", $treescope_children) 
_UIA_Action($oP3,"setfocus")
Local $oP2=_UIA_getObjectByFindAll($oP3, "Title:=;controltype:=UIA_PaneControlTypeId;class:=WindowsForms10.Window.8.app.0.30495d1_r9_ad1", $treescope_children) 
_UIA_Action($oP2,"setfocus")
Local $oP1=_UIA_getObjectByFindAll($oP2, "Title:=;controltype:=UIA_PaneControlTypeId;class:=WindowsForms10.Window.8.app.0.30495d1_r9_ad1", $treescope_children) 
_UIA_Action($oP1,"setfocus")
Local $oP0=_UIA_getObjectByFindAll($oP1, "Title:=Delete;controltype:=UIA_PaneControlTypeId;class:=WindowsForms10.Window.8.app.0.30495d1_r9_ad1", $treescope_children)   
_UIA_Action($oP0,"setfocus")
_UIA_setVar("EnteredBy:.mainwindow","title:=Entered By:;classname:=WindowsForms10.EDIT.app.0.30495d1_r9_ad1")
_UIA_action("EnteredBy:.mainwindow","setfocus")

Need some help selecting this defining it as a variable to save and then insert the text within, to the same application but different account.

Share this post


Link to post
Share on other sites
_UIA_Action($oP0,"setValue")

_UIA_Action($oP0,"settextValue")

I think one of these to insert text, now the variable depends on the control yes? maybe

$oP4

Either use what is under

;~ *** Standard code Flexible***

or what is under 

;~ *** Standard code maintainable ***

not both at same time.


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
29 minutes ago, careca said:
_UIA_Action($oP0,"setValue")

_UIA_Action($oP0,"settextValue")

I think one of these to insert text, now the variable depends on the control yes? maybe

$oP4

Either use what is under

;~ *** Standard code Flexible***

or what is under 

;~ *** Standard code maintainable ***

not both at same time.

Okay thanks do you happen to know how to define a variable like &oDescription to the text of the variable set using IUI. I tried this.

Local $oDescription = _UIA_Action("Description","getvalue")

And is just outputs 

EnteredBy:.mainwindow","title:=Entered By:;classname:=WindowsForms10.EDIT.app.0.30495d1_r9_ad1

Edited by milkmoron

Share this post


Link to post
Share on other sites

Hi, no need to quote me on a continuous conversation..

Not really, this is not my field of expertise. Im sure someone will come along and help with that.


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
_UIA_Action("Description","<Your descriptive identification string over here>") 
Local $oDescription = _UIA_Action("Description","getobject")

Then this can be done
_UIA_Action($oDescription,"highlight")
_UIA_Action("Description","highlight")

By using stringtext you are able to put your definitions outside of your au3 program in ini or xml files so maintenance becomes easier
Quote

 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"

 

Share this post


Link to post
Share on other sites
7 hours ago, junkew said:
_UIA_Action("Description","<Your descriptive identification string over here>") 
Local $oDescription = _UIA_Action("Description","getobject")

Then this can be done
_UIA_Action($oDescription,"highlight")
_UIA_Action("Description","highlight")

By using stringtext you are able to put your definitions outside of your au3 program in ini or xml files so maintenance becomes easier

 

Thanks will update

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
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By WilliamasKumeliukas
      Hi,
      I started this project alone in May 2020 as project in my spare time at work, I'm working for a IT company that started opening their services to residential customers few months ago and now my position in the company kinda drifted in the doom and gloom world of repetitive tasks like: Reinstallation of Windows 10.
      The procedure is very repetitive and I started feeling like being a robot which is the main reason I started this project.
       
      ==============================FAQ==================================
      1. Q: Do you want this project to be accomplished with the usage of AutoIT ONLY or 3rd party tools / Scripts (BATCH / POWERSHELL / VB) ? A: No, if I cannot find a way using AutoIT to accomplish a task I will move to my Plan B which consist of automating an 3rd party tool to accomplish the affected task until a solution is found. 2. Q: What do I get from helping/collaborating in this project? A: I will personally take the responsability to mention you in the credits of this project. 3. Q: If I have more questions, can I ask? A: Certainly! feel free to ask any questions related to this project! 4. Q: What is the main goal of this project? A: Automating Windows 10 configuration without user interaction needed (as much as possible) ______________________________________________________________________________________________________________________________
      Current progression of the project (more will be added in future)
      « Blue = Info || Yellow = Unfinished/Untested || Purple = Could be better || Green = Done ||Red = Not Yet Started »
      ***Very early Stage ***
      Connect Network Attached Storage(NAS) (Tested & Working - AutoIT only)
      Download & Install up to 567 softwares with Auto prediction of text typed  (Tested & Working - using 3rd party tool)
      Change OEM Information (Tested & Working -  AutoIT)
      Disable ScreenSaver (Require testing AutoIT only)
      Change Computer Name (Require testing AutoIT only) 
      Show Computer Information and Smart status on GUI (Tested & Working - AutoIT Only)
      Change .pdf / .pdfxml from Edge to Adobe Reader DC (Tested &Working - using 3rd party tool)
      Change Edge to Google Chrome as Default Browser (Tested & Working - using 3rd party tool)
      Windows Updates (Working - AutoIT only)
      Install Office 365
      Activate Office 365
      Pin to taskbar Excel, Outlook, Word, Chrome (Tested & Working - using 3rd party tool)
             GUI currently featuring the following options :
      - Checkboxes for desired tasks
      Inputs for : SupportUrl, Manufacturer, Model, SupportPhone, SupportHour, OEM Logo path
      -  Redirect ConsoleWrite with timestamped messages in richedit (errors shown separately in red colored text)
                 *** To Do ***
       - Read informations needed for tasks like: OEM, ComputerName, NAS user/password etc... from a file
       - ListView for Windows Updates
       - Probably more
       
      ***  If this project interest you, Reply here This will greatly help me to see if you'd like this project to become real  ***
      ______________________________________________________________________________________________________________________________
      2020.09.21 Update: Since this topic reached over 200+ views without a single interest shown by community, pm me if you're willing to be part of the project and i'll share with you the GitHub project link  
      Best Regards,
      ~WilliamasKumeliukas
    • By abberration
      Software Installer
      version 1.2 - Jan 2, 2021
      Hello, everyone!
      Today, I present to you a new version of Software Installer. This script is designed to be used on CDs/DVDs/USB drives where you put software in a folder (called Software) and you can select multiple software and it will automate installing your selected software one after another with little to no interaction. To do this, you simply need to configure each software with a silent switch (most software have one or more). You can put your software in categories to organize them on the main GUI.
      Screenshot:

      The major new things concerning this project:
      Added a Detect button, where the software tries to detect what kind of installer is used, saving you from having to find out on your own. It's not perfect, but it detects many common installer types. Added a Installers.db file for installers that were not created by the most common methods (Inno Setup, NSIS, etc). I will continue to add to this file. If you have any that you find that you would like to contribute, please PM. I would very much appreciate your help. This version searches for all subfolders now and shows .exe and .msi files that you may not want to see on the main screen. Therefore, I have added the option to "Hide This Item On Main GUI". Added the ability to install up to 2 software before and up to 2 software or registry entries after installing your selected software. This will allow you to install things like service packs, DotNet, etc. (prerequisites). And it will allow you to apply your licensing information through registry entries or patches/updates. If you want the full package (source code, compiled .exe (both 32/64 bit), changelog, installers.db, icon, etc.), you can download it here:
      https://www.filefactory.com/file/2o2enxmm73qo/Software_Installer_v.1.2.zip
      I have a lifetime account at FileFactory, so the link should never die and you do NOT need an account or pay them money to download. Simply choose the free/slow download option. The file is small and will still download fairly quickly. If you have trouble downloading it, PM me. I have the previous versions of this script, but they are inferior to this version, so if you want the older versions, PM me and I will provide them.
      If you just want the bare minimum, the script, installers.db and changelog are attached on this forum below.
      Enjoy!
      Software Installer.au3 Installers.db Changelog.pdf
    • By WindIt
      Hi, 
      I have a set of excel docs 1& 2
      1) In Excel 1 i have a fixed column called dimensionId that contains list of dimensionid's with in between empty cells.
      Here, For each dimesionId, i need to check corresponding columns of L,M,N ,O(senior, mid, junior, student) & check If they contain letter Y (Open excel 2) and if empty ignore,check next.
      I need to loop through the entire column of dimensionId one by one, please help me proceed with the logic.
      2) If letter Y exists, open excel 2 and check if same dimesionId exists in column A.
      New to autoit excel automation, Help me with logic to execute this.
      #include <Excel.au3>
      Global $oExcel = _Excel_Open()
      Global $oWorkbook = _Excel_BookOpen($oExcel, "D:\yta\Trial concept dimensions list.xlsx")
      Local $read1 = _Excel_RangeRead ($oWorkbook,Default,"C3")
      MsgBox(0,"",$read1)
      Attached exce 1 doc.
       
       
      exl1.xlsx exl2.xlsx
    • By Earthshine
      This is pretty useful to me at least, I hope to others. Whenever you need to poke a button or such on a GUI, you can just make calls to this UDF and instruct it how long to wait, 0 is forever, anyway, let the code to the explaining. Feel free to help expand this UDF. I plan to create new ones as I go along that support all the Win32 and .NET Controls. Ultimately, I would like to be able to fully control any type of control, this works well with most. Just an example of what you can do.
      NOTE: Logger Author(s) .....: Michael Mims (zorphnog)
      ;                    the logging script can be obtained here
      ;                   https://www.autoitscript.com/forum/topic/156196-log4a-a-logging-udf/
       
       
       
       
       
       
       
      WaitForControls.au3 log4a.au3
×
×
  • Create New...