Problems with Closing Programs

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

Post Reply
jenflu2000

Problems with Closing Programs

Post by jenflu2000 » Fri Oct 08, 2004 2:33 pm

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!

Lumumba

Post by Lumumba » Fri Oct 08, 2004 2:59 pm

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.
MouseMove>//to select the window
LClick> //to set the focus by clickin onto it
Press ALT
Press F4
Release ALT //to close the window
Hope that makes sense. 8)

BoBo

Post by BoBo » Fri Oct 08, 2004 3:02 pm

Well, to move those windows to that fixed position use this:

MoveWindow>window_title,new_X,new_Y

armsys
Automation Wizard
Posts: 1108
Joined: Wed Dec 04, 2002 10:28 am
Location: Hong Kong

Post by armsys » Fri Oct 08, 2004 3:02 pm

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.

User avatar
support
Automation Wizard
Posts: 1450
Joined: Sat Oct 19, 2002 4:38 pm
Location: London
Contact:

Post by support » Fri Oct 08, 2004 3:18 pm

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]

armsys
Automation Wizard
Posts: 1108
Joined: Wed Dec 04, 2002 10:28 am
Location: Hong Kong

Post by armsys » Fri Oct 08, 2004 4:05 pm

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.

armsys
Automation Wizard
Posts: 1108
Joined: Wed Dec 04, 2002 10:28 am
Location: Hong Kong

Post by armsys » Fri Oct 08, 2004 4:19 pm

Hi Support,

Please remove this ducplicate post. Sorry for the trouble caused.
Last edited by armsys on Fri Oct 08, 2004 5:11 pm, edited 1 time in total.

Lumumba

Post by Lumumba » Fri Oct 08, 2004 4:34 pm

Just my two cents
Just my two cents
If I'm correct you gave now four cents :lol:

armsys
Automation Wizard
Posts: 1108
Joined: Wed Dec 04, 2002 10:28 am
Location: Hong Kong

Post by armsys » Fri Oct 08, 2004 5:08 pm

Hi Lumumba,

Thanks for your kind reminder. You must be an excellent accountant or an IRS tax collector. Have you tried out the latest beta yet?

User avatar
Bob Hansen
Automation Wizard
Posts: 2475
Joined: Tue Sep 24, 2002 3:47 am
Location: Salem, New Hampshire, US
Contact:

Post by Bob Hansen » Fri Oct 08, 2004 5:18 pm

support says
Version 7.3 (beta available now)
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?
=========================
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!

armsys
Automation Wizard
Posts: 1108
Joined: Wed Dec 04, 2002 10:28 am
Location: Hong Kong

Post by armsys » Fri Oct 08, 2004 5:27 pm

Hi Bob,

Please try http://www.mjtnet.com/dldregd.htm. Wish you luck.

User avatar
Bob Hansen
Automation Wizard
Posts: 2475
Joined: Tue Sep 24, 2002 3:47 am
Location: Salem, New Hampshire, US
Contact:

Post by Bob Hansen » Fri Oct 08, 2004 5:31 pm

Thanks armsys. We must both be on at same time. As you can see from my edited posting, I did find it while you were sending me the answer.
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!

Post Reply
cron
Sign up to our newsletter for free automation tips, tricks & discounts