Initial import of Scalos. To decrease size I have
[AROS-Contrib.git] / scalos / Plugins / OOP / wb39_plugin / wbrexx / rxtest.rexx
blob6fd184184a76c8e2964bbb05acbce3ac3857cf1f
1 /* rxtest.rexx */
2 /* Test file for WBRexx.plugin */
3 /* 11 Jan 2001 17:41:47 */
5 options results
7 address workbench
9 say "-----------------------------------------------------"
11 say "Application.Version"
12 getattr application.version var xyzzy
13 res = result
15 say "result = <" || res || ">"
16 say "xyzzy = <" || xyzzy || ">"
20 say "Application.screen"
21 getattr application.screen var "xyzzy1"
22 res = result
24 say "result = <" || res || ">"
25 say "xyzzy1 = <" || xyzzy1 || ">"
28 say "Aplication.arexx"
29 getattr application.arexx var xyzzy2
30 res = result
32 say "result = <" || res || ">"
33 say "xyzzy = <" || xyzzy2 || ">"
35 if rc > 0 then do
36 getattr application.lasterror
37 res = result
38 fault code res
39 say "lasterror =" result
40 end
43 say "Aplication.iconborder"
44 getattr application.iconborder
45 res = result
46 say "result = <" || res || ">"
50 say "-----------------------------------------------------"
52 say "windows"
53 getattr windows.count VAR wincount
54 say "Windows.Count = <" || wincount || ">"
56 getattr windows stem win
57 res = result
59 do n = 0 to wincount-1
60 say "win." || n || " = <" || win.n || ">"
61 end
63 if rc > 0 then do
64 getattr application.lasterror
65 res = result
66 fault code res
67 say "lasterror =" result
68 end
69 say
72 wn = wincount - 1
74 getattr windows.wn var win3
75 res = result
76 say "windows.3 = <" || win3 || ">"
77 say
80 say "this one ought to return an error:"
81 wn = wincount + 4
82 getattr windows.wn var win4
83 res = result
84 say "windows.13 = <" || win4 || ">"
85 if rc > 0 then do
86 getattr application.lasterror
87 res = result
88 fault code res
89 say "lasterror =" result
90 end
91 say
94 say "application"
95 getattr application stem app1
96 say "Version =" app1.version
97 say "LastError =" app1.lasterror
98 say "IconBorder =" app1.iconborder
102 say "-----------------------------------------------------"
104 say "Selected Icons list in Root window"
105 getattr window.icons.selected name "root" stem rootwin
106 res = result
107 if rc > 0 then do
108 getattr application.lasterror
109 res = result
110 fault code res
111 say "lasterror =" result
114 say "Count =" rootwin.count
116 do n = 0 to rootwin.count-1
117 say n
118 say "Name =" rootwin.n.name
119 say "Left =" rootwin.n.left
120 say "Top =" rootwin.n.top
121 say "Width =" rootwin.n.width
122 say "Height =" rootwin.n.height
123 say "Type =" rootwin.n.type
124 say "Status =" rootwin.n.status
129 say "-----------------------------------------------------"
130 say "KeyCommands"
131 getattr keycommands.count VAR kccount
132 say "keycommands.Count = <" || kccount || ">"
134 if kccount > 0 then do
135 getattr keycommands.0.name var kc
136 say "<" || kc || ">"
137 getattr keycommands.0.key var kc2
138 say "<" || kc2 || ">"
142 getattr keycommands stem kcc
143 res = result
145 do n = 0 to kccount-1
146 say "kcc." || n || " Name= <" || kcc.n.name || "> Key= <" || kcc.n.key || "> Cmd= <" || kcc.n.command || ">"
149 say "-----------------------------------------------------"
150 say "MenuCommands"
151 getattr menucommands.count VAR mccount
152 say "Menucommands.Count = <" || mccount || ">"
154 getattr Menucommands stem mcc
155 res = result
157 do n = 0 to mccount-1
158 say "mcc." || n || " Name= <" || mcc.n.name || "> Title= <" || mcc.n.title || "> Shortcut= <" || mcc.n.shortcut || "> Cmd= <" || mcc.n.command || ">"
162 say "-----------------------------------------------------"
164 getattr window.screen name "root" stem rootscreen
165 say "Screen.name = " rootscreen.name
166 say "Screen.width = " rootscreen.width
167 say "Screen.height = " rootscreen.height
171 getattr application.font.icon stem iconfont name "Text"
172 say "font.icon.name = " iconfont.name
173 say "font.icon.width = " iconfont.width
174 say "font.icon.height = " iconfont.height
175 say "font.icon.size = " iconfont.size
178 getattr application.font.screen stem screenfont name "Text"
179 say "font.screen.name = " screenfont.name
180 say "font.screen.width = " screenfont.width
181 say "font.screen.height = " screenfont.height
182 say "font.screen.size = " screenfont.size
186 address command "wait"
188 getattr windows.active
189 res = result
190 say "Active Window = <" || res || ">"
195 icon window "HD1-6GB:Bilder" names "normal spezial" right 30
197 icon window "HD1-6GB:Bilder" names "normal" select
199 do n = 0 to 3
200 icon window "HD1-6GB:Bilder" cycle previous
201 if rc > 0 then do
202 getattr application.lasterror
203 res = result
204 fault code res
205 say "lasterror =" result
206 leave
208 address command "wait"
214 icon window "HD1-6GB:PD/BasiliskII" names "src" open
215 menu window "HD1-6GB:PD/BasiliskII/src" invoke "WINDOW.SHOW.ALLFILES"
217 address command "wait"
218 icon window "HD1-6GB:PD/BasiliskII/src" names "xpram.cpp" makevisible select
220 view window "HD1-6GB:PD/BasiliskII" up
224 menu window "HD1-6GB:PD/BasiliskII" invoke "WINDOW.OPENPARENT"
225 if rc > 0 then do
226 fault code workbench.lasterror
227 say "lasterror =" result
232 window "HD1-6GB:PD/BasiliskII" activate
233 window "active" cycle previous
236 window "RAM:" open
237 newdrawer "RAM:xyzzy"
238 rename "RAM:xyzzy" "RAM:BlahBlah"
239 if rc > 0 then do
240 fault code workbench.lasterror
241 say "lasterror =" result
245 delete "RAM:BlahBlah"
246 delete "RAM:Spezial" all