Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Capture file cut off when window is minimized

Status
Not open for further replies.

castout

Programmer
Jan 22, 2002
23
US
I am using the following command to start a Procomm session and run an Aspect script:

&quot;pw4.exe&quot; TELNET CONNECT MANUAL <machineName> <aspectScriptFileName>
<aspect parameters>

My aspect script contains the following code:
***
proc main

waitfor &quot;login:&quot;
transmit &quot;root^M&quot;
waitfor &quot;Password:&quot;
transmit &quot;abc^M&quot;
waitfor &quot;#&quot;

set capture path S1
set capture file S2
capture on

pause 1

transmit &quot;showCfg^M&quot;
waitfor &quot;>&quot;

transmit &quot;showEditOpt^M&quot;
waitfor &quot;quit&quot; 10
transmit &quot;q^M&quot;

pause 1

capture off
pwexit

endproc
***
When I launch this in a minimized window, my capture file only contains the first 6 lines of the information. When I maximize the PW4 window it works fine. I have added delays and they don't help.
Any other ideas?? Has anyone else seen this happen?
 
What kind of Unix machine are you connecting to? I tried this with a Sun box (just logged in and issued a ls -la) and didn't see any data loss when the application was minimized while my script was running. Are you starting the app minimized from the command line, or are you minimizing the Procomm window after it first comes up? Also, what version of Procomm are you using? I know it's not the latest, since the executable for version 4.8 is pw5.exe.
 
I'm actually connecting to a disk array controller. I am starting the window minimized using the Shell() command in VBA for Excel.
 
Yep, I'm seeing this in version 4.8 if I launch Procomm from a desktop shortcut that starts in the minimized state. I'll play around with this a bit to see if I can find a workaround, but I'm not too hopeful.
 
If you can deal with the Procomm splash screen being visible for just a second, you can add &quot;winminimize $PWMAINWIN&quot; at the beginning of your script. If you make this change and don't start Procomm in a minimized window using VBA, then the capture file will contain the full contents.
 
Thanks a bunch!! That worked for me also - but, there's another catch. (I see weird stuff like this all of the time in Procomm/Aspect!)
When I run the command on the first controller it works fine. I see the Procomm window open up and compile the script and then it minimizes for a few seconds and then loses. When I run it on the second controller I get nothing in the capture file. The Procomm window opens up for a split second and then closes (I don't see the script compile or the window minimize).
There is about a 5 second delay between running the script on each controller.
 
Sorry - I meant to say 'closes' instead of 'loses'.
 
I think the reason it doesn't work the second time is because it is using the previously compiled .wax file. I think if it compiles it each time, it will work. Do you know of a way to force a compile via command line? Otherwise I will just have to delete the .wax file after every run.
 
If you specify the .was file on the command line, then the script will be recompiled each time you run the program from the command line. However, it would be a very odd problem if the script worked the first time it was compiled, but didn't work properly when the already-compiled script was run.
 
I have verified that it works if I delete the .wax file every time it runs. I am specifying the .was file on the command line.
Weird, huh?
Anyway, thanks a lot for all of your help!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top