Search results for 'WebRobot'. 1 post(s) found.

  1. 2007/08/27 Interacting With TinyPic From C#
2007/08/27 08:42

Interacting With TinyPic From C#


The following snippet will demonstrate how to interact with http://TinyPic.com,an image mirroring service,directly from a C# application,using the WebRobot component available from http://foxtrot-xray.com/web-robot/

void uploadTinyPic(string imagetags,string filename)
{
    foxtrot.xray.WebRobot wrobot = new foxtrot.xray.WebRobot();
    foxtrot.xray.Form wform;
    foxtrot.xray.Input wtags;
    foxtrot.xray.Input wimg;
    foxtrot.xray.Input wurl;
    wrobot.Base = "http://TinyPic.com/";
    wrobot.LoadPage("/");
    wform = wrobot.Forms[0];
    wtags = wform.GetFieldByName("the_tag");
    wimg = wform.GetFieldByName("the_file");
    wtags.InputValue = imagetags;
    wimg.InputValue = filename;
    wrobot.SubmitForm(wform);
    wform = wrobot.Forms[0];
    wtags = wform.GetFieldByName("mytag");
    wimg = wform.GetFieldByName("myimg");
    wurl = wform.GetFieldByName("myurl");
    System.Windows.Forms.MessageBox.Show_
    ("Image uploaded successfully!\r\n"
      "HTML link: "
   (string)wtags.InputValue
   "\r\n"
          "[IMG] tag: "
   (string)wimg.InputValue   "\r\n"
          "Image URL: "   (string)wurl.InputValue);
}

Trackback 3 Comment 0

Trackback : Cannot send a trackbact to this post.

  1. Subject different money making ideas

    Tracked from moneyideas 2010/01/29 05:10 delete

    moneyideas

  2. Subject different money making ideas

    Tracked from moneyideas 2010/01/29 13:55 delete

    moneyideas

  3. Subject different money making ideas

    Tracked from moneyideas 2010/01/31 16:44 delete

    moneyideas