Jump to content

Recommended Posts

Posted
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.

Posted
_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

Posted (edited)
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
Posted

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

Posted
_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"

 

Posted
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

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
×
×
  • Create New...