Sean wrote:
> Wow, an excellent script. Thanks!
Thank you :-) but I just noticed an error...
I forgot to reset the static i when we reach the end of jpglist.txt.
You could start your script like this:
-----------------------------------
i = i + 1
if(i > numjpgs)
i = 1
nextjpg = "c:\wallpapers\" ++ readline("c:\powerpro\store\jpglist.txt",i)
;; etc
;; and the @startup section should be:
@startup
static i = ini.get("c:\powerpro\scripts.ini","wallpaper","nextline")
static numjpgs = line(file.readall("c:\powerpro\store\jpglist.txt"),0)
;; which returns the number of lines in the file.
quit
...
-----------------------------------
I put "static numjpgs..." in the startup section to save counting the
number of lines in jpglist.txt every time the script is run.
If you prefer (if you often change the number of jpgs)
you could use this as the first line of the main section:
local numjpgs = line(file.readall("c:\powerpro\store\jpglist.txt"),0)
------------------------ Yahoo! Groups Sponsor --------------------~-->
Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar.
Now with Pop-Up Blocker. Get it for free!
http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/JV_rlB/TM
--------------------------------------------------------------------~->
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/power-pro/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/