home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Fish 'n' More 2
/
fishmore-publicdomainlibraryvol.ii1991xetec.iso
/
fish
/
telecom
/
vlt_455
/
rexx
/
vltmouse.rexx
< prev
next >
Wrap
OS/2 REXX Batch file
|
1991-02-12
|
1KB
|
51 lines
/** VLTMouse.rexx
*
* Example of how to receive mouse move messages from VLT and to
* extract the line the user clicked on.
*
**/
address VLT
quitflag = 0
mp = openport('VLTMOUSE')
do forever
if quitflag = 1 then leave
t = waitpkt('VLTMOUSE')
do forever
p = getpkt('VLTMOUSE')
if c2d(p) = 0 then leave
string = getarg(p)
t = reply(p, 0)
parse var string yy xx yold xold ytot xtot qual
"extract x"
"extract y"
"movecursor "||xx||" "||yy
"extract reviewlineatcursor"
"movecursor "||VLT.x||" "||VLT.y
str = VLT.reviewlineatcursor
vltwidth = ScreenCols("VLT") /* Find size of VLT screen. */
vltheight = ScreenRows("VLT")
if vltwidth == -1 then do /* If width was -1, it was */
vltwidth = ScreenCols() /* a Workbench window. */
vltheight = ScreenRows()
end
vltwidth = vltwidth-48
vltheight = vltheight-100
if length(str) * 8 > vltwidth then str = left(str, vltwidth % 8)
str = request(0, vltheight % 4, "Edit and send:", str, , "Cancel", VLT)
if str ~= "" then 'send raw ('||str||')'
end
end
/* This example doesn't really ever: */
exit