Jump to content

While loop creates multiple instances of autoit3.exe running


tk1
 Share

Recommended Posts

Hi all,

When I run the following script from within SciTE, it starts multiple instances of autoit3.exe.  Any idea why?

#include <services.au3>
#include <MsgBoxConstants.au3>

Global $sServiceName = "SensrSvc"
Global $sServiceStat = _Service_QueryStatus($sServiceName)

While $sServiceStat[1] < 4
    MsgBox(0, "Service Status", "The status of the " & $sServiceName & " service is:  " & $sServiceStat[1])
    Sleep(1000)
    $sServiceStat = _Service_QueryStatus($sServiceName)
WEnd

 

Thanks in advance for your help.

tk1

Link to comment
Share on other sites

  • Developers

Are you using the full version of SciTE4AutoIt3 which uses AutoIt3Wrapper? 

In that case there will be 3 instances of AutoIt3: 2 to run the AutoIt3Wrapper functionality and 1 for the actual script,

Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

Hi Jos,

Thank you for the quick response. Yes, I'm using the full SciTE version.

So, if I understand, the multiple instances is due to SciTE. However once I compile and then run the script, there will only be one instance of the script running, not multiple. Is that correct?

Thanks,
tk1

Link to comment
Share on other sites

  • Developers

It is how I designed AutoIt3Wrapper, which uses one instance to shell the actual script and capture the output and one instance to monitor the processes to be able to detect when something was closed.
In the beginning it was a compiled version of Autoit3Wrapper which was ran 2 times, but I changed that to actually running the script with AutoIt3 as we had regularly false positives for the compiled scripts.

Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

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...