Jump to content

Running autoit3.exe insice batch script never finishes

Recommended Posts

I need to run my autoIt3 script from inside another program, I'm actually calling autoit3 from C# .NET. When does the script engine actually ever terminate?

I am miss-understanding the way autoIt is intended to be used, since in a control fashion; my calling application has no way of knowing when the script has completed (unless of course the script sets some kind of mutex that my C# code waits upon).

I have managed to work around things by creating a marker file as the last thing my script does, containing a "exitcode", the caller then kills off the autoIT executable once it see the file get created, but this feels like a very brutish approach. Does the script engine have an engine-exit verb/function? I need to run a series of scripts and in this case killing the autoit3.exe tray application is not necessary after each script, but this way of working does cloud things.

Basically why does autoIT not support running scripts in the same fashion as I would perl, python, powershell, etc scripts?

Edited by zaphodikus
Link to post
Share on other sites

Well, without seeing the AutoIt code it is not easy to say something about your issue.

It depends on the code whether it exits or stay in a loop.



Please don't send me any personal message and ask for support! I will not reply!

Selection of finest graphical examples at Codepen.io

The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯  ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ

Link to post
Share on other sites

My bad.

I knew I was missing something vital, my script was actually paused, but I thought the tray icon always did that at the end, it was stuck on this line

WinWait("controller") ; wait for control

Is there a way to see which line number I am on when it shows paused? Since I pause at various points once my script gets bigger it gets harder to know.

Anyway, at least I found my script bug :-)

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
  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...