Jump to content

Can I send keys like {ENTER} or {TAB} or "!a" etc by using ControlSend()?


Recommended Posts

Posted

Can I send keys like {ENTER} or {TAB} or "!a" etc by using ControlSend()?

I want to navigate through different screens so let me know if I can do that.

Posted

Can I do controlsend based on object ID?

ControlSend ( "title", "text", controlID, "string" [, flag] )

You can obtain the Title and controlID with the AU3Info Tool (Au3InfoA.exe) located in the au3 install dir.

Best Regards

Posted

Whats the significance of flag "0" and "1".

I tried that but it didn't work.

ControlSend("CommandCentral", "Next", 3668, "{ENTER}", 0)

Posted

Whats the significance of flag "0" and "1".

I tried that but it didn't work.

ControlSend("CommandCentral", "Next", 3668, "{ENTER}", 0)

0 is you want to send special text like SHIFT, ALT and other like this.

1 is if you want to send raw text.

Posted

ControlSend("CommandCentral", "Next", 3668, "{ENTER}", 0)

Here I am trying to send Enter to Next button, why it is not happening?

Posted

The syntax looks right, so I guess the control can not be found. If

msgbox(0,"",ControlSend("CommandCentral", "Next", 3668, "{ENTER}", 0)) gives you a 0 that's the case.

Maybe try

ControlSend("CommandCentral", "&Next", 3668, "{ENTER}", 0)

or

ControlSend("CommandCentral", "", 3668, "{ENTER}", 0)

Posted

Tried those things guys, still not!

Try removing all references to a specific program from your ControlSend()

IE:ControlSend("NotePad","","","TestTest")

I've had a few video games I was making bots for that didn't have controls to get, and the command still works without it.

Posted

For notepad its easy as we are just sending text. What I want to accomplkish here is that there is a button next, I want to send ENTER to it to go to the next screen.

Any idea?

Posted

>>>> Window <<<<

Title: CommandCentral

Class: #32770

Position: 193, 128

Size: 639, 478

Style: 0x94CA02C4

ExStyle: 0x00010101

Handle: 0x00050398

>>>> Control <<<<

Class: Button

Instance: 11

ClassnameNN: Button11

Advanced (Class): [CLASS:Button; INSTANCE:11]

ID: 3668

Is this enough?

Posted

>>>> Window <<<<

Title: CommandCentral

Class: #32770

Position: 193, 128

Size: 639, 478

Style: 0x94CA02C4

ExStyle: 0x00010101

Handle: 0x00050398

>>>> Control <<<<

Class: Button

Instance: 11

ClassnameNN: Button11

Advanced (Class): [CLASS:Button; INSTANCE:11]

ID: 3668

Is this enough?

ControlClick("CommandCentral", "", "Button11")

I guess you could try ControlSend(), but why? ControlClick() is the usual way to click a button control.

:)

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Posted

ControlClick("CommandCentral", "", "Button11")

I guess you could try ControlSend(), but why? ControlClick() is the usual way to click a button control.

:)

ControlClick("CommandCentral", "", "Button11") <----------------- This doesn't work, did you try it at your end?

Posted

ControlClick("CommandCentral", "", "Button11") <----------------- This doesn't work, did you try it at your end?

I have used ControlClick() many times, yes. But I don't know what "CommandCentral" is, so I couldn't test it in that context. What is the app you are working with?

:)

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

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
  • Recently Browsing   0 members

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