An example of UIAutomation
Not logged in
This forum is sponsored by Mistachkin Systems.
Eagle: Secure Software Automation
Hello, 

I wrote an example code at the bottom of this post referring to your example eagle code to automate Windows calc.exe. (examples\\ex2.eagle)

However, it failed to run due to this error.

```
object invoke ClientSettings RegisterClientSideProviderAssembly [$assembly GetName]
#=> {object or type "ClientSettings" not found} {expected type value but got "ClientSettings"}
```

How can I invoke the class, ClientSettings?

Versions are as follows.

```
Eagle 1.0.7945.33333 trusted genuine official stable beta {14th Anniversary Extra Special Edition, Beta 49} NetFx20 Release {Tcl 8.4.21} {2021.10.02T02:03:20.000 +0900} daa68e5dfb3a38507491509ea8bca0e9be3c937b {2021-10-30 21:49:53 UTC} {Microsoft.NET 4.0.30319.42000 [4.8.4515.0 built by: NET48REL1LAST_C] 528372} {Windows NT} intel

Garuda 1.0 daa68e5dfb3a38507491509ea8bca0e9be3c937b {2021-10-30 21:49:53 UTC}
```


```eagle_uia.tcl
package require Garuda

puts [eagle version]
puts [garuda packageid]

eagle {
	object load UIAutomationClient
	object load UIAutomationTypes
	object load UIAutomationProvider

	set assembly [object load -alias UIAutomationClientsideProviders]
	object import System.Windows.Automation
	object invoke ClientSettings RegisterClientSideProviderAssembly [$assembly GetName]

	set prop(aid) [object invoke AutomationElement AutomationIdProperty]
	set prop(name) [object invoke AutomationElement NameProperty]
	set patt(invoke) [object invoke InvokePattern Pattern]

	set elem(root) [object invoke -alias AutomationElement RootElement]

	set cond(sample) [object create PropertyCondition $prop(name) "Open the Sample Window"]
	set elem(sample) [$elem(root) -alias FindFirst Children $cond]

	[$elem(sample) -alias GetCurrentPattern $patt(invoke)] Invoke
}

```