Running Multiple Lines At The Same Time

Hints, tips and tricks for newbies

Moderators: Dorian (MJT support), JRL

Post Reply
Super
Newbie
Posts: 2
Joined: Mon Dec 26, 2022 11:48 pm

Running Multiple Lines At The Same Time

Post by Super » Mon Dec 26, 2022 11:52 pm

Id Wonder Is There Any Way To Run Multiple Lines At The Same Time
The Reason Is That Im Trying To TAS A Game And There Is No Tas For It, So I Need To Hold A and W At The Same Time, How Would I Doo It

Super
Newbie
Posts: 2
Joined: Mon Dec 26, 2022 11:48 pm

Re: Running Multiple Lines At The Same Time

Post by Super » Tue Dec 27, 2022 1:10 am

Sadly Ive Discovered The Game Doesn't Have Physic That Stay The Same, Still. It Could Be Usefull For The Future.

User avatar
Grovkillen
Automation Wizard
Posts: 1131
Joined: Fri Aug 10, 2012 2:38 pm
Location: Bräcke, Sweden
Contact:

Re: Running Multiple Lines At The Same Time

Post by Grovkillen » Tue Dec 27, 2022 3:05 am

Press and release commands are what you're looking for.
Let>ME=%Script%

Running: 15.0.27
version history

User avatar
Dorian (MJT support)
Automation Wizard
Posts: 1389
Joined: Sun Nov 03, 2002 3:19 am
Contact:

Re: Running Multiple Lines At The Same Time

Post by Dorian (MJT support) » Tue Dec 27, 2022 10:29 am

Grovkillen wrote:
Tue Dec 27, 2022 3:05 am
Press and release commands are what you're looking for.
Thank you for that suggestion. Initially I was thinking there wasn't a way at all because two lines can't be executed simultaneously, and was excited that you planted this seed in my head. But it's not something I can get to work in Notepad using regular character keys. I'd never considered using Press for anything other than non-character keys (the help file described it as intended for non-character keys, but that of course doesn't mean it won't work for others too). Alas, it seems that Press does not accept regular character keys. Definitely worth a try though. Other than this suggestion I can't think of any other ideas to press A and W simultaneously.

This is my (failed) attempt.

Code: Select all

run>notepad.exe
WaitWindowOpen>Untitl*
setfocus>Untitl*
WaitWindowFocused>Untitl*
wait>0.1

press A
press W
wait>2
release A
release W
Yes, we have a Custom Scripting Service. Message me or go here

User avatar
Grovkillen
Automation Wizard
Posts: 1131
Joined: Fri Aug 10, 2012 2:38 pm
Location: Bräcke, Sweden
Contact:

Re: Running Multiple Lines At The Same Time

Post by Grovkillen » Tue Dec 27, 2022 4:03 pm

Any text accepting fields will only register one pressed key at the time. You should try your code using some keyboard monitoring software.
Let>ME=%Script%

Running: 15.0.27
version history

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