How to send two keys at same time?

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
ca10c3sar
Newbie
Posts: 16
Joined: Thu Apr 13, 2017 7:36 pm

How to send two keys at same time?

Post by ca10c3sar » Sun Nov 05, 2017 4:22 am

How i could send two keys at same time?. I need my script send S and F keys at same time.

Tried that way, no sucess
Send>sf
Send>s,f

Also tried holdkey but it seens to hold only one key each time

Press doesnt work with non character keys so i cant use press/release :cry:

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

Re: How to send two keys at same time?

Post by Marcus Tettmar » Sun Nov 05, 2017 9:47 am

You'll have to go lower level. Search this forum for Keybd_Event.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

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

ca10c3sar
Newbie
Posts: 16
Joined: Thu Apr 13, 2017 7:36 pm

Re: How to send two keys at same time?

Post by ca10c3sar » Sat Dec 02, 2017 1:20 pm

Hi i did what you said, and searched but i still dont got how i can do it, my script:

I'm trying do the script send S and F keys at same time "SF"

Code: Select all



Setfocus>NET LIMITER*
Wait>1

Let>VK_RETURN=83  //vk of S key

Let>ExtendedKey=1
Let>KeyUp=2

Send>F
LibFunc>user32.dll,keybd_event,r,VK_RETURN,0,ExtendedKey,0

Let>FLAGS={%ExtendedKey% OR %KeyUp%}
LibFunc>user32.dll,keybd_event,r,VK_RETURN,0,FLAGS,0
LibFunc>user32.dll,keybd_event,r,VK_RETURN,0,ExtendedKey,0

Let>FLAGS={%ExtendedKey% OR %KeyUp%}
LibFunc>user32.dll,keybd_event,r,VK_RETURN,0,FLAGS,0


Wait>2

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