Problems with Closing Programs
Moderators: JRL, Dorian (MJT support)
Problems with Closing Programs
We have a manufacturing package that has multiple seperate instances of Print Queues that need to be opened. I am able to easily get the OPEN sequence to run for all 5 queues.
The problem is to close the queues I am having a hard time finding the easiest way to do this. Each Queue window that opens for all 5 has the same window name called "Queue Log". So I can't tell it to get focus on a window with that name because all 5 of them have this name.
Each instance of the Queue shows up in XP under Processes as a file of PROWIN32.EXE
Is there a way I can have it looks for running processes and kill each one at a time since they all have the same name?
Help!
The problem is to close the queues I am having a hard time finding the easiest way to do this. Each Queue window that opens for all 5 has the same window name called "Queue Log". So I can't tell it to get focus on a window with that name because all 5 of them have this name.
Each instance of the Queue shows up in XP under Processes as a file of PROWIN32.EXE
Is there a way I can have it looks for running processes and kill each one at a time since they all have the same name?
Help!
As MacroScheduler lacks a command like this (as far as I know):
WinSetTitle, WinTitle, WinText, NewTitle [, ExcludeTitle, ExcludeText] ...
what about to use a predefined position on the screen for each of those windows/sessions ?
This way you would be able to close the window via its known position.

WinSetTitle, WinTitle, WinText, NewTitle [, ExcludeTitle, ExcludeText] ...
what about to use a predefined position on the screen for each of those windows/sessions ?
This way you would be able to close the window via its known position.
Hope that makes sense.MouseMove>//to select the window
LClick> //to set the focus by clickin onto it
Press ALT
Press F4
Release ALT //to close the window

I suppose the easiest script, definitely by no means the most elegant one, to meet your requirement:
run>taskkill.exe /F /IM PROWIN32.exe
run>taskkill.exe /F /IM PROWIN32.exe
run>taskkill.exe /F /IM PROWIN32.exe
run>taskkill.exe /F /IM PROWIN32.exe
run>taskkill.exe /F /IM PROWIN32.exe
In fact, it's the fastest way to "kill" all processes in no time. Use it with caution.
Happy scripting.
run>taskkill.exe /F /IM PROWIN32.exe
run>taskkill.exe /F /IM PROWIN32.exe
run>taskkill.exe /F /IM PROWIN32.exe
run>taskkill.exe /F /IM PROWIN32.exe
run>taskkill.exe /F /IM PROWIN32.exe
In fact, it's the fastest way to "kill" all processes in no time. Use it with caution.
Happy scripting.
Version 7.3 (beta available now) lets you use window handles in place of window titles. This would probably solve your problem where you have several windows of the same name.
MJT Net Support
[email protected]
[email protected]
Hi Support,
Are the Window handles randomly assigned by Windows? How can a script find a set of desired Window handles? It would be nice if Macro Scheduler 7.3 could offer Windows XP-like group processing. For example, it can close all instances of Internet Explorer.
I also look forward to the support of a menu command. Instead of assigning hotkeys, a user can be entertained with a simple menu, whereby he can choose, say, disk optimization, Ad-ware detection, Anti-Virus,...etc. Just my two cents.
Are the Window handles randomly assigned by Windows? How can a script find a set of desired Window handles? It would be nice if Macro Scheduler 7.3 could offer Windows XP-like group processing. For example, it can close all instances of Internet Explorer.
I also look forward to the support of a menu command. Instead of assigning hotkeys, a user can be entertained with a simple menu, whereby he can choose, say, disk optimization, Ad-ware detection, Anti-Virus,...etc. Just my two cents.
- Bob Hansen
- Automation Wizard
- Posts: 2475
- Joined: Tue Sep 24, 2002 3:47 am
- Location: Salem, New Hampshire, US
- Contact:
support says
=========================
Subsequent edit: Never mind.....I found it on the forum for Beta testing at http://www.mjtnet.com/forum/viewforum.php?f=5
Hmmmm, I could not find a link to the beta. Is there also a What's New page that I cannot find on 7.3?Version 7.3 (beta available now)
=========================
Subsequent edit: Never mind.....I found it on the forum for Beta testing at http://www.mjtnet.com/forum/viewforum.php?f=5
Last edited by Bob Hansen on Fri Oct 08, 2004 5:29 pm, edited 2 times in total.
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!
Bob
A humble man and PROUD of it!
- Bob Hansen
- Automation Wizard
- Posts: 2475
- Joined: Tue Sep 24, 2002 3:47 am
- Location: Salem, New Hampshire, US
- Contact: