Jump to content

Daily Comics - 5x faster loading!


Achilles
 Share

Recommended Posts

It's working now!

I think you mean a tray icon because there is definitely a taskbar item for this, just like most GUI's. If that's not what you mean let me know, but if it is what you mean then yes, I do hide it on purpose because it would serve no purpose in this script.

Thanks for the update! I haven't tried it yet, but I look forward to it...

No, I actually meant the taskbar button, NOT an icon in the notification tray...I don't get one for the main GUI because it's a toolbar-style type window (no min or max buttons, only a small close button, with no icon next to the window title). Those don't usually have taskbar buttons, and I don't see one for this. (I agree a tray icon would be pointless for this script).

But, as I said, it'd be an easy fix if I wanted it, and I haven't tried your latest version, so maybe the new one is a different style.

Thanks for your work! :D

"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
Link to comment
Share on other sites

  • Replies 117
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Thanks for the update! I haven't tried it yet, but I look forward to it...

No, I actually meant the taskbar button, NOT an icon in the notification tray...I don't get one for the main GUI because it's a toolbar-style type window (no min or max buttons, only a small close button, with no icon next to the window title). Those don't usually have taskbar buttons, and I don't see one for this. (I agree a tray icon would be pointless for this script).

But, as I said, it'd be an easy fix if I wanted it, and I haven't tried your latest version, so maybe the new one is a different style.

Thanks for your work! :D

Ahh, I was thinking of the GUI that is shown when you download. That's added now, or rather the additional styles are removed. I had it like that 'cause to begin with this script only did three comics. So, now there is a taskbar item for when the comics are displayed.
My Programs[list][*]Knight Media Player[*]Multiple Desktops[*]Daily Comics[*]Journal[/list]
Link to comment
Share on other sites

awesome work, but would it be possible to also retrieve the mouse over text from xkcd and display it under the comic?

I'll try that, I already found out how to get the text... It will be adding that will be kind of hard, or maybe I'll just do what they do and have it as a tooltip.
My Programs[list][*]Knight Media Player[*]Multiple Desktops[*]Daily Comics[*]Journal[/list]
Link to comment
Share on other sites

I'll try that, I already found out how to get the text... It will be adding that will be kind of hard, or maybe I'll just do what they do and have it as a tooltip.

Achewood also has mouseover text that is often pretty funny.

Thanks for your work on this script. Latest version works great! :D (Using IE version for the scrollbars)

Link to comment
Share on other sites

Both versions seem to crash on me, except when I want to view Calvin & Hobbes only.

Do add Bizarro's comics :D

That probably means that one at one point when you're downloading a link it's crashing. Could you possibly find out which comics it is? Add some a line that has something like Msgbox(0, '', $NAMES[$i]) in the for next loop to see which comics causes the crash. I'll admit I've been placing very little error handling things in this, I mean conditions like If IsArray() and similar...

I'll look at Bizarro now (instead of doing homework :D ).

My Programs[list][*]Knight Media Player[*]Multiple Desktops[*]Daily Comics[*]Journal[/list]
Link to comment
Share on other sites

Dilbert has been removed which should cause both scripts to work like they should.

Ok I think I got it... The url for todays comic is: http://dilbert.com/dyn/str_strip/000000000.../2827.strip.gif

and if you chage both 2828 to 2827 you will get yesterday's comic. Or at least I think it was yesterday's...

That just gives me a comic for a 404 error, which, although amusing, isn't there daily comic.
My Programs[list][*]Knight Media Player[*]Multiple Desktops[*]Daily Comics[*]Journal[/list]
Link to comment
Share on other sites

Not sure how their system works but this is the url for today: http://dilbert.com/dyn/str_strip/000000000.../2785.strip.gif

How'd you get that? 'Cause if I can figure it out it would be nice... Dilbert was one of the comics I enjoyed reading with this program.
My Programs[list][*]Knight Media Player[*]Multiple Desktops[*]Daily Comics[*]Journal[/list]
Link to comment
Share on other sites

How'd you get that? 'Cause if I can figure it out it would be nice... Dilbert was one of the comics I enjoyed reading with this program.

I pressed the rss button on the flash content on the main page, and all the comics from last week came up, as regular images :D

Broken link? PM me and I'll send you the file!

Link to comment
Share on other sites

Dilbert has been removed which should cause both scripts to work like they should.

That just gives me a comic for a 404 error, which, although amusing, isn't there daily comic.

Hi,

I think the code below should fix the Dilbert 404 issue. Replace your Dilbert function with this one. It's quick and dirty, but looks like it's working.

Func _GetDilbertLink()
    Local $ret[2] = ['', '']
    $pass = InetGet("http://www.dilbert.com/strips/", @TempDir & '\temp.dat')

    $file = FileOpen(@TempDir & '\temp.dat', 0)
   
    $timer = TimerInit()
    While 1
       $line = FileReadLine($file)
       $position = StringInStr($line,"FeaturedStrip")
       If $position <> 0 then ExitLoop
       If TimerDiff($timer) > (1000 * 50) then ExitLoop
    Wend
    FileClose($file)

    $position2 = StringInStr($line,'<img src="')
    $position2 = $position2 + 10
    $positionend = StringInStr($line,'.gif')
    $datei = StringMid ($line, $position2, ($positionend + 4) - $position2)

    FileDelete(@TempDir & '\temp.dat')
    $ret[0] = "http://www.dilbert.com/" & $datei
    $ret[1] = $datei
        
    Return $ret
EndFunc

-- If the apocalypse comes... beep me.

Link to comment
Share on other sites

Alright, I rewrote the Dilbert link. The scripts in the OP are updated... It now uses the RSS feed to get the newest comic instead of the temp.dat file... Here's the code just for the function:

Func _GetDilbertLink()
    Local $ret[2] = ['', '']
    $source = _INetGetSource('http://feeds.feedburner.com/DilbertDailyStrip')
    $array = StringSplit($source, @CRLF)

    For $i = 1 to UBound($array) - 1
        If StringInStr($array[$i], 'img src="http://dilbert.com/dyn') > 0 then
            $temp = _StringBetween($array[$i], 'img src="', '"')
           
            If IsArray($temp) then
                $ret[0] = $temp[0]
                $temp = StringSplit($temp[0], '/')
                $ret[1] = $temp[$temp[0]]
            EndIf
           
            Return $ret
        EndIf
    Next
    
    Return $ret
EndFunc
My Programs[list][*]Knight Media Player[*]Multiple Desktops[*]Daily Comics[*]Journal[/list]
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...