-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinput.ks
More file actions
37 lines (27 loc) · 715 Bytes
/
input.ks
File metadata and controls
37 lines (27 loc) · 715 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
function selectTargetVessel {
LIST Targets IN targets.
parameter targetOptions IS targets.
parameter title IS "Select Target Vessel".
return selectOption(targetOptions, title).
}
function selectOption {
parameter options.
parameter title IS "Select Option".
SET isOKClicked TO FALSE.
LOCAL selectGUI IS GUI(200).
LOCAL label IS selectGUI:ADDLABEL(title).
LOCAL popup is selectGUI:addPopupMenu().
LOCAL ok IS selectGUI:ADDBUTTON("OK").
SET ok:ONCLICK to myClickChecker@.
for option in options {
popup:addoption(option).
}
selectGUI:SHOW().
wait until isOKClicked.
selectGUI:HIDE().
return popup:value.
}
function myClickChecker {
PRINT "I've been clicked!".
SET isOKClicked TO TRUE.
}