emulating repetitive keys strokes

Anything Really. Just keep it clean!

Moderators: Dorian (MJT support), JRL

Post Reply
Jakkson
Newbie
Posts: 3
Joined: Mon Sep 18, 2017 12:19 am

emulating repetitive keys strokes

Post by Jakkson » Tue Sep 19, 2017 12:15 am

i use a game client and have for some try to emulate the forward and reverse movements when holding the keys down as i dont have any idea why your products has a problem with this i cannot provide any further info, except to say that i use another product and it perform the task.

I am hoping that with some discussion about this i will give me insight, my hope is that i can then use one product to do all my tasks, yours being my preferred choice, if i cant resolve this i will continue to use both products.

Regards Stephen

User avatar
Marcus Tettmar
Site Admin
Posts: 7335
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Re: emulating repetitive keys strokes

Post by Marcus Tettmar » Tue Sep 19, 2017 9:06 am

Hard to comment at all without some idea of what code you are using and what's not working. Are you trying to simulate holding a key down?
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

Jakkson
Newbie
Posts: 3
Joined: Mon Sep 18, 2017 12:19 am

Re: emulating repetitive keys strokes

Post by Jakkson » Thu Oct 05, 2017 4:19 am

it is very simple w,s,a,d are the control keys for the client giving me forward, backward, left and right movement.

//Set IGNORESPACES to 1 to force script interpreter to ignore spaces.
//If using IGNORESPACES quote strings in {" ... "}
//Let>IGNORESPACES=1

//set focus to windows
// C:\Users\Stephen\AppData\Local\Temp\msrB151.scp
// Recorded on Thursday, October 5, 2017, at 02:55 PM

WaitWindowOpen>Default window
MoveWindow>Default window,0,0
ResizeWindow>Default window,1920,1040

/* what i require is to hold w key down for x number of milliseconds
e.g.
send>w
wait>10
send>w

e.g.
Press w
wait>10
Release 10
I know this only works with non-character keys

the process is simple, but the implementation is proving impossible

to do what i require in the other product I use is simply the commands

Keyboard : W : KeyDown
DELAY : 5000(milliseconds)
Keyboard : W : KeyUp

I then can compile into an exe and run

I have scanned your information and have not found a viable solution if you say it cant be done I am fine with that, but i would like to use just one product and your is the most flexible

*/

User avatar
Marcus Tettmar
Site Admin
Posts: 7335
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Re: emulating repetitive keys strokes

Post by Marcus Tettmar » Thu Oct 05, 2017 8:35 am

In Macro Scheduler 14.4 which was released yesterday you can use the HoldKey function:

//hold w for 500 milliseconds
HoldKey>w,500,0,0
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

Jakkson
Newbie
Posts: 3
Joined: Mon Sep 18, 2017 12:19 am

Re: emulating repetitive keys strokes

Post by Jakkson » Fri Oct 13, 2017 10:07 am

it's just like you wrote it for me great stuff thnx very much

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts