home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
AmigActive 4
/
AACD04.ISO
/
AACD
/
Online
/
AWebScripts
/
Queue.awebrx
< prev
next >
Wrap
Text File
|
1999-11-25
|
1KB
|
69 lines
/* $VER: Queue.awebrx 1.0 (17.11.99) by Jorma Oksanen <tenu@sci.fi>
Allows adding URLs to a (possibly local) queue, where they can
later be restored from.
Usage:
Open a pop-up menu on a link(s) you want to follow later and
select 'Queue'. Later, press numeric pad 'Enter' to enter
those pages.
Setup:
GUI/Popup/Link
Queue RUN AWeb3:Plugins/Queue.awebrx %u F
Gui/Keys
Num Enter RUN AWeb3:Plugins/Queue.awebrx NEXT
You can give two options to the popup command:
F Prefetches URL into the cache. Recommended.
L Add URL to a local queue, it won't affect
other windows. Local queue has a higher
priority than the global one when entering
pages.
*/
options results
cname='AWebQueue'
parse value address() with '.' n
if upper(arg(1))='NEXT' then do
url=pull(cname'.'n); if url='' then url=pull(cname)
if url='' then 'request "Queue" "No more URLs in queue" "Ok" NOWAIT'
else 'open "'url'"'
exit 0
end
parse arg '"' url '"' opt
opt=upper(opt)
if pos('F',opt)>0 then 'load "'url'"'
if pos('L',opt)>0 then cname=cname'.'n
call push(cname,url)
exit 0
/* Push/pull an url to/from a named queue
*/
push: procedure
call setclip(arg(1),getclip(arg(1))||arg(2)'\')
return
pull: procedure
parse value getclip(arg(1)) with u '\' q
call setclip(arg(1),q)
return u