Jump to content
Sign in to follow this  
sl_alagappan

ControlSend with special keys ( v.83 )

Recommended Posts

Can anybody tell me the special keys tested with ControlSend command of v.83?

sending {ENTER} key failed for me.

Below is the code tried

$Var="test"
ControlSend($ChildWindowTitle, $ChildWindowText,"Edit3",$Var & "{ENTER}",0)

Share this post


Link to post
Share on other sites

Only Text for now as far as I know, but they are adding in new stuff every release. Stay tuned I guess. I keep testing my chr() as well each release. :whistle:


AutoIt3, the MACGYVER Pocket Knife for computers.

Share this post


Link to post
Share on other sites

The only one that doesn't work for me is ALT combos like !f. I had some code that almost got it to work (brought up a menu) but it failed when the window was not active so I removed it.

{ENTER} works fine here under XP though.

Edit: Just tested {ENTER} under 95 and it works here.

Share this post


Link to post
Share on other sites

This is the sort of code I've been testing:

If WinExists("Document - WordPad") Then
    WinActivate("Document - WordPad")
Else
    Run("write.exe")
EndIf

WinWaitActive("Document - WordPad")

Sleep(2000)
ControlSend("Document - WordPad", "", "RICHEDIT50W1", "1234{ENTER}{LEFT 2}{ASC 65}")

Share this post


Link to post
Share on other sites

Sorry, I was just testing it out and home and this is the one machine I didn't update.

Every command works great for me now.

It was pretty funny since I had all the {} command in one file.

Anyhow My appologies, and I couldn't edit my post fast enough.

...edit CHR() work fine as well. and {enter} works on win2000 as well

Edited by scriptkitty

AutoIt3, the MACGYVER Pocket Knife for computers.

Share this post


Link to post
Share on other sites

Most likely not the names, but the program you are doing it on. A lot of programs have layers, and controlsend doens't work well. Like IE and these edit boxes for instance.

Can you send control text?


AutoIt3, the MACGYVER Pocket Knife for computers.

Share this post


Link to post
Share on other sites

ControlSetText works with CHR(13). Have not tried with {ENTER} for ControlSetText.

From AutoSpy, could see a control called "SS32D25EditHScroll1". On the screen, it seem to be a grid control. Send() works fine here. but unable to use ControlSend().

any idea?

Share this post


Link to post
Share on other sites

for ControlSetText(), i need to press the ENTER key so that, application validates the input and fills up other related fields with corresponding values. If no enter key pressed, other fields won't be filled up.

Seems ControlsetText() does not support {ENTER} key for Edit boxes.

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  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...