Jump to content
Sign in to follow this  

ControlGetText and ControlSetText

Recommended Posts


I am working on a small script to populate settings for a recording system, I can receive the text that is in the Edit boxes of the screen but ControlSetText or ControlSend do not do anything yet the ControlSend returns 1.


>>>> Window <<<<

Title: Global Settings Setup

Class: WindowsForms10.window.8.app.0.378734a

Position: -3, -3

Size: 416, 500

Style: 0x17C80000

ExStyle: 0x00050100

Handle: 0x0015051E

>>>> Control <<<<

Class: Edit

Instance: 1

ClassnameNN: Edit1

Advanced (Class): [CLASS:Edit; INSTANCE:1]

ID: 1001


Position: 152, 28

Size: 222, 15

ControlClick Coords: 171, 4

Style: 0x50000380

ExStyle: 0x00000000

Handle: 0x0010055C

>>>> Mouse <<<<

Position: 323, 52

Cursor ID: 15

Color: 0xFFFFFF

>>>> StatusBar <<<<

WinWaitActive("Global Settings Setup")
WinActivate("Global Settings Setup")
$var = ControlGetText("Global Settings Setup", "", "Edit1")
ConsoleWrite($var & @CRLF)
$var2 = ControlGetText("Global Settings Setup", "", "Edit2")
ConsoleWrite($var2 & @CRLF)
ControlSend("Global Settings Setup", "", "Edit1",$IP & "\JAVS",1)
ControlSend("Global Settings Setup", "", "Edit2",$IP,1)

Both of the GetText commands return the values that are originally there.

Share this post

Link to post
Share on other sites

I'm not sure I can help but wanted you to try another test. Controlsend is just a glorified send..right?

Try doing a controlfocus or controlclick then just do a normal send.

Help says that controlsend is unreliable for command prompts, perhaps this control is another one that is proving unreliable...?

Share this post

Link to post
Share on other sites

Thanks, but the send does not do anything either. But I can do a ControlGetText with no problem to that control.

Share this post

Link to post
Share on other sites

It was UAC that was causing the issue, disabled it through the registry.

Share this post

Link to post
Share on other sites

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

Sign in to follow this  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.