Jump to content

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.

Info

>>>> 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

Text:

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.

Link to comment
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...?

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...