MyFlight
Technical User
- Feb 4, 2002
- 193
I am trying to write a script that will accomplish the following:
Open a dialog box with 3 options: Instrument, Media, or Hardware.
once a button is selected (see above) a list box opens with predefined items is the list. The user tehn selects multiple items. These items are then transmitted to the system one at a time. Note there will be various Commmands both sent and received between items transmitted (i.e.a sub-routine).
Here is What I have so far.
proc main
integer Event
String szItem
String Instrument = "Mouse,Keyboard,File"
String Media = "MemoryCard,ZipDisk,FloppyDisk"
String Hardware = "Printer,Scanner,CDRW"
dialogbox 0 198 96 253 154 3 " Computer Input Device Selection"
pushbutton 100 20 7 100 24 "Instrument"
pushbutton 200 20 46 100 24 "Media"
pushbutton 300 135 6 100 24 "Hardware"
pushbutton 600 84 121 81 19 "Exit" CANCEL
enddialog
while 1
dlgevent 0 Event
switch Event
case 0
endcase
case 100
dlgdestroy 0 CANCEL ; Destroy the dialog box.
dialogbox 3 241 99 152 138 11 "Select The Instruments you want"
listbox 1 28 8 90 89 Instrument 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
endcase
case 2 ; Exit button selected
usermsg "`"%s`" selected!" szItem
endcase
default ; Exit case chosen.
exitwhile ; Exit the loop.
endcase
endswitch
endwhile
dlgdestroy 0 CANCEL ; Destroy the dialog box.
endproc
ANY SUGGESTIONS.
Open a dialog box with 3 options: Instrument, Media, or Hardware.
once a button is selected (see above) a list box opens with predefined items is the list. The user tehn selects multiple items. These items are then transmitted to the system one at a time. Note there will be various Commmands both sent and received between items transmitted (i.e.a sub-routine).
Here is What I have so far.
proc main
integer Event
String szItem
String Instrument = "Mouse,Keyboard,File"
String Media = "MemoryCard,ZipDisk,FloppyDisk"
String Hardware = "Printer,Scanner,CDRW"
dialogbox 0 198 96 253 154 3 " Computer Input Device Selection"
pushbutton 100 20 7 100 24 "Instrument"
pushbutton 200 20 46 100 24 "Media"
pushbutton 300 135 6 100 24 "Hardware"
pushbutton 600 84 121 81 19 "Exit" CANCEL
enddialog
while 1
dlgevent 0 Event
switch Event
case 0
endcase
case 100
dlgdestroy 0 CANCEL ; Destroy the dialog box.
dialogbox 3 241 99 152 138 11 "Select The Instruments you want"
listbox 1 28 8 90 89 Instrument 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
endcase
case 2 ; Exit button selected
usermsg "`"%s`" selected!" szItem
endcase
default ; Exit case chosen.
exitwhile ; Exit the loop.
endcase
endswitch
endwhile
dlgdestroy 0 CANCEL ; Destroy the dialog box.
endproc
ANY SUGGESTIONS.