home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
AmigActive 4
/
AACD04.ISO
/
AACD
/
Online
/
TView
/
Rexx
/
Send2ToAmirc.rexx
< prev
next >
Wrap
OS/2 REXX Batch file
|
1999-10-12
|
1KB
|
59 lines
/********************************************************************
*
* Example of an arexx script to be used with TView.
* A little spam on IRC is always good =)
* Now fixed for amirc with strings > 250 (lame mm but I don't know arexx)
********************************************************************/
options results
worked=0
if SHOW('P','TVIEW.1')=1 then worked=1
else if SHOW('P','TVIEW.2')=1 then worked=2
if worked>0 then do
if worked=1 then address TVIEW.1
else if worked=2 then address TVIEW.2
"GetProgram"
if RC>0 then exit
prog=RESULT
"GetTime"
if RC>0 then exit
time=RESULT
"GetInfo"
if RC>0 then exit
info=RESULT
"GetChannel"
if RC>0 then exit
chan=RESULT
end
else do
ADDRESS COMMAND 'Requestchoice "TView ARexx script Error" "Could not find TView port, please start it first!" "Ok"'
exit
end
worked=0
if SHOW('P','AMIRC.1')=1 then worked=1
else if SHOW('P','AMIRC.2')=1 then worked=2
if worked>0 then do
if worked=1 then address AMIRC.1
else if worked=2 then address AMIRC.2
"say "chan time prog
len=length(info)
info1 = substr(info, 1, 250)
info2 = substr(info, 251)
info3 = substr(info2, 251)
info4 = substr(info3, 251)
info5 = substr(info4, 251)
"say" info1
if len>250 then "say" info2
if len>500 then "say" info3
if len>750 then "say" info4
if len>1000 then "say" info5
end
else do
ADDRESS COMMAND 'Requestchoice "TView ARexx script Error" "Could not find AmIRC port, please start it first!" "Ok"'
exit
end