home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ANews 2
/
AnewsCD2.iso
/
Script
/
html.rexx
< prev
next >
Wrap
OS/2 REXX Batch file
|
1999-10-11
|
2KB
|
108 lines
/* Lanceur html */
parse arg type exe '"' filename '"'
options results
type=upper(type)
ports = show('P')
do i = 1 to words(ports)
if left(subword(ports, i), 5) = 'AWEB.' then do
wwwport = subword(ports, i, 1)
address(wwwport)
'GET ACTIVEPORT'
if (rc = 0 ) then wwwport = result
end
if left(subword(ports, i), 7) = 'VOYAGER' then wwwport = subword(ports, i, 1)
if left(subword(ports, i), 7) = 'IBROWSE' then wwwport = subword(ports, i, 1)
if symbol('wwwport') = 'VAR' then break
end
if symbol('wwwport') ~= 'VAR' then do
if type="IBROWSE" then call Ibrowse
if type="VOYAGER" then call Voyager
if type="AWEB" then call AWEB
exit
end
else do
address(wwwport)
select
when wwwport = 'VOYAGER' then call V
when wwwport = 'IBROWSE' then call IB
when left(wwwport, 5) = 'AWEB.' then call AW
otherwise nop
end
end
Ibrowse:
if ~show("p",'IBROWSE') then do
address command 'run >NIL: '||exe
end
IBloop:
call delay(50)
result = SHOW("p","IBROWSE")
if result=0 then signal IBloop
if upper(right(exe,20))=UPPER("Ibrowse2.0/IBrowse ") then call delay(50*10)
IB:
address 'IBROWSE'
GOTOURL '"file://localhost/'filename'"'
SHOW
SCREENTOFRONT
ACTIVATE
exit
Voyager:
if ~show("p",'VOYAGER') then do
address command 'run >NIL: '||exe
end
Vloop:
call delay(50)
result = SHOW("p","VOYAGER")
if result=0 then signal Vloop
if upper(right(exe,14))=UPPER("VOYAGER2.95/V ") then call delay(50*10)
V:
address 'VOYAGER'
OPENURL '"file://localhost/'filename'"'
SHOW
ACTIVATE
exit
AWEB:
if ~show("p",'AWEB.1') then do
address command 'run >NIL: '||exe
end
AWloop:
call delay(50)
result = SHOW("p","AWEB.1")
if result=0 then signal AWloop
AW:
address "AWEB.1"
'GET ACTIVEPORT'
if (rc=0) then wwwport=result
address value wwwport
OPEN URL '"file://localhost/'filename'" RELOAD'
WINDOWTOFRONT
SCREENTOFRONT
ACTIVATEWINDOW
exit
FindBrowser:
ports = show('P')
do i = 1 to words(ports)
if left(subword(ports, i), 5) = 'AWEB.' then wwwport = subword(ports, i, 1)
if left(subword(ports, i), 7) = 'VOYAGER' then wwwport = subword(ports, i, 1)
if left(subword(ports, i), 7) = 'IBROWSE' then wwwport = subword(ports, i, 1)
if symbol('wwwport') = 'VAR' then break
end
if left(subword(ports, i), 5) = 'AWEB.' then do
address(wwwport)
'GET ACTIVEPORT'
if (rc = 0 ) then wwwport = result
end
return