Executing Multiple macros

Hints, tips and tricks for newbies

Moderators: Dorian (MJT support), JRL

Post Reply
pilly
Newbie
Posts: 3
Joined: Thu Jul 27, 2023 3:49 pm

Executing Multiple macros

Post by pilly » Thu Jul 27, 2023 4:35 pm

Hello. Before I purchase this software I need to confirm that it will do a few things

I need to be able to execute multiple simple recorded macros in a list. My vision is to do so using command prompt or some command line type thing. Where I create a list of macros and then paste in command prompt and they run one after the other.

something like this:

call macro 1
call macro 2
call macro 3
etc.

I was able to partially accomplish this with another simple macro recording software however the issue was cmd would open the file in the recorder software but I would have to manually press play on each one. I want to make sure it is possible to run these macros automatically when the program opens.

I also need to be able to use text recognition where the macro find specified text then moves the mouse cursor over it. Is this a feature in macroscheduler? (It is in my current macro recorder)

I also need to make sure that macro scheduler supports variables. basically i want to have a text variable I can change that the program will search for

Thanks

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

Re: Executing Multiple macros

Post by Dorian (MJT support) » Thu Jul 27, 2023 5:37 pm

This answers your question regarding running from the command line and passing variables.

Of course you can also have a script which uses the Macro command to call multiple scripts in a row.

I have just answered a very similar question to this via tech support, so will leave the text question for that channel.
Yes, we have a Custom Scripting Service. Message me or go here

pilly
Newbie
Posts: 3
Joined: Thu Jul 27, 2023 3:49 pm

Re: Executing Multiple macros

Post by pilly » Wed Aug 02, 2023 1:30 am

Hello I am trying to run 2 recorded macros back to back with variables
I have created a 3rd macro to do so below

https://ibb.co/9T4wsg6

When I run it I am faced with this error

https://ibb.co/jHVNfMh

I have looked through the resources you gave me and based on that this should work. What am I missing?

Does it have something to do with the fact that the macros are recorded ones?

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

Re: Executing Multiple macros

Post by Dorian (MJT support) » Wed Aug 02, 2023 7:04 am

It shouldn't matter if they are recorded. It's the path. It's looking in the Program folder instead of the data folder.

Try this (edit if you've put the script somewhere else).

Code: Select all

Macro>%SCRIPT_DIR%\MyScript.scp
Also you don't have to go to the trouble of screenshots to post code. You can use the button at the top of the editor that looks like this.. < / >
Yes, we have a Custom Scripting Service. Message me or go here

pilly
Newbie
Posts: 3
Joined: Thu Jul 27, 2023 3:49 pm

Re: Executing Multiple macros

Post by pilly » Wed Aug 02, 2023 4:48 pm

Perfect that worked the last thing is I try to call variables into my macro from the line
Macro>%SCRIPT_DIR%\ITEMNUM.scp/ITEMNUM=2

However when the macro runs it runs with the variable set to whatever it is stated within the code

(The first line of itemnum.scp says Let>ITEMNUM=1)

I want the stated variable to override the one in the code.

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

Re: Executing Multiple macros

Post by Dorian (MJT support) » Wed Aug 02, 2023 5:01 pm

If you're passing 2, but the first line of the macro you're running set it to 1, then it will use 1. That makes perfect sense if you think about it. You can simply comment out (or remove) line 1 in ITEMNUM.scp

Code: Select all

//Let>ITEMNUM=1
Yes, we have a Custom Scripting Service. Message me or go here

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