Sign in to follow this  
Followers 0
Akshay07

CTRL key stays down despite a Send("{LCTRL up}")!

7 posts in this topic

Hello all,

I am having trouble with the control of the CTRL key!!!

In my script, I have at some point

Send ( "{LCTRL down}" )

and it works great. All the subsequent actions shows that my left CRTL key is being held down, that is perfect.

The last line of my script is

Send ( "{LCTRL up}" )

and this does not work!!! I have to press manually the left CTRL key to get back my keyboad to normal, after the script has ended.

This is 100% reproducible. The script is an small one, no call to any function or anything like that. It is running the lines one by one and then exit.

Any idea what is wrong?

Share this post


Link to post
Share on other sites



Does adding either of these to the end of the code help?

Send ( "^" )

or

Send ( "{CTRLUP}" )

- Bruce /*somdcomputerguy */  If you change the way you look at things, the things you look at change.

Share this post


Link to post
Share on other sites

No it doesn't, but I think I have a good idea of what is wrong (doesn't mean that I have a solution ;))

When I send this command, the focus is on an image embeded in an excel spreadsheet.

I tried to move the focus to another cell before sending the Send("{LCTRL up}") command, without success.

Share this post


Link to post
Share on other sites

... why do you have a space between ctrl and up? i.e. ("{ctrlup}")


<--a good way to start you day

Share this post


Link to post
Share on other sites

... why do you have a space between ctrl and up? i.e. ("{ctrlup}")

Well, the help says

"To hold a key down (generally only useful for games)

Send("{a down}") ;Holds the A key down

Send("{a up}") ;Releases the A key"

Am i misunderstanding it?

Share this post


Link to post
Share on other sites

to send ctrl+a i would do:

send ("{ctrldown}")
send ("a")
send ("{ctrlup}")

ive never done this for a game though. are you using v3?


<--a good way to start you day

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

There was a conflict with another part of the script, and I also was not using the right stuff. It is now solved, thanks to your indication.

Thanks for your help and enjoy New Year's Eve!!!!

Edited by Akshay07

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