Jump to content

Simple question about Send function


Recommended Posts

Hello everyone,

I was trying to search for this topic, but couldn't find anything what i need.

My problem is that when i use "Send" function with "down" parameter the LCTRL stays pressed after i use "up" parameter, for example:

Sleep(100)
Send("{LCTRL down}")        ;Holds the LCTRL key down
MouseClick("left", 940, 646, 1, 1)  
Sleep(1000)
Send("{LCTRL up}")

After this code LCTRL is still pressed until i press LCTRL by myself. How can I fix it that it would be hold up?

Thanks,

Andrew

Link to comment
Share on other sites

sorry i should read the post properly. Have a look at SendKeyDownDelay

Edited by bo8ster

Post your code because code says more then your words can. SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y. Use Opt("MustDeclareVars", 1)[topic="84960"]Brett F's Learning To Script with AutoIt V3[/topic][topic="21048"]Valuater's AutoIt 1-2-3, Class... is now in Session[/topic]Contribution: [topic="87994"]Get SVN Rev Number[/topic], [topic="93527"]Control Handle under mouse[/topic], [topic="91966"]A Presentation using AutoIt[/topic], [topic="112756"]Log ConsoleWrite output in Scite[/topic]

Link to comment
Share on other sites

I have tried using SendKeyDownDelay but still LCTRL holds down after this script has finished.

Here is different places where i tried to use it, still it don't help. As i know, same happens with SHIFT button.

Any ideas?

Sleep(3000)
;Opt("SendKeyDownDelay", 1000)
Send("{LCTRL down}")                        ;Holds the A key down
;Opt("SendKeyDownDelay", 1000)
Sleep(100)
MouseClick("left", 940, 646, 1, 1)
;Opt("SendKeyDownDelay", 1000)
Sleep(1000)
Send("{LCTRL up}")
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...