Insert Username with UIA (UI automation)

Get help with using AutoHotkey and its commands and hotkeys
Posts: 16
Joined: 18 Jun 2019, 01:37

Insert Username with UIA (UI automation)

01 Jul 2020, 05:52

I used this wrapper from jethrow
trying to insert with UIA the username to windows security question.
Unfortunalty username does not insert. Anyone who has a idea?
Thank you!

Code: Select all

#include UIA_Interface.ahk

hwnd:= WinExist("Windows-Sicherheit ahk_class Credential Dialog Xaml Host")

uia := UIA_Interface()
xd := uia.ElementFromHandle(hwnd)
condition_user := uia.CreateAndConditionFromArray([uia.CreatePropertyCondition(UIA_ControlTypePropertyId := 30003, button := 50004, VT_I4 := 3), uia.CreatePropertyCondition(UIA_NamePropertyId := 30005, "Benutzername", VT_BSTR := 8)])
element_user := xd.FindFirst(condition_user, TreeScope_Element := 0x1)
IAccessible := element_user.GetCurrentPatternAs("LegacyIAccessible")
Security.jpg (16.86 KiB) Viewed 605 times

Return to “Ask For Help”

Who is online

Users browsing this forum: Bing [Bot], Google [Bot], InGearX, mikeyww, RayB and 38 guests