Sign in to follow this  
Followers 0
SpookMeister

Working with a second process

3 posts in this topic

Can someone help me out with an example of how to create and interact with a second application that the first application creates?

Here is the scenario:

I have a main script that is doing the bulk of the work, however when I kick off a few sub commands it briefly pauses my main program.

What I would like to do is create these sub tasks (which do not rely on anything in the main program) in a second hidden application and just do a ControlSend or stdoutread to the second application as needed. However I am having some trouble figuring out how to make it work, and I don't know what the most optimal method should look like.

Do I need to have my main program write the code for the second program (including a GUI with associated input boxes and buttons etc.) to a .au3 file and then compile and run that second program? Then interact with it via ControlSend like mentioned above?

I suppose I could compile the second program entirely and simply do a FileInstall of that into the main program... but is there a better way?


[u]Helpful tips:[/u]If you want better answers to your questions, take the time to reproduce your issue in a small "stand alone" example script whenever possible. Also, make sure you tell us 1) what you tried, 2) what you expected to happen, and 3) what happened instead.[u]Useful links:[/u]BrettF's update to LxP's "How to AutoIt" pdfValuater's Autoit 1-2-3 Download page for the latest versions of Autoit and SciTE[quote]<glyph> For example - if you came in here asking "how do I use a jackhammer" we might ask "why do you need to use a jackhammer"<glyph> If the answer to the latter question is "to knock my grandmother's head off to let out the evil spirits that gave her cancer", then maybe the problem is actually unrelated to jackhammers[/quote]

Share this post


Link to post
Share on other sites



Hi,

I guess fileinstalling the second script and then start it is the easiest way. So, give it a try.

So long,

Mega


Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Share this post


Link to post
Share on other sites

Here's a demo of such and arrangement, posted some time ago by a dashingly handsome antarctic flightless water fowl...

Using GUI Controls for interprocess comms

:whistle:


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

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