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!

Problem with script not waiting for dialog box to close....

Status
Not open for further replies.

matt1981m

Technical User
Jul 1, 2006
32
US
i have created a script for running call traces (QMOB MIN....EXTMTX) in a Nortel MSC...the problem is that the script is not waiting for the dialog box to close before running... how can i prevent this... here is the script...


proc main
string npa,nxx,minx
dialogbox 0 148 83 242 113 2 "QMOB"
pushbutton 7 72 66 40 16 "OK" OK
pushbutton 8 124 66 37 17 "CANCEL" CANCEL
editbox 20 70 40 32 16 NPA 3
editbox 22 102 40 32 16 NXX 3
editbox 24 136 40 32 16 MINX 4
text 21 70 30 32 9 "NPA" center
text 23 102 30 32 9 "NXX" center
text 25 136 30 32 9 "NXXX" center
text 32 70 16 100 12 "PLEASE ENTER MSID HERE:" center
enddialog
transmit "quit all^M"
waitfor ">"
transmit "servord^M"
waitfor "SO:"
transmit "qmob min "
transmit npa
transmit " "
transmit nxx
transmit " "
transmit minx
transmit " extmtx^M"
endproc
 
You need to use the dlgevent command to check for controls being selected within your dialog and have your script exit the dialog explicitly. If you look at the discussion of this command in the help file, there is a sample script that should get you started.

 
Add this before the 1st transmit:

integer event

while 1
dlgevent 0 event
switch event
case 7
goto lp1
endcase
case 8
exit
endcase
endswitch
endwhile
lp1:
 
knob your idea worked... i will edit this post with what i ended up using later when i get to work....
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top