Nested programs, with having to CTRL/C out of one.

Hints, tips and tricks for newbies

Moderators: Dorian (MJT support), JRL

Post Reply
stefmit
Newbie
Posts: 8
Joined: Wed Feb 11, 2004 4:35 pm

Nested programs, with having to CTRL/C out of one.

Post by stefmit » Wed Feb 11, 2004 4:47 pm

This may be very simple, but as a newbie (and new customer) of MJT, I have not tested all the options possible: I need to wrap a program inside another, with the "wrapper" having to be interrupted by a CTRL/C ... more specific? I need to run a trace (windump or tethereal, for those familiar with these programs) while running a scheduled job, so it should (pseudo-code) look like this:

1. start windump/tethereal and dump the output to a file (I know how to create this by using date and time variables);
2. while the above is running - I am running a Perl script with all sorts of network traffic;
3. Once 2. is done, I need to interrupt 1. using CTRL/C

Any ideas?

TIA,
Stef

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 » Wed Feb 11, 2004 10:48 pm

Real general guidelines to consider:

1. When 2 is done have it update an INI file or created a file or close a window. These steps could be added to the perl script? Check for file exists or read INI file value to continue. Loop macro until condition exists

OR

2. Look at using RP_MODE befpre Run Program>perl with step 2. If set for 1, then all rest of macro will wait till done. When done (window closed) set focus and do CTL-C
Be sure when using RP_MODE to consider doing a toggle to the value after doing Run Program.
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!

stefmit
Newbie
Posts: 8
Joined: Wed Feb 11, 2004 4:35 pm

Post by stefmit » Thu Feb 12, 2004 11:48 am

Thank you for suggestions. I need to read more on RP_MODE, as it sounds potentially better. I figgured out the other initial issue, by playing with the programs in different "DOS" windows, and changing focus, then watching one closing, then forcing the other totake a CTRL/C. The program is pretty neat ... thanks againi for your fast response and suggestions ... back to some reading now :)

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