2 /* REXX script for rexxbgui.library: show Activity data files */
4 if ~show
('l','rexxbgui.library') then do
5 if ~addlib
('rexxbgui.library',0,-30) then do
12 call bguiopen
() /* causes error 12 if it did not work */
13 /* supply a second argument for a '0' return code instead of an ARexx
29 if rc>0 then bguierror
(12); else nop
33 if bguireadentries
(fname
,'LST')~
=1 then bguierror
(12); else nop
38 lst
.i
=translate(lst
.i
,tab
,';')
40 if substr(lst
.i
,1,1)='-' then flag
=1
45 signal on syntax /* important: bguiclose() MUST be called */
49 /* using ARexx feature: ,<newline> is translated to nothing */
50 /* the || are essential - any added space will cause trouble */
51 /* redefining the same ID makes previous buttons unaccessible */
52 /* do not redefine winclose etc. */
55 bguilistview
('listv',,'LST',ReadOnly
,7)||,
58 bguibutton
('quit','_Quit')||,
60 )||bguilayout
(LGO_FixMinHeight
,1),
61 ,grspace
.normal
,grspace
.normal
)
63 a
=bguiwindow
('User activity:' fname
,g
,50,90)
65 title
='Date'tab
'Time'tab
'Left'tab
'Right'tab
'Move'tab
'Keys'tab
'Middle'
66 mem
=getspace
(length(title
)+1)
67 if mem
='00000000'x
then bguierror
(12)
68 call export
(mem
,title
'00'x
)
69 call bguiset
(obj
.listv
,,LISTV_Titles
!,mem
)
71 if bguiwinopen
(a
)=0 then bguierror
(12) else nop
73 do while bguiwinwaitevent
(a
,'ID')~
=id
.winclose
75 when id
=id
.winactive
then nop
76 when id
=id
.wininactive
then nop
77 when id
=id
.quit
then leave
78 when id
=id
.winclose
then nop
86 if rc~
=0 then say '+++ ['rc']' errortext(rc) 'at line' sigl; else nop
93 say '+++ Break at line' sigl