Jump to content
AC Tool Forums
Sign in to follow this  
bobisbob

Right arrow key doesn't work

Recommended Posts

Hi, i used  the code {RIGHT} , or {LEFT}, or the d key for movement, and they don't move much at all. i put delays.

it moved twice only for less than even 1 sec. everything else on the script works fine, which i pasted below in Quote. i did do muliple of Keys {RIGHT}, but i want it to hold down the right arrow/d key for 2 secs, i tried keydown, but that didn't work or i don't know how to use the keydown code.

Keys {RIGHT}
Delay 2 sec
Keys {RIGHT}
Keys {RIGHT}

also.............
keydown {RIGHT}  <-----lags my computer

i'm on windows 10, directx 10.

Thanks for looking.

 

Quote

SetActiveWindow 4220
Commanddelay 10
ObjVar 10

Procedure ComboItUP
keys 1
DELAY 0.1 sec
keys ]
Delay 0.1 sec
keys 2
Delay 0.1 sec
keys 3
Delay 0.1 sec
keys ]
Delay 0.1 sec
keys {RIGHT}
Delay 2 sec

end


while 1=1
call ComboItUP
end

 

Edited by bobisbob

Share this post


Link to post
Share on other sites

First of all you are using the wrong command to hold any key down. It does not matter if you put a delay after a Keys command. It will only send to the application/game a simulation of the key being pressed once on the keyboard.

The correct and only command to press and hold a key down is the KeyDown command.

12 hours ago, bobisbob said:

also.............
keydown {RIGHT}  <-----lags my computer

With this as the only example of your work with this command. All I can say is, that you are not using the proper syntax for this command.

 

 

Share this post


Link to post
Share on other sites
Quote

All I can say is, that you are not using the proper syntax for this command.

What about the d key, you know w, a, s, d keys for movements, D key, how would i write it to press down the D key for seversal seconds?

Share this post


Link to post
Share on other sites

I'm assuming that you have already read the AC Tool Help file. But, some how you must have missed this.

From the AC Tool Help File:

AC_Tool_Help_-_KeyDown.png

 

As you can see from Help file. On a single line you give the KeyDown command. You then tell it what key to hold down. And then you tell for how long you want it to be held down.

So in the first example, as shown in the help file, KeyDown A 1 sec, will hold down the A key for 1 second and then release it.

It does not matter if the key being held down is a special key, like the {RIGHT} key, or a regular key. You still have to have everything required for the command to work properly.

Share this post


Link to post
Share on other sites

It is not AC Tools lagging you then, sorry.

 

Below is 2 examples that may help you, copied from a macro I use.

keyrate 150 // Any lower macro fails.(try mouse delay time?)
MouseClickDelay 30 // adds a small timer slowing mouse button clicking

Share this post


Link to post
Share on other sites
32 minutes ago, Ego said:

It is not AC Tools lagging you then, sorry.

 

Below is 2 examples that may help you, copied from a macro I use.

keyrate 150 // Any lower macro fails.(try mouse delay time?)
MouseClickDelay 30 // adds a small timer slowing mouse button clicking

like that ??? how would i add or what to add and where?

 

Keydown d 2 sec

keyrate 150
 

Share this post


Link to post
Share on other sites

beginning of script

keyrate 50
MouseClickDelay 50
While 1 = 1
  ProcessMessages
  delay 1 sec
End

 

or,

if you want the keyrate to go slower when typing words you would use

keyrate 150

keydown d 2000 // change to suit, lower is faster

keyrate 1

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and to our Privacy Policy.