60
« on: 2008.10.14, 18:27:36 »
As I feared, Rapidshare has changed yet again and returned to delays between allowed downloads. Modified program complete below, too complex to specify edits. Still useful to prompt, though a bit confused when other d/ls are going too. You should hit a key to end the nagging before opening the Rapidshare window; this is intentional for purposes of nagging, but I already dislike it, may modify to watch automatically.
----------------------------------------------------------------------------------
/* PARTY helps maximize downloading from Rapidshare by automated nagging. */
/* Chirps while 'RapidShare:' is in window list, then monitors .part files. */
/* October 2008: changes, 15 minute waits between downloads, NAGS for new. */
/* now less useful with more than rapidshare files being d/led (by FireFox) */
call rxfuncadd 'sysloadfuncs', 'rexxutil', 'sysloadfuncs'
call sysloadfuncs
/* monitor this directory for .part files; trill when appear */
mondir= 'C:\TEMP'
/* sleep period in seconds; sets how often window list is queried */
sleepqwl= 10
/* poll window list for this string every sleepqwl secs */
monwl= 'RapidShare:'
/* seconds to wait after monwl is present before chirping */
after= 75
/* number of sleepqwl loops sets period of checking dir for .part files */
nloops= 3
/* wait minutes between allowed downloading (for small files, may be less) */
between= 15
/* period of NAGGING loop after between file wait, make "ended" sound */
NAGtime= 60
np= 0
lc= 0
do forever
fl= 1 /* flag used to wait through the normal countdown period */
do until notpresent = 1 /* monitor window list for text in monwl */
call sysqueryswitchlist "wl."
notpresent= 1
do n= 1 to wl.0 /* check all entries */
if pos(monwl, wl.n) > 0 then notpresent= 0
end
if notpresent = 0 & fl = 1 then do
say '"'monwl'" present! Sleeping for 'after' seconds before nagging...'
call syssleep after
fl= 0
end
if notpresent = 0 then do /* after first loop, periodic chirping */
call chirp
call syssleep sleepqwl
lc= 0 /* reset counter so goes right to check / trill */
end
end
if lc = 0 then do
lc= 0
rc= sysfiletree(mondir||'\*.part', 'parts.', 'FO')
say ' 'time('N')' Previous = 'np' Now present = 'parts.0
if np < parts.0 then call trill
if np > parts.0 then do
say 'Sleeping for 'between' minutes (assumes only RS files downloading)'
do n= between to 1 by -1 /* however, since url is placed in EA, it's */
call charout, n'... ' /* possible to ignore non-RS files; the fix */
call syssleep 60 /* awaits it becoming a problem for me */
end
say
say 'You MUST hit a key to end the NAG loop!'
do while chars() = 0 /* _REALLY_ NAG LOOP */
call ended
do nag= 1 to 10
call syssleep NAGtime / 10 /* for faster response */
call charout, 'Nag '
if chars() > 0 then do
say 'Nagging ended; monitoring for 'monwl
nag= 11
end
end
end
k= sysgetkey('noecho') /* read just to clear chars() test */
end
np= parts.0
end
call syssleep sleepqwl
lc= lc + 1
if lc > nloops then lc= 0
end
chirp:
do n= 0 to 2; call beep 2500, 50; call syssleep 0.1; end; return
trill:
do n= 0 to 9; call beep 2000 + 200 * n, 50; end; return
ended: /* once used to this, might have to nag until a key is pressed... */
do n= 9 to 0 by -1; call beep 1000 + 50 * n, 200; end; return