MyFlight
Technical User
- Feb 4, 2002
- 193
I have written a script to show a ListBox that allows multiple selections.
However, is the someway to replace the PAUSE 3 that is under Case 1? I would like for it to waituntil the user Clicks the OK Button.
Any suggestions?? Here is my script.
#define WorkDir "C:\Temp Data Files\Raw Data\"
#define SaveDir "C:\Temp Completed Reports\"
#define sEnter "^M"
#define szSpace " "
proc main
integer Event
integer nItem = 0 ; Integer to indicate current file.
string szList, sSystem, fName2
fName2 = "Temp Export Tables.txt"
sSystem = "SPCFG,SPBIL,SPNBIL,NPSTND,NPPBX,SASTAT,SSSTAT,SMSTAT,SOSTAT"
chdir WorkDir
fopen 2 fName2 CREATE TEXT
dialogbox 0 241 99 152 138 11 "Select The TABLES you want Exported"
listbox 1 28 8 90 89 sSystem multiple szList sort
pushbutton 2 54 114 40 14 "&OK" OK DEFAULT
enddialog
while 1
dlgevent 0 Event ; Get the dialog event.
switch Event ; Evaluate the event.
case 0 ; No event occurred.
endcase
case 1 ; Something was chosen.
pause 3
dlgsave 0 1
fwrite 2 szList 16
pause 2
fclose 2
endcase
default ; Exit case chosen.
exitwhile ; Exit the loop.
endcase
endswitch
endwhile
dlgdestroy 0 CANCEL ; Destroy the dialog box.
endproc
However, is the someway to replace the PAUSE 3 that is under Case 1? I would like for it to waituntil the user Clicks the OK Button.
Any suggestions?? Here is my script.
#define WorkDir "C:\Temp Data Files\Raw Data\"
#define SaveDir "C:\Temp Completed Reports\"
#define sEnter "^M"
#define szSpace " "
proc main
integer Event
integer nItem = 0 ; Integer to indicate current file.
string szList, sSystem, fName2
fName2 = "Temp Export Tables.txt"
sSystem = "SPCFG,SPBIL,SPNBIL,NPSTND,NPPBX,SASTAT,SSSTAT,SMSTAT,SOSTAT"
chdir WorkDir
fopen 2 fName2 CREATE TEXT
dialogbox 0 241 99 152 138 11 "Select The TABLES you want Exported"
listbox 1 28 8 90 89 sSystem multiple szList sort
pushbutton 2 54 114 40 14 "&OK" OK DEFAULT
enddialog
while 1
dlgevent 0 Event ; Get the dialog event.
switch Event ; Evaluate the event.
case 0 ; No event occurred.
endcase
case 1 ; Something was chosen.
pause 3
dlgsave 0 1
fwrite 2 szList 16
pause 2
fclose 2
endcase
default ; Exit case chosen.
exitwhile ; Exit the loop.
endcase
endswitch
endwhile
dlgdestroy 0 CANCEL ; Destroy the dialog box.
endproc