Jump to content

Recommended Posts

Posted

Hello guys, i need help for a tiny trouble

I'm creating a watchdog in autoit 3, and i need to check how much instances of a executable are open, basically, 10 instances of nox.exe may be open, and if less than 10 instances are open my script will do a correction process, so i wanna count how much executables are open.

Note: i can't do it with pid variables, autoit cannot start the main executable (and so capture the pid) itself cuz needs some unknown arguments. The executables starts using clicks in the main screen of nox. I wanna count the "nox.exe" times.

Thanks in advance!

  • Developers
Posted
30 minutes ago, W4lk3r said:

Note: i can't do it with pid variables, autoit cannot start the main executable (and so capture the pid) itself cuz needs some unknown arguments.

Sounds pretty strange....   can you elaborate?

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

Posted

Simple.

I start 10 instances of a program called "nox.exe", so 10 process nox.exe will be visible in windows task manager.

My auto it script monitores the quantity of instances of nox.exe are running.

If 10 instances are running, nothing happens;

If one or more instances crash, will rest less than 10 stances, so the script will reboot the computer.

I wanna know what function i can use to count the number of processes nox.exe still running.

 

  • Developers
Posted

My quote was about not being able to use Run()  to capture the pid, which you said isn't possible.
I was just wondering why? 

Could you share what you have so far so we understand what needs to be changed?

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

Posted

Well,

nox is a Android emulador and every instance is a virtual machine, all the instances uses the process "nox.exe", If i use run() i'll need to put some parameters in the executable shortcut to open an especific virtual machine (only running nox.exe just open the first virtual machine). So, the parameters to do this are unknown, to open 10 instances i'm using nox multi instance manager, a clickable interface where my script just click in "start" of every VM present in this...

And, i can't use run :(

Cuz i don't know the parameters to start all the 10 virtual machines.

If i find a way to create 10 shortcuts to start the 10 virtual machines i will able to use run() and capture the pid of every instance.

But its a thing that i'm searching for until now.

Thanks for the patience.

Posted

Thanks for the help!

Finally i finded the parameter:

Nox.exe -clone:(the nox  folder)

every folder contains one virtual machine, put the folder name after -clone parameter will start the specified virtual machine.

 

now i'm able to use run() and store every pid!

 

thanks! 

Posted

But its the first part

Now i can save the pid of every process but, how can autoit can check if the process still open?

 

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
×
×
  • Create New...