Jump to content

How to run compiled autoit syncronously from a batch file


Adrian
 Share

Recommended Posts

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

Link to comment
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
Link to comment
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.

Link to comment
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?

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...