access controls on other windows

后端 未结 3 735
無奈伤痛
無奈伤痛 2021-01-15 12:41

How can I access to the controls on another application\'s window?
I need to change the value of that controls (like textboxes) or click on them (like buttons).
I th

3条回答
  •  长发绾君心
    2021-01-15 13:30

    you should use Windows APIs like EnumWindow or FindWindow then use EnumChildWindows API to find the controls in the target window, like the textbox you are looking for, then the API SetWindowText

    have a look here for some ideas: Why is EnumChildWindows skipping children? also search for these APIs names here in Stack Overflow and you will find many examples...

提交回复
热议问题