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!

Wrong Script File Running

Status
Not open for further replies.

MyFlight

Technical User
Feb 4, 2002
193
I have a script that calls a DialogBox ("9006 Switch Model Select.wax"). When you click on a Particular button it opens another DialogBox

Example:

1. Clicking on the 3rd Button labeled 9006 Version 6.4 will Execute "9006 Command Select64.wax").
2. The 9006 Version 6.4 “Command Select” DialogBox opens.
3. Clicking on the 6th Button labeled Run Reports, (this will open the Switch Report Selection DialogBox).
4. Clicking on the 2nd Button labeled Capacity Study Report. This should run the “Capacity64.wax” script.

What Happens Is it actually runs the “Capacity65.wax” Script which is not even an option.

Any suggestions??

Below is the Code I currently have:

SWITCH VERSION SELECTION SCRIPT (9006 Switch Model Select.wax)

Code:
proc Main
   integer Event
dialogbox 0 187 54 268 238 2 "Switch Version Selection Screen" 
   pushbutton 1 82 2 100 24 "9006 Version 6.2" 
   pushbutton 2 82 34 100 24 "9006 Version 6.3" 
   pushbutton 3 82 67 100 24 "9006 Version 6.4" 
   pushbutton 4 82 101 100 24 "9006 Version 6.5" 
   pushbutton 5 82 134 100 24 "9006 Version 6.6" 
   pushbutton 6 82 167 100 24 "HiPath" 
   pushbutton 7 109 202 50 28 "Exit" CANCEL 
enddialog 
   while 1
      dlgevent 0 Event
      switch Event
      case 0                   
      endcase
      case 1                   
         execute "9006 Command Select62.wax" SHARED
         disable DLGCTRL 0 1
      endcase
      case 2
	 execute "9006 Command Select63.wax" SHARED
         disable DLGCTRL 0 2
      endcase
      case 3
	 execute "9006 Command Select64.wax" SHARED
         disable DLGCTRL 0 3
      endcase
      case 4
	 execute "9006 Command Select65.wax" SHARED
         disable DLGCTRL 0 4
      endcase
      case 5
	 execute "9006 Command Select66.wax" SHARED
         disable DLGCTRL 0 5
      endcase
      case 6
	 execute "9006 Command SelectHP.wax" SHARED
         disable DLGCTRL 0 6
      endcase
         default                  
            exitwhile             
         endcase
      endswitch
   endwhile
   dlgdestroy 0 CANCEL
endproc

9006 COMMAND SELECTION SCRIPT (9006 Command Select64.wax)
Code:
proc Main
   integer Event
dialogbox 0 206 54 268 238 2 "Switch Commands" 
   pushbutton 41 82 2 100 24 "Activate LtDr" 
   pushbutton 42 82 34 100 24 "DeActive Patches" 
   pushbutton 43 82 67 100 24 "Direct AMO Switch Access" 
   pushbutton 44 82 101 100 24 "EMML Switch Access" 
   pushbutton 45 82 134 100 24 "ROOT Switch Access" 
   pushbutton 46 82 168 100 24 "Run REPORTS" 
   pushbutton 47 110 202 50 28 "Exit" CANCEL 
enddialog 
   while 1
      dlgevent 0 Event
      switch Event
         case 0                   
         endcase
         case 41                   
	    execute "9006 Activate LtDr.wax"
            disable DLGCTRL 0 41
         endcase
         case 42                   
	    execute "9006 Patch DeActivate64.wax"
            disable DLGCTRL 0 42
         endcase
         case 43                    
	    execute "DirectAmo64.wax"
            disable DLGCTRL 0 43
         endcase
         case 44
	    execute "EMML64.wax"
            disable DLGCTRL 0 44
         endcase
         case 45
	    execute "Root64.wax"
            disable DLGCTRL 0 45
         endcase
         case 46                    
	    execute "9006 Report Selection64.wax"
            disable DLGCTRL 0 46
         endcase
         default                  
            exitwhile             
         endcase
      endswitch
   endwhile
   dlgdestroy 0 CANCEL
endproc

9006 REPORT SELECTION SCRIPT (9006 Report Selection64.wax)

Code:
proc main
integer Event

