tk1

While loop creates multiple instances of autoit3.exe running

6 posts in this topic

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

Share this post


Link to post
Share on other sites



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


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

Ok, I will do. It concerned me because I've never seen SciTE do that before.

Thanks again!
tk1

Share this post


Link to post
Share on other sites

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


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

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