home *** CD-ROM | disk | FTP | other *** search
- /* */
- options results
- here = pragma('D','ram:')
- there = pragma('D',here)
- address command 'cd '|| here||'0a'x||'stack 20000'||'0a'x|| 'c:run >nil: tbuildscreen ex2 nil:'
-
- address command 'waitforport xxxport'||'0a'x|| 'waitforport xxxport'
- address command 'waitforport xxxport'||'0a'x|| 'waitforport xxxport'
-
- do forever
- address 'xxxport' 'RWAIT' /* wait for user to do something */
- a = RESULT
- parse var a action p2 p3 p4 p5 p6 . /* parse response from buildscreen */
-
- /* say 'here is the result "'|| a ||'"' */
-
- if action = "" then do /* this is a menu null (rmb down no select ) */
- address 'xxxport' 'fillbox wname 199 190 10 7 2 3'
- say 'menu null'
- end
- if action = "C" then do /* close box hit */
- say 'window closed'
- leave
- end
- if action = "G" then do /* gadget hit */
- gid = p3
- /* say 'gadget ID ' gid ' type is ' p2 */
- if p2 = 'P' then do
- p5 = ((p5*10) /65535) % 1
- nnn = '' || p5
- mmm = copies(' ',6-length(nnn))
- qqq = mmm||p5
- dial = 'textat wname 150 190 "' || qqq || '" 1 0 jam2'
- address 'xxxport' dial
- say 'gad val = ' qqq
- end
- if p2 = "I" then do
- say 'integer select ' p4 ' for gadget ' gid
- end
- if p2 = "S" then do
- n = pos("=",a) +1
- say 'string select |' || substr(a,n) || "|" ' for gad ' gid
- end
- if p2 = "B" then do
- say 'button pressed' p3
-
- end
- end
- if action = "M" then do /* menu op */
-
- say 'Menu checked=' p2 ' menu# ' p3 ' item ' p4 ' sub item ' p5
- end
-
- end
-