Dilbert.com daily comic

Community Forums/Showcase/Dilbert.com daily comic

Picklesworth(Posted 2005) [#1]
I wanted to be able to read my two favourite comic strips every day with ease (translation: the only ones that are consitently funny, like comics are meant to be but aren't). So, I signed up for the free dilbert.com comic mailing service. Turns out I have to pay money to get it on Sundays, I am sent an image of the entire web page rather than just the comic, and thus I may as well just bookmark the web site or something. Consequently, I decided to have a shot at coding it myself; so I took a peak at the code archives, borrowed an image loading function, did a bit of confusing string stuff, and it worked first time with absolutely no errors at all!
Sadly, I couldn't get Calvin & Hobbes... But Dilbert is great, so I'm happy :D



Two questions for you now:
Why is it so slow to use Blitz to load a web site? Can I speed it up without any effort on my part?
How do I tell an application to just freeze? Right now I have a very silly delay in there that repeats itself endlessly.


Ryan Moody(Posted 2005) [#2]
How do I tell an application to just freeze?


With the WaitKey() command, perhaps?

Ryan


Perturbatio(Posted 2005) [#3]
change your repeat forever loop to:
While Not KeyDown(1)
Wend


*EDIT*
you might want to change the following:
			If tReadWebFile Mod 100 = 0 Then BytesReceived (readWebFile, bytesToRead)

to:
			If tReadWebFile Mod 1000 = 0 Then BytesReceived (readWebFile, bytesToRead)

it takes way too long to download otherwise (on broadband at least).


Picklesworth(Posted 2005) [#4]
Ah, I didn't know the download speed problem was that simple :)
Thanks Perturbio!
Updated


My repeat forever loop is not closing on keydown 1 because people usually press the x at the top of the window :D
However, come to think of it, the program is simple enough to just get away with WaitKey.


Erroneouss(Posted 2005) [#5]
Heh, I made something like this a while back, except for
my stocks! :)

So... Because I LOVVVVEEE comics, I have to use your thingie, and I also made one for daily Garfield, and soon, Get Fuzzy! :)


Picklesworth(Posted 2005) [#6]
Actually, the code above only works on Sundays, because the images are Gifs every other day of the week.
Just make it open up the windows picture viewer (or just call execfile and hope for the best, like I did) with the path for the temporary image. Unless you feel like putting in a Gif loader :)