Sign in to follow this  
Followers 0
Adrian

How to run compiled autoit syncronously from a batch file

6 posts in this topic

Hi,

I want to run a compiled autoit program from a batch file and have execution of the batch file wait for the autoit to complete (like the like the AutoIt RunWait command!).

How can i do this? By default (at least on my vista machine) it runs asyncronously.

Thanks

Adrian

Share this post


Link to post
Share on other sites



I want to run a compiled autoit program from a batch file and have execution of the batch file wait for the autoit to complete (like the like the AutoIt RunWait command!).

How can i do this? By default (at least on my vista machine) it runs asyncronously.

You can sync them with a flag file that the batch checks for existence or with a registry value that gets changed.

:)


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

You can sync them with a flag file that the batch checks for existence or with a registry value that gets changed.

:)

Yeah, I suppose so but it's a bit "eeewww". Still, the old ways work I suppose. Thanks

Share this post


Link to post
Share on other sites

Yeah, I suppose so but it's a bit "eeewww". Still, the old ways work I suppose. Thanks

Running an executable from a batchfile with the CALL command works.

I tried:

--- autoit test.au3 ---

For $a = 1 To 5
    MsgBox(0,0,$a)
Next
--- /autoit ---

Compiled that to test.exe, then did:

--- batchfile t.bat ---

@echo off
echo start
CALL test.exe
echo finish
--- /t.bat ---

Then ran t.bat from a cmd.exe, and it echoes start, then five popup boxes appear like you would expect, and only when those five boxes are closed and the autoit exe exits, the batchfile echoes finish. As far as I understand this is what you meant?


Roses are FF0000, violets are 0000FF... All my base are belong to you.

Share this post


Link to post
Share on other sites

:)

Anything wrong with call on XP/Vista?

This seems to work for me on w2k.

call autoitprog.exe
echo I'm all done now!

Or did I misunderstand the question?

Share this post


Link to post
Share on other sites

SadBunny, Uten,

Ooops! Elementary batch file programming! *blush*

Thanks for your time

{Shuffles off mumbling to himself, "How long have I been in IT?... 27 years... *sigh*}

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