Sign in to follow this  
Followers 0
Dracil

Run Two Code at same time?

8 posts in this topic

Lets say ive made an code with loops and all that does stuff, however at the same time as i run this code i would like to run another, similair code does that works?

The functionaily i want is like making 2 autoitscripts, two diffrent files that i simply start at the same time. But, is there any easier way? maybe isntead of running 2 apps i can make them run at same time iside my script ? =/

Thanks in advance

Share this post


Link to post
Share on other sites



nope sorry. Its one of the things on the "not todo list"

Multi-threading: It's too late to do this now. The changes required to AutoIt are too great. AutoIt was never intended to be multi-threaded. Writing a multi-threaded application requires an entirely different mindset when writing a program. We did not start with that mindset and trying to retrofit something as significant as multi-threading onto the existing code base is not worth the time or effort. It would be far more beneficial to re-write AutoIt and add in multi-threading that way. That, however, is not planned and is a massive undertaking.

Mat

Share this post


Link to post
Share on other sites

The functionaily i want is like making 2 autoitscripts, two diffrent files that i simply start at the same time. But, is there any easier way? maybe isntead of running 2 apps i can make them run at same time iside my script ? =/

Although what you're technically asking for is Multi Threading (as Mat said, it's not on the to-do list), you could theoretically, have three scripts. Two doing what you want them to, and the other running them both. You could then either send commands from one script to the other, or send the commands through the runner script.

This is what people have been doing for a while (in other languages too) so it should work just the same, in principle.

Share this post


Link to post
Share on other sites

Ok thanks guys, i will run several scripts then, any easy way to send commands/data between the scripts? rather than letting them push each others buttons on a gui.

Share this post


Link to post
Share on other sites

Thanks alot! btw is it possible to send commands to an non au3 application without opening/activating it first?

Share this post


Link to post
Share on other sites

i'd use an ini file for both of them as a way of communicating both of them but... never actually thought of making something like this...

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0