home *** CD-ROM | disk | FTP | other *** search
- /* $VER: IBcheckURL.ibrx 1.3e ©1997 by mike@kily.ruhr.de (http://home.pages.de/~kilyman)
-
- Ibrowse Arexx Script checks - is the shown URL in HotList?
-
- Problem:
-
- Everybody collects URLs in his IBrowse Hotlist. But if you ADD a "NEW" URL
- do you really Know ALLWAYS that this URL is not also in your Hotlist?!
- Perhaps NOT, okay, here comes the sollution.
-
- Solution:
-
- This Scripts simply compares your IBrowse Hotlist entrys with the actual
- URL. If if Founds a matching Entry it shows Up a Requester.
-
- Install:
-
- This Script requires reqtools.library and rexxreqtools.library
- (both in Aminet/ReqToolsUsr.lha)
-
- Copy this script to the IBrowse Homepath
- Put in IBrowse Arexx-Menu as Check URL.
-
-
- Please send me a Email if you use this script.
-
- ************************************************************************
-
- config variables: */
-
-
- MAXWID=50
- /* this is the maximum URL length which the Requester Shows.
- (some URLs are really long and a wide Req don't look good)
- */
-
- IBHOTLIST='ibrowse-hotlist.html'
- /* complete Path for IBrowse Hotlist if script is not in IB-HomePath.
- */
-
- RTTAGS='rt_pubscrname=IBROWSE rt_font=helvetica.font/13'
- /* IBrowse Pubscreenname and default Reqtools-Font
- */
-
- /**********************************************************************/
-
-
-
- OPTIONS RESULTS
-
- if ~exists("Libs:rexxreqtools.library") then do
- echo "LIBS:RexxReqTools.Library not available."
- exit
- end
-
- ok=addlib("rexxreqtools.library",0,-30)
-
- address 'IBROWSE'
- 'QUERY URL'
- IBURL = result
-
- NL = '0a'x
- group="- no group -"
-
- IF Open('hotlist',IBHOTLIST,'r') THEN
- DO
- DO UNTIL Eof('hotlist')
- zeile=ReadLn('hotlist')
-
- if left(zeile,7)="<LI><B>" then
- do
- agroup=group
- parse var zeile '<LI><B>'group'</B>'dummy
- end
-
- if left(zeile,5)="</UL>" then group=agroup
-
- if left(zeile,11)="<LI><A HREF" then
- do
- parse var zeile '<LI><A HREF="'url'"'dummy'>'name'</A>'
-
- IF UPPER(url)==UPPER(IBURL) THEN
- do
- erfolg=1
-
- if length(iburl)>MAXWID then ibsurl=left(ibURL,MAXWID)||"..."
- else ibsurl=iburl
-
- call rtezrequest( "Title: " name||NL||"Group: " group||NL||,
- "URL: " ibsURL, "next...|Open HotList|Abort" ,"Matching URL found !" , RTTAGS)
-
- if rtresult == 0 then exit
-
- if rtresult == 2 & show('P','IBROWSE') then
- do
- address 'IBROWSE'
- OPENHOTLIST
- EXIT
- end
-
- end
-
- end
-
- END
- Call Close('hotlist')
-
- if erfolg~=1 then
- do
- if length(iburl)>MAXWID then iburl=left(ibURL,MAXWID)||"..."
-
- call rtezrequest( "URL: "IBURL" is not in HotList !" , "Ok...|Open HotList" ,"Search result" , RTTAGS)
-
- if rtresult == 0 & show('P','IBROWSE') then
- do
- address 'IBROWSE'
- OPENHOTLIST
- end
-
- EXIT
-
- END
- call rtezrequest("no more matching URLs in Hotlist !" , "Fine...","Search finished" , RTTAGS)
-
- end
-
- EXIT
-