Skip to content

Can not read text of two textfields #3

Description

@bstar77

I'm trying to read the text of two textfields.

`NameProperty := "Vorname"
condition1 := uia.CreatePropertyCondition(UIA_NamePropertyId, NameProperty, VT_BSTR)

mycontrol := crm_window.FindFirst(condition1, TreeScope_Descendants)
str1 := mycontrol.GetCurrentPropertyValue(UIA_ValueValuePropertyId)

NameProperty := "Kundennr."
condition2 := uia.CreatePropertyCondition(UIA_NamePropertyId, NameProperty, VT_BSTR)

mycontrol := crm_window.FindFirst(condition2, TreeScope_Descendants)
str2 := mycontrol.GetCurrentPropertyValue(UIA_ValueValuePropertyId)`

str1 gives me the text of control 1.

Second request does not work. str2 would be empty in the code above. What could be the problem?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions