#1 Disable error messages...

open
nobody
None
5
2007-09-19
2007-09-18
Garry J. Garrett
No

Here's how I'm using Background Changing App. I've got "at" jobs that run once an hour. They use curl.exe to download a halfway current weather satelite photo of the internet. I then use Background Changing App. to make this photo my background. I set Background Changing App. to change once a minute, that way about a minute after I download the file, viola, it is updated. Because curl overwrites the same file over and over again, there's only one JPEG out there for it to load (although it "changes" once a minute, 59 minutes of the hour, it is "loading" the same photo).

Here's the problem. With curl, the downloaded file is written to standard output, so I have to redirect the output to a file. So, if there is an error, say the file isn't available, then my output is empty (or maybe it contains error messages?) That can't be helped.

Where my problem comes in is if the JPEG file (the only one Background has the option to choose) isn't a valide JPEG file, it gives me an error message. That's probably the desired behavior for most users. In my case, however, I'd like a checkbox to say "fail silently" (i.e. don't pop up an error message when you can't load the file).

If I boot up and I'm not on the internet, curl is going to fail every time and I have to shut Background down to shut it up. If my PC looses connectivity for whatever reason, I can come back to my PC and find a boatload of error message windows I have to hit "OK" on.

Discussion

  • Joochul Park
    Joochul Park
    2007-09-19

    • labels: 604415 -->
     
  • Joochul Park
    Joochul Park
    2007-09-19

    Logged In: YES
    user_id=955853
    Originator: NO

    Hi~ wow~ my first feature request~ ^-^ I'm happy~ *^~^*

    OK. I added the disable error messages thingie... now it'll just.. not display errors... except for those that may appear when running InitDialog() or the constructor for MainDlg class (which is the tray icon + menu). I'm going to leave it on for 2 days to see if it all goes well, then check the log, and if it all goes well, I'll release it then.

    Thanks for submitting a feature request. ^-^ I thought that nobody really used this so, it's really nice to know that people use this. ^-^

     
  • Logged In: YES
    user_id=377412
    Originator: YES

    If you (or anyone else who uses this) is interested, here's the shell script I use to download the satelite photos...

    File Added: getweather.bat

     
  • Downloads images via curl

     
    Attachments
  • Logged In: YES
    user_id=377412
    Originator: YES

    And here's a batch file I use to load the at jobs...
    File Added: setweather.bat

     
  • Loads at jobs to run "getweather.bat" hourly

     
    Attachments
  • Logged In: YES
    user_id=377412
    Originator: YES

    I've actually done this for years on Solaris, using "xli" (X-Windows Load Image) to load the photos, and have done it on my Mac (Mac's come with the functionality of "Background Changing App" built into their GUI, Aqua).

    I came across Background Changing App because my Aunt had an old Windows 3.1 screen saver / background changer program that she just loved and it no longer worked under Win2K (or WinXP?). The photos (nature photos) were all JPEG files, so I did some searching on source forge, found Background Changing App, and set it up on her PC and pointed it to the JPEGs and she was happy. It was after I discovered this program for my Aunt that I realized, I could use it to do the satelite image thing I've always had as my background on other platforms.

    I've had at least 3 other people ask me how I do the "current" satelite photos (takes time to process the photos, so they are about 1/2 hour old when I get them, still...) and have passed along my batch files and a link to Background Changing App to them. I don't know if they use it or not. My in-laws are getting DSL and want me to set it up on their PC now. :-) That's actually what prompted me to make the request - I know I'm going to get phone calls if they get error windows popping up (the others I've passed my batch files onto have degrees in computer programming). :-)

    I realize I'm probably not using it for it's orginal intended purpose (cycling through some static list of photos), but it meets my needs very well and I am thankful that you have shared it. I know my Aunt uses it, and soon my In-laws will too. There may be others out there who want to do the satelite thing, or maybe they have some other image they want to download on a regular basis? I figured I might as well pass along my batch files for their benefit.

    I save the batch files (and curl) in C:\bin (a Unix convention), and put the images in C:\Weather. The Windows version of curl can be downloaded from http://curl.haxx.se/ (just put it in C:\bin or modify my batch files to point to wherever you load it into).

     
  • Joochul Park
    Joochul Park
    2007-09-19

    Logged In: YES
    user_id=955853
    Originator: NO

    ohh~ I see~ hehe. It's nice to know that my app is helpful to other people. ^-^

    So far, I've tested the invalid picture file (tried loading a CPP file with manually load image) error and no image found error (tried loading a directory devoid of images or just empty directory) and it won't popup anything at all, it'll just log it. If it all goes well, I'll upload it tomorrow. ^-^