hydroxide Posted May 14, 2008 Share Posted May 14, 2008 I have two AU3 scripts, say: wrapper.au3 chocolate.au3 chocolate.au3 has some code without any UI wrapper.au3 calls chocolate.au3 to execute. Once the execution of chocolate.au3 has completed, wrapper continues with the rest of its code. How do you get wrapper to launch chocolate and wait till its execution is complete? I've tried implementing it through processwaitclose() but it failed.. Wrapper code is goes like this statement1 statement2 $cpid=Run("C:\Program Files\AutoIT3\AutoIT3.exe C:\whatever\chocolate.au3") ProcessWaitClose($cipd) statement3 statement4 When I run wrapper, the above code executes statement3 in wrapper immediately after launching chocolate. How do I get it to wait till chocolate.au3 has completed execution? Any solutions? Thanks in advance, Link to comment Share on other sites More sharing options...
James Posted May 14, 2008 Share Posted May 14, 2008 Put Chocolate.au3 in the same dir as the wrapper.au3 then at the top of your code, put this #include "chocolate.au3" Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
hydroxide Posted May 14, 2008 Author Share Posted May 14, 2008 Put Chocolate.au3 in the same dir as the wrapper.au3 then at the top of your code, put this #include "chocolate.au3" Jee!! .. simple solution .. However, putting #include at the top (as it should) would execute code within it before anything else.. I tried squeezing it in between my statements in wrapper, and it seemed to work without complaints, even with multiple include lines to the same file. .. Looks a little funny, .. probably isnt best practice either ... but hey!... it works .. Thanks for the simple solution My wrapper looks like this now: statement1 statement2 #include<chocolate1.au3> #include<chocolate2.au3> #include<chocolate1.au3> #include<chocolate2.au3> statement3 statement4 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now