Sign in to follow this  
Followers 0
james3mg

Dork Tower Slideshow

1 post in this topic

#1 ·  Posted (edited)

If you know Dork Tower, you may enjoy having this up for a few days :P

#Include <GUIConstants.au3>

$Paused=0
$SlideshowGUI=GUICreate("Dork Tower Slideshow by james3MG",450,700)
$TheComic=GUICtrlCreatePic("",0,0,450,600)
$BackButton=GUICtrlCreateButton("Back",5,675,100,20)
$Link=GUICtrlCreateLabel("",0,650,450,20,$SS_CENTER)
GUICtrlSetFont(-1,9,400,6)
GUICtrlSetColor(-1,0x0000FF)
GUICtrlSetCursor(-1,0)
$NextButton=GUICtrlCreateButton("Next",345,675,100,20)
Global $HistoryArray[1]=[0]
$SlideshowTimer=TimerInit()
NextSlide()
GUISetState()

While 1
    If TimerDiff($SlideshowTimer) > 120000 AND NOT $Paused Then
        NextSlide()
    EndIf
    Switch GUIGetMsg()
        Case 0
            ContinueLoop
        Case $BackButton
            If $HistoryArray[0] > 1 Then
                $HistoryArray[0]-=1
                INetGet("http://archive.gamespy.com/comics/dorktower/images/comics/dorktower"&$HistoryArray[$HistoryArray[0]]&".jpg",@TempDir&"\dorktower.jpg")
                GUICtrlSetData($Link,"http://archive.gamespy.com/comics/dorktower/images/comics/dorktower"&$HistoryArray[$HistoryArray[0]]&".jpg")
                GUICtrlSetImage($TheComic,@TempDir&"\dorktower.jpg")
                $Paused=1
            EndIf
        Case $NextButton
            NextSlide()
        Case $GUI_EVENT_CLOSE
            Exit
        Case $Link
            Run(@ComSpec&' /c start "" "'&GUICtrlRead($Link)&'"',"",@SW_HIDE)
    EndSwitch
WEnd

Func NextSlide()
    $Paused=0
    $SlideshowTimer=TimerInit()
    If UBound($HistoryArray)=$HistoryArray[0]+1 Then
        ReDim $HistoryArray[UBound($HistoryArray)+1]
        $HistoryArray[0]+=1
        Do
            $HistoryArray[$HistoryArray[0]]=Random(1,2000,1)
        Until INetGet("http://archive.gamespy.com/comics/dorktower/images/comics/dorktower"&$HistoryArray[$HistoryArray[0]]&".jpg",@TempDir&"\dorktower.jpg")=1
    Else
        $HistoryArray[0]+=1
        INetGet("http://archive.gamespy.com/comics/dorktower/images/comics/dorktower"&$HistoryArray[$HistoryArray[0]]&".jpg",@TempDir&"\dorktower.jpg")
    EndIf
    GUICtrlSetData($Link,"http://archive.gamespy.com/comics/dorktower/images/comics/dorktower"&$HistoryArray[$HistoryArray[0]]&".jpg")
    GUICtrlSetImage($TheComic,@TempDir&"\dorktower.jpg")
EndFunc

It doesn't look great when he draws double-height comics sometimes (I don't feel like having the GUI size pop around based on the picture size just to fix this either), and I think he started mixing up the file names recently, so it doesn't get all the newest comics, but still...some of the old ones are the best anyway :)

...Now I just need one for Get Fuzzy. Darn comics.com and their random file names!

Edited by james3mg

"There are 10 types of people in this world - those who can read binary, and those who can't.""We've heard that a million monkeys at a million keyboards could produce the complete works of Shakespeare; now, thanks to the Internet, we know that is not true." ~Robert Wilensky0101101 1001010 1100001 1101101 1100101 1110011 0110011 1001101 10001110000101 0000111 0001000 0001110 0001101 0010010 1010110 0100001 1101110

Share this post


Link to post
Share on other sites



Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0