dialogbox 0 187 54 268 238 2 "Switch Report Selection Screen" 
   pushbutton 121 82 2 100 24 "Analog Line Report" 
   pushbutton 122 82 34 100 24 "Capacity Study Report" 
   pushbutton 123 82 67 100 24 "Digital Line Report" 
   pushbutton 124 82 101 100 24 "Extension Line Report" 
   pushbutton 125 82 134 100 24 "Hardware Report" 
   pushbutton 126 82 167 100 24 "Trunk Line Report" 
   pushbutton 127 109 202 50 28 "Exit" CANCEL 
enddialog 
   while 1
      dlgevent 0 Event
      switch Event
         case 0                   
         endcase
      case 121                   
	 execute "Analog64.wax"
         disable DLGCTRL 0 121
      endcase
      case 122
	 execute "Capacity64.wax"
         disable DLGCTRL 0 122
      endcase
      case 123
	 execute "Digital64.wax"
         disable DLGCTRL 0 123
      endcase
      case 124
	 execute "Extension64.wax"
         disable DLGCTRL 0 124
      endcase
      case 125
	 execute "Hardware64.wax"
         disable DLGCTRL 0 125
      endcase
      case 126
	 execute "Trunk64.wax"
	 disable DLGCTRL 0 126
      endcase
         default                  
            exitwhile             
         endcase
      endswitch
   endwhile
   dlgdestroy 0 CANCEL
endproc

FINALLY THE CAPACITY STUDY REPORT SCRIPT (Capacity64.wax)

Code:
proc main
   waitquiet 2
   call WriteFile
   transmit "^M^M^M"
   execute "Log 9006.wax"
   waitfor "===> "
   transmit "pansi^M"
   waitfor "^[[0;40;37m^[[1m^[[20;78H" FOREVER
   transmit "3"
   waitfor &quot;  <&quot; FOREVER
   transmit &quot;REGEN-SCSU:ANATE,;^M&quot;
   waitfor &quot;  <&quot; FOREVER
   transmit &quot;REGEN-SCSU:NONANATE,;^M&quot;
   waitfor &quot;  <&quot; FOREVER
   transmit &quot;REGEN-PERSI:STN,;^M&quot;
   waitfor &quot;  <&quot; FOREVER
   transmit &quot;REGEN-TCSU:,;^M&quot;
   waitfor &quot;  <&quot; FOREVER
   transmit &quot;REGEN-TGACC;^M&quot;
   waitfor &quot;  <&quot; FOREVER
   transmit &quot;DIS-BCSU:STAT,;^M&quot;
   waitfor &quot;  <&quot; FOREVER
   transmit &quot;DIS-BCSU:TBL,;^M&quot;
   waitfor &quot;  <&quot; FOREVER
   transmit &quot;^D&quot;
   waitfor &quot;^[[0;40;37m^[[1m^[[20;78H&quot; FOREVER
   transmit &quot;^[[V&quot;
   waitfor &quot;Z^M^M^J&quot;
   transmit &quot;^M^M^M&quot;
   waitquiet 1
   transmit &quot;^M^M^M&quot;
   waitfor &quot;!login: &quot;
   hangup
   capture OFF    
endproc

proc WriteFile
   string CapPath =&quot;C:\Temp Data Files\Raw Data\&quot;
   string CapName =&quot;Capacity64.txt&quot;
   capture OFF
   waitquiet 1 
   set capture path CapPath                 
   set capture file CapName               
   set capture overwrite ON                
   set capture query OFF                      
   capture ON
endproc

 
I tried this on my machine (capacity64.wax was just a script that output capacity64 via a usermsg command and the same thing for capacity65.wax) and I was unable to reproduce this problem. Is it possible that capacity65.was contains the incorrect source code or was accidentally renamed? Does the capacity65 script appear as the running script under Script File listbox?
aspect@aspectscripting.com
 
Knob,

No, I Double Checked and when you select the Buttuon for 65, 64 is the script that actually runs. I delected all the Capacity script files, verified the Source code and recompiled. Still have the same problem.

I wonder if ProComm is not updating something. I run this Script file Repeatedly for many switches. It almost looks like ProComm is storing the capacity 64 or 65 script and running it instead of what is told to execute??

Does any of this make any sense??

HELP!!

 
[thumbsup2]

Knob,

I figured it out. It was again a case of &quot;Programmer Error&quot;. I had built a Number of DialogBox with the Dialog Editor. These did not match the Script files (the Case Numbers were different).

Thanks again.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top