Running multiple loop script all in one

Creating complex macros, dialogs, solving complex tasks, programming.

Running multiple loop script all in one

Postby white700 on Thu Sep 14, 2017 8:00 pm

Hi, I was wondering if this was possible to run multiple scripts all within one big script,
the thing is each script need to be in a loop,
;script1
rep
perform xyz action

;script2
rep
perform xyz action

is it possible to have one big script running multiple little scripts running in a loop? or it can only
read line by line and cannot read multiple line at the same time?

id like to know how to make one big script instead of making individual loop script and opening 1 by 1
thank you in advance.
white700
 
Posts: 27
Joined: Sun Oct 12, 2014 9:51 pm

Re: Running multiple loop script all in one

Postby Gintaras on Thu Sep 14, 2017 8:27 pm

Run multiple scripts at the same time?

Macro Macro1018     ?
mac "sub.script1"
mac "sub.script2"


#sub script1
rep
,out 1
,0.5


#sub script2
rep
,out 2
,0.4

;how to stop them? Right click a folder in the "Running items" pane and check "+hidden". Then right click a script there...

Gintaras
Site Admin
 
Posts: 10412
Joined: Thu Dec 19, 2002 7:36 pm
Location: Lithuania

Re: Running multiple loop script all in one

Postby white700 on Fri Sep 15, 2017 5:28 am

Thanks a lot Gintaras, exactly what I wanted :)
white700
 
Posts: 27
Joined: Sun Oct 12, 2014 9:51 pm

Re: Running multiple loop script all in one

Postby white700 on Wed Oct 11, 2017 6:05 pm

I have one issue, when making an exe file with these multiple scripts the file doesn't seems to work, when I run the file it immediately close itself.
Can I make one exe file for all these scripts or I really need to make an exe file for each of my script?
white700
 
Posts: 27
Joined: Sun Oct 12, 2014 9:51 pm

Re: Running multiple loop script all in one

Postby Gintaras on Wed Oct 11, 2017 6:13 pm

Macro Macro1049     ?
int h1=mac("sub.script1")
int h2=mac("sub.script2")
wait 0 HM h1 h2 ;;this supports up to 4 handles. If need more, use array. More info in QM Help.
out "all threads ended"


#sub script1
rep 5
,out 1
,0.5


#sub script2
rep 4
,out 2
,0.4

;how to stop them? Right click a folder in the "Running items" pane and check "+hidden". Then right click a script there...

Gintaras
Site Admin
 
Posts: 10412
Joined: Thu Dec 19, 2002 7:36 pm
Location: Lithuania

Re: Running multiple loop script all in one

Postby white700 on Thu Oct 12, 2017 5:34 pm

thank you it worked :)
white700
 
Posts: 27
Joined: Sun Oct 12, 2014 9:51 pm


Return to Programming

Who is online

Users browsing this forum: No registered users and 3 guests