Hi,
I'm pretty new to aspect scripting and would appreciate some advice on how to handle dialog box events.
The script below shows a simple dialog box with some pushbuttons. Button 16 is a simple QUIT function. All I want is for the case handler to realise that choice returned 16, the user pressed QUIT, then to show the usermsg "wanna quit".
I cant seem to get that to work. I'm pretty sure that if I can see how to get that single event to "fire" then I'll see how to handle all the other events.
Hoping someone can help me.
Thanks,
K
proc main
integer choice
showwelcome()
dlgevent 0 choice
switch choice
case 16
usermsg "wanna quit?"
endcase
endswitch
endproc
proc showwelcome
dialogbox 0 10 20 399 163 67 "Meridian 1 Script by Kryten"
text 3 138 13 122 11 "Meridian 1 All Purpose Aspect Script" left
text 4 2 33 134 11 "What would you like to work with today?" left
pushbutton 5 12 72 120 13 "OUT Analog Teles"
text 6 38 55 68 11 "Analog Telephones" left
pushbutton 7 12 87 120 13 "CHG Analog Tele CLS's"
text 8 163 55 68 11 "Digital Telephones" left
pushbutton 9 138 72 120 13 "OUT Digital Teles"
pushbutton 10 138 87 120 13 "CHG Digital Teles CLS's"
pushbutton 11 12 102 120 13 "AST + IAPG Settings"
pushbutton 12 138 103 120 13 "AST + IAPG Settings"
text 13 292 55 68 11 "Steering Codes" left
pushbutton 14 264 72 120 13 "CHG Distant Steering Codes"
pushbutton 15 264 87 120 13 "OUT Distant Steering Codes"
pushbutton 16 264 144 120 13 "Quit"
enddialog
endproc
I'm pretty new to aspect scripting and would appreciate some advice on how to handle dialog box events.
The script below shows a simple dialog box with some pushbuttons. Button 16 is a simple QUIT function. All I want is for the case handler to realise that choice returned 16, the user pressed QUIT, then to show the usermsg "wanna quit".
I cant seem to get that to work. I'm pretty sure that if I can see how to get that single event to "fire" then I'll see how to handle all the other events.
Hoping someone can help me.
Thanks,
K
proc main
integer choice
showwelcome()
dlgevent 0 choice
switch choice
case 16
usermsg "wanna quit?"
endcase
endswitch
endproc
proc showwelcome
dialogbox 0 10 20 399 163 67 "Meridian 1 Script by Kryten"
text 3 138 13 122 11 "Meridian 1 All Purpose Aspect Script" left
text 4 2 33 134 11 "What would you like to work with today?" left
pushbutton 5 12 72 120 13 "OUT Analog Teles"
text 6 38 55 68 11 "Analog Telephones" left
pushbutton 7 12 87 120 13 "CHG Analog Tele CLS's"
text 8 163 55 68 11 "Digital Telephones" left
pushbutton 9 138 72 120 13 "OUT Digital Teles"
pushbutton 10 138 87 120 13 "CHG Digital Teles CLS's"
pushbutton 11 12 102 120 13 "AST + IAPG Settings"
pushbutton 12 138 103 120 13 "AST + IAPG Settings"
text 13 292 55 68 11 "Steering Codes" left
pushbutton 14 264 72 120 13 "CHG Distant Steering Codes"
pushbutton 15 264 87 120 13 "OUT Distant Steering Codes"
pushbutton 16 264 144 120 13 "Quit"
enddialog
endproc