Go Back   CodingForums.com > :: Computing & Sciences > Computer Programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 06-01-2012, 06:36 AM   PM User | #1
brobyn
New to the CF scene

 
Join Date: Jun 2012
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
brobyn is an unknown quantity at this point
Help needed with VBScript closing a process when its idle

Hey,

I'm looking at trying to get a vbscript that checks if a specific application is idle and if so kills the process.

I've currently got a script to open the application and run an interface, however once the interface job is complete I need it to close the app.

I can't use wScript.Sleep as it depends on how much data is being processed before its to be closed, so ideally what I need is it to check if it's using 00 CPU in Task Manager and if so kill it, if not keep looping until it is.

So for an example:

I have notepad.exe open. The script checks to see if its idle. If it's using 01 CPU or more then to loop and check again until its at 00.
Once it gets to 00 CPU, kill notepad.exe

I'm quite new to using vbscripts so any help would be greatly appreciated.
brobyn is offline   Reply With Quote
Reply

Bookmarks

Tags
idle, kill, process, vbscript

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 08:29 PM.


Advertisement
Log in to turn off these ads.