home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
AmigActive 13
/
AACD13.ISO
/
AACD
/
Resources
/
System
/
BoingBag1
/
Contributions
/
Workbench
/
RexxArpLib3p6
/
rexx
/
MouseTest.rexx
< prev
next >
Wrap
OS/2 REXX Batch file
|
1998-06-26
|
2KB
|
95 lines
/*
* MouseTest.rexx
* Script for testing rexxarplib.library mouse port usages.
*
*/
MouseTest:
options results
options failat 200
debugging = 0 /* set if we want debug messages */
say "All test screens are named 'MNS'. If one is left open the following command:"
say 'rx "call closescreen(''MSN'')"'
say
/*
* Set up a host
*/
say
say
say "Setting up for access to the correct screen."
say "Test window should open on the new screen."
say
pubscreen = 'MNS'
/* Screen pen indices */
/* 1 = screen title text default = 1 */
/* 2 = screen title background default = 2 */
/* 3 = gadget text default = 1 */
/* 4 = highlights default = 2 */
/* 5 = shadows default = 1 */
/* 6 = active window highlight default = 3 */
/* 7 = active window text default = 1 */
/* 8 = screen background always = 0 */
/* 9 = Highlight Text Pen default = 1 */
/* 123456789 */
call OpenScreen( 0, 2, 'HIRES LACE OVERSCAN', 'My new screen!', 'MNS', '121213101', 724, 482, 0 )
address arexx "'x = CreateHost(TESTSTUFF, TESTSTUFF_PORT, "pubscreen")'"
/*
* Wait until it is ready. It times out after a while, so do
* a few of them. May not be necessary, try it on your system
* for best results.
*/
WaitForPort TESTSTUFF
WaitForPort TESTSTUFF
WaitForPort TESTSTUFF
/*
* Open the window
*/
idcmp = 'CLOSEWINDOW+GADGETUP+MOUSEBUTTONS+MOUSEMOVE'
flags = 'WINDOWCLOSE+WINDOWDRAG+WINDOWDEPTH+BACKFILL+RESIZE+REPORTMOUSE'
/* Open the window full size for a test... */
call OpenWindow(TESTSTUFF, 0, 0, 0, 0, idcmp, flags, "MouseTest Window")
call ModifyHost(TESTSTUFF, MOUSEBUTTONS, "%l\%x %y %b %t")
call ModifyHost(TESTSTUFF, MOUSEMOVE, "%l\%x %y %b %t")
quitflag = 0
mp = openport(TESTSTUFF_PORT)
do forever
if quitflag = 1 then leave
t = waitpkt(TESTSTUFF_PORT)
do forever
p = getpkt(TESTSTUFF_PORT)
if c2d(p) = 0 then leave
arg = getarg(p)
t = reply( p, 0 )
if arg = 'CLOSEWINDOW' then
do
call CloseWindow(TESTSTUFF)
quitflag = 1
end
else
do
say arg
call WindowText( TESTSTUFF, arg)
end
end
say "outerloop"
end
say "outathere"
call CloseScreen( "MNS" )
say "exiting"
exit