Is it possible to display a dialogbox and let the script run in the background and
to have the option to exit the script with a pushbutton. The reason I want the
dialogue box displayed, is because I would like the menu bar and options are disabled when the dialogue box is active . Basically to stop people messing around when the script is running and to notify the user that the script may take some time .
here is what I have tried.
dialogbox 2 60 45 332 169 139 "Diversion Program"
text 1 68 30 156 19 "Please wait while the iSDX searches for DIVersions." left
text 2 66 62 150 21 "This may take some time depending on the amount of extensions on the system." left
pushbutton 3 102 131 84 13 "Cancel the Script" CANCEL default
text 4 74 99 122 19 "If the CANCEL button is selected the script will abort and all data will be lost." left
enddialog
dlgevent 2 Event ; Read dialog event.
switch Event ; Evaluate dialog event.
case 3
Termreset
Txflush
RXflush
exit ;exit the script
endcase
endswitch
while
Get data from the pabx etc
endwhile
dlgdestroy 2 CANCEL ; Get rid of dialog box no 2 if user hasn't cancelled already
continue with script
to have the option to exit the script with a pushbutton. The reason I want the
dialogue box displayed, is because I would like the menu bar and options are disabled when the dialogue box is active . Basically to stop people messing around when the script is running and to notify the user that the script may take some time .
here is what I have tried.
dialogbox 2 60 45 332 169 139 "Diversion Program"
text 1 68 30 156 19 "Please wait while the iSDX searches for DIVersions." left
text 2 66 62 150 21 "This may take some time depending on the amount of extensions on the system." left
pushbutton 3 102 131 84 13 "Cancel the Script" CANCEL default
text 4 74 99 122 19 "If the CANCEL button is selected the script will abort and all data will be lost." left
enddialog
dlgevent 2 Event ; Read dialog event.
switch Event ; Evaluate dialog event.
case 3
Termreset
Txflush
RXflush
exit ;exit the script
endcase
endswitch
while
Get data from the pabx etc
endwhile
dlgdestroy 2 CANCEL ; Get rid of dialog box no 2 if user hasn't cancelled already
continue with script