NetTalk Central

Author Topic: can I create a nettalk client that will save jpg images to my computer?  (Read 4262 times)

alpatrick

  • Newbie
  • *
  • Posts: 7
    • View Profile
    • Email
I have a few thousand images of book covers I need to save to my computer so they can be used later.  I have a list of the url's that point to the images.  For example .  http://images.contentreserve.com/ImageType-200/2254-1/%7BD3BA9D66-93A8-4C04-8581-07F8E0987C0D%7DImg200.jpg

Is there a way I can save them as valid jpg file to my local machine using a nettalk web client and stringtheory perhaps.  Maybe someone has some example code or any insite.

Thanks

Stu

  • Hero Member
  • *****
  • Posts: 508
    • View Profile
    • Email
Hi there.

So if I'm reading what you are asking correctly, the psuedo-code would look something like this.

1. Create a window with a button on it, and NetWebClient object.
2. In Init embed (after files opened before window opened is where I normally have it, unless there's some specific reason for after window opened) get your list of urls ready.
3. In Init, after window opened, post(event:accepted,?buttonfeq).
4. In button accepted embed, get first url from queue/stringtheory/whatever is your list and do a YourWebClient.Fetch() with params.
5. Put code into both Error embed and Success embed for the netwebclient object, code that:
  a) if Success, copies the file to where you want it using .SavePage(), check the nettalk docs on this
  b) if Error logs the error
  c) for both embeds, gets the next url and runs a .Fetch() on it.
  d) for both embeds, if gets to end of url list, break out (close window).


Hope that helps.
Cheers,

Stu Andrews

alpatrick

  • Newbie
  • *
  • Posts: 7
    • View Profile
    • Email
Thank you very much I got it going.   Your directions were very helpful.