Jump to content

Holding down keyboard keys


Orange9
 Share

Recommended Posts

Er...i dont know how to hold down a certain key on the keyboard. I've read the help function n it gave me various commands for it, but the parameters dont make sense. For example the Opt("SendKeyDownDelay", x) where x is the number of milliseconds. Well, it requires me to input the amount of time to hold the key for, which is great, but where do i input the actual key that it presses? For example if i wanted to hold down the key "a", where do i put that?

Link to comment
Share on other sites

Opt("SendKeyDownDelay", 1000);set subesquent keys to be held down for 1000ms

send("a");key a is held down for 1000ms then released

.

.

.

Opt("SendKeyDownDelay", 10);keys will be held down for 10 ms from now on

Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
Link to comment
Share on other sites

Opt is an alias for AutoItSetOption, which is function that is used to configure how some

parts of AutoIt works. It doesn't do any action in itself.

When using Opt with "SendKeyDownDelay" you set how long the release-delay for Send

should be, for example when you send "a". However when you use Send like this-is-me

showed, sending "{a down}", I believe it's up to the scripter to manually release it, by

sending "{a up}".

So, what do you want ? Do you want the script to just send "a" and then continue, or do

you want the script to hold down "a", do some stuff and then release "a" again ?

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