cnodnarb Professional Member


Joined: 11 Sep 2002 Posts: 763 Location: Eastman, GA
|
Posted: Mon Sep 16, 2002 2:52 am Post subject: Open Source Random Graphic Screen Saver |
|
|
Hi all, I have this script that could easily be turned into a screen saver, but I'm not sure where to get HTML transition codes, and any help with getting a pic into the Display Properties panel would help too.
Code: |
rem GNU Slideshow
rem Copyright (C) 2002 Brandon Cunningham
rem This program is free software; you can redistribute it and/or
rem modify it under the terms of the GNU General Public License
rem as published by the Free Software Foundation; either version 2
rem of the License, or (at your option) any later version.
rem This program is distributed in the hope that it will be useful,
rem but WITHOUT ANY WARRANTY; without even the implied warranty of
rem MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
rem GNU General Public License for more details.
rem You should have received a copy of the GNU General Public License
rem along with this program; if not, write to the Free Software
rem Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
title GNUSlideshow
inifile open,@path(%0)slideshow.ini
external vdsrnd32.dll
external vdselm.dll,
DIALOG CREATE,GNUSlideshow,-1,0,240,160,class richard,resizable,savepos
dialog add,menu,&Help,E&xiting Full Screen,&About
dialog add,taskicon,taskicon1
element ADD,browser,browser1,richard,0,0,240,162,@path(%0)frame.html
dialog add,list,list1,0,0,0,0
dialog add,list,list2,0,0,0,0
dialog add,list,list3,0,0,0,0
DIALOG SHOW
dialog create,Slideshow2,0,0,@SYSINFO(SCREENWIDTH),@SYSINFO(SCREENHEIGHT),class richard2,notitle,ontop
element add,browser,browser2,richard2,-1,-1,@sum(@SYSINFO(SCREENWIDTH),10),@sum(@SYSINFO(SCREENHEIGHT),10),@path(%0)frame.html
dialog show
window hide,slideshow2
dialog select,0
parse "%a;%b;%c;%d",@winpos(#richard,LTWH)
element setpos,browser1,0,0,@diff(%c,8),@diff(%d,45)
list add,list2,<HTML><FRAMESET ROWS='100"%"'><FRAME SRC='temp.html'></FRAMESET>
list savefile,list2,@path(%0)frame.html
list clear,list2
list add,list2,<HTML><FRAMESET ROWS='100"%"'><FRAME SRC='temp.html' SCROLLING=@chr(34)no@chr(34)></FRAMESET>
list savefile,list2,@path(%0)frame2.html
element set,browser1,@path(%0)frame.html
element set,browser2,@path(%0)frame.html
%%count = 0
%%directory = @iniread(directory,directory)
if @null(%%directory)
goto set directorymenu
else
end
directory change,%%directory
list loadfile,list3,@path(%0)extensions.txt
if @null(@text(list3))
list filelist,list1,*.jpg
list filelist,list1,*.bmp
list filelist,list1,*.gif
list filelist,list1,*.art
list filelist,list1,*.efm
list filelist,list1,*.png
list filelist,list1,*.wmf
list filelist,list1,*.jif
list filelist,list1,*.jpeg
else
list seek,list3,0
repeat
list filelist,list1,*.@item(list3)
if @equal(@count(list3),1)
rem do nothing
else
list seek,list3,@succ(@index(list3))
end
until @equal(@index(list3),@diff(@count(list3),1))
end
:evloop
%%directory = @iniread(directory,directory)
if @null(%%directory)
goto set directorymenu
else
end
%%delay = @iniread(Delay,delay)
if @null(%%delay)
inifile write,Delay,delay,10
goto evloop
else
end
%%eventdialog = @event(d)
parse "%%event;%%dialog",%%eventdialog
if %%event
dialog select,%%dialog
goto %%event
else
end
%%count = @succ(%%count)
wait 1
if @equal(%%count,%%delay)
%%count = 0
gosub changepic
else
end
if @greater(%%count,%%delay)
%%count = 0
gosub changepic
else
end
goto evloop
:cancelbutton
window hide,slideshow2
goto evloop
:exitmenu
:close
if @equal(%%dialog,1)
window hide,slideshow2
dialog select,0
goto evloop
else
end
element remove,browser1
element remove,browser2
exit
:taskicon1click
dialog popup,Set &Directory|Set &Delay|&Edit Extensions|E&xit
goto evloop
:Edit Extensionsmenu
shell open,@path(%0)extensions.txt
goto set directorymenu
:set directorymenu
%%dirdlg = @dirdlg()
inifile write,directory,directory,%%dirdlg
list clear,list1
%%directory = @iniread(directory,directory)
if @null(%%directory)
goto set directorymenu
else
end
directory change,%%directory
list loadfile,list3,@path(%0)extensions.txt
if @null(@text(list3))
list filelist,list1,*.jpg
list filelist,list1,*.bmp
list filelist,list1,*.gif
list filelist,list1,*.art
list filelist,list1,*.efm
list filelist,list1,*.png
list filelist,list1,*.wmf
list filelist,list1,*.jif
list filelist,list1,*.jpeg
else
list seek,list3,0
repeat
list filelist,list1,*.@item(list3)
if @equal(@count(list3),1)
rem do nothing
else
list seek,list3,@succ(@index(list3))
end
until @equal(@index(list3),@diff(@count(list3),1))
end
goto evloop
:set delaymenu
%%input = @input(Insert delay time)
inifile write,delay,delay,%%input
goto evloop
:resize
REM Resize Dialog to Fill Window VDH by NodNarb
parse "%a;%b;%c;%d",@winpos(#richard,LTWH)
element setpos,browser1,0,0,@diff(%c,8),@diff(%d,45)
if @equal(@winpos(#richard,s),3)
window normal,slideshow2
else
end
goto evloop
:changepic
if @null(@text(list1))
info No pictures to be displayed. Please choose another directory.
goto set directorymenu
else
end
%a = @random(0,@count(list1))
list seek,list1,%a
list clear,list2
list add,list2,<HTML><BODY bgcolor='black'><table height='100"%"' width='100"%"'><td height='100"%"' width='100"%"' align=center valign=middle><IMG SRC='%%directory\@item(list1)'></td></table></BODY></HTML>
list savefile,list2,@path(%0)temp.html
element command,browser1,refresh
element command,browser2,refresh
exit
:aboutmenu
info GNU Slideshow@cr()Copyright (C) 2002 Brandon Cunningham@cr()This program is free software; you can redistribute it and/or@cr() modify it under the terms of the GNU General Public License@cr() as published by the Free Software Foundation; either version 2@cr() of the License"," or (at your option) any later version.@cr() This program is distributed in the hope that it will be useful","@cr() but WITHOUT ANY WARRANTY; without even the implied warranty of@cr() MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the@cr() GNU General Public License for more details.@cr() You should have received a copy of the GNU General Public License@cr() along with this program; if not"," write to the Free Software@cr() Foundation"," Inc."," 59 Temple Place - Suite 330"," Boston"," MA 02111-1307"," USA.
goto evloop
:exiting full screenmenu
info To exit full screen hold down alt and press f4"," ALT+F4
goto evloop
|
TERMS AND CONDITIONS
http://www.gnu.org/copyleft/gpl.html#SEC3
NodNarb
P.S.
I LOVE the VDS color coding, only problem is it incorrectly translates < > & and probably some other symbols, any way to fix that, or is this already a dead topic? |
|