Archive

Archive for the ‘Delphi stuff’ Category

Tiny Uploader update

April 28th, 2012 No comments
  • Fixed: When using the “Paste” button to add an image, it was always uploaded, no matter what settings you had. Now it will follow the Capture/Upload combination setting (or none).
Categories: Delphi stuff, Software Tags:

New update to Tiny Uploader 2.76

April 21st, 2012 No comments
  • Fixed an issue when capturing windows with DirectX surfaces.
Categories: Delphi stuff, Software Tags:

Tiny Uploader portable

April 9th, 2012 No comments

Made a small modification to the single-exec version, adding /portable to the commandline will use the current folder for the settings etc.

Categories: Delphi stuff, Software Tags:

Tiny Uploader update

April 5th, 2012 No comments

New update to current build, fixed more issues with the size optimizations for upload.

Categories: Delphi stuff, Software Tags:

Tiny Uploader 2.76

March 23rd, 2012 No comments
  • 2.76: Fixed some issues when the image is being processed to optimize for upload speed, it wasn’t being resized properly.
Categories: Delphi stuff, Software Tags:

Tiny Uploader 2.75

December 26th, 2011 2 comments
Categories: Delphi stuff, Software Tags:

Tiny Uploader 2.73

December 3rd, 2011 No comments

New version of tiny uploader available.

Categories: Delphi stuff, Software Tags:

TwitMee source code

October 12th, 2011 1 comment

Been getting a lot of emails asking for the source code for the demo application TwitMee that uses my delphi twitter library, so finally uploaded it, you can get it here:

http://eden.fm/twitmee/

Categories: Delphi stuff, Software Tags:

Tiny Uploader 2.7 update

October 11th, 2011 1 comment

2.7:
- Added a 64 bit version. Context menu works with this one. (note: aero thumbnails capture doesn’t yet work in this version for x64)
- Cropped capture now displays a live view while you select the area.
- Added a “current session” log area, which is deleted after you restart.

Download:  http://eden.fm/tinypic-uploader/

Categories: Delphi stuff, Software Tags:

MySolusVM 0.5 beta

October 10th, 2011 No comments

Published a new version of my SolusVM client application.

New version supports multiple servers, displays warnings upon an error and there is also a 64-bit version available.

Categories: Delphi stuff, Software Tags:

TwitterLib and TwitMee update

March 31st, 2011 4 comments

Updated my delphi twitter library and the little twitme tool.

There was a problem with the unix timestamp related to daylight savings time which just recently started here.

Download
TwitterLib - 1211 downloads

Categories: Delphi stuff, Software Tags:

Twitter library v0.33

March 5th, 2011 No comments

New version of my Twitter library for Delphi.

- xAuth/SSL support.

There are several changes in the login process, please read the usage.pas and changelog.

Download
TwitterLib - 1211 downloads

Twitter library update 0.32

February 28th, 2011 No comments
Categories: Delphi stuff, Software Tags:

another twitter library update v0.31

February 27th, 2011 1 comment

v0.3:

- Added a method: RetrievePIN(user,pass), with this you can avoid the user having to login and return with an access PIN, the app will retrieve it on its own by simulating a login etc. Use with care, since this method is prone to errors whenever Twitter changes something in their login and auth process. Check usage.pas for details on when to use this.
Note: reposted with a small modification to fix an error in the preauth process, redownload if you got 0.3 before.

Download
TwitterLib - 1211 downloads

Here’s the magic:

procedure TwitterCli.RetrievePIN(user,pass: ansistring);
Var h: THttpCli;
    pvars,token,oatoken: ansistring;
    ts: TStringList;
    s,x: ansistring;
    a: Integer;
begin

  LastReq := trRequestRawAccess;

  FCookie := '';
  ts := TStringList.Create;
  h := THttpCli.Create(nil);
  with h do
  begin
    url := 'http://twitter.com/oauth/authorize?oauth_token='+OAuthToken;
    RcvdStream := TMemoryStream.Create;
    OnDocEnd           := HTTPClientDocEnd;
    OnHeaderEnd        := HTTPClientHeaderEnd;
    OnBeforeHeaderSend := HTTPClientBeforeHeaderSend;
    OnCookie           := GrabCookie;
    try
      Get;
    except
      on e:exception do
      begin
        if DebugMode then if Assigned(DebugMemo) then TMemo(DebugMemo).Lines.Add(e.Message);
        ResultStrings.Text := 'Error: '+e.Message;
      end;
    end;

     try
      h.RcvdStream.WriteBuffer(#0' ', 1);
      h.RcvdStream.Position := 0;
      ts.LoadFromStream(h.RcvdStream);
    finally
    end;
  end;

  if h.StatusCode <> 200 then
  begin
    LastHttpStatus := h.StatusCode;
    ResultStrings.Text := 'Error in raw authentication on 1st step';
    h.RcvdStream.Free; h.RcvdStream := nil;
    FreeAndNil(h);
    FreeAndNil(ts);
    TriggerReqDone;
    Exit;
  end;

  if DebugMode then if Assigned(DebugMemo) then with TMemo(DebugMemo) do
   TMemo(DebugMemo).Lines.Add(h.Cookie);

    h.RcvdStream.Free; h.RcvdStream := nil;

  if FCookie[length(FCookie)] = ';' then Delete(FCookie,length(FCookie),1);

  if DebugMode then if Assigned(DebugMemo) then with TMemo(DebugMemo) do
  begin
    TMemo(DebugMemo).Lines.Add('----------------------------------------');
    TMemo(DebugMemo).Lines.Add('----------------------------------------');
  end;

  s := ts.text;
  if Pos('twttr.form_authenticity_token', s) > 0 then
  begin
    Delete(s,1,Pos('twttr.form_authenticity_token',s)+32);
    s := Copy(s,1,Pos('''',s)-1);
  end
  else
  begin
    LastHttpStatus := 0;
    ResultStrings.Text := 'Error in raw authentication prelogin';
    h.RcvdStream.Free; h.RcvdStream := nil;
    FreeAndNil(h);
    FreeAndNil(ts);
    TriggerReqDone;
    Exit;
  end;

  ts.Clear;
  with h do
  begin
    url := 'http://twitter.com/oauth/authorize';
    RcvdStream := TMemoryStream.Create;
    SendStream := TMemoryStream.Create;
    pvars := ('authenticity_token=' + s +
             '&oauth_token=' + OAuthToken +
             '&session%5Busername_or_email%5D=' + user +
             '&session%5Bpassword%5D=' + pass);
    SendStream.Write(pvars[1], Length(pvars));
    SendStream.Seek(0, soFromBeginning);
    OnDocEnd           := HTTPClientDocEnd;
    OnHeaderEnd        := HTTPClientHeaderEnd;
    OnBeforeHeaderSend := HTTPClientBeforeHeaderSend;
    Cookie := FCookie;
    if DebugMode then if Assigned(DebugMemo) then with TMemo(DebugMemo) do
     TMemo(DebugMemo).Lines.Add('Cookie before post='+FCookie);
    ExtraHeader := 'Origin:https://twitter.com' + #13#10 +
                   'Referer:http://twitter.com/oauth/authorize?oauth_token=' + OAuthToken;
    try
      Post;
    except
      on e:exception do
      begin
        if DebugMode then if Assigned(DebugMemo) then TMemo(DebugMemo).Lines.Add(e.Message);
        ResultStrings.Text := 'Error: '+e.Message;
      end;
    end;

     try
      h.RcvdStream.WriteBuffer(#0' ', 1);
      h.RcvdStream.Position := 0;
      ts.LoadFromStream(h.RcvdStream);
    finally
    end;

    x := '';
    s := ts.Text;
    if Pos('<div id="oauth_pin">',s) > 0 then
    begin
      Delete(s,1,Pos('<div id="oauth_pin">',s)+19);
      s := Copy(s,1,Pos('<',s));
      for a := 1 to length(s) do
       if (Ord(s[a]) > 47) and (Ord(s[a]) < 58) then
        x := x + s[a];
    end;

    LastHttpStatus := h.StatusCode;

    if x = '' then LastHttpStatus := 0
    else AccessPIN := x;

    if DebugMode then if Assigned(DebugMemo) then TMemo(DebugMemo).Lines.Add('PIN='+x);

    if DebugMode then if Assigned(DebugMemo) then with TMemo(DebugMemo) do
    begin
      TMemo(DebugMemo).Lines.Add(ts.Text);
      TMemo(DebugMemo).Lines.Add(h.Cookie);
    end;

    if h.StatusCode <> 200 then ResultStrings.Text := 'Error in raw authentication on 2nd step';

    FreeAndNil(ts);
    h.RcvdStream.Free; h.RcvdStream := nil;
    h.SendStream.Free; h.SendStream := nil;
    FreeAndNil(h);
  end;

  TriggerReqDone;

end;

procedure TwitterCli.GrabCookie(Sender: TObject; const Data: string; var Accept: Boolean);
begin
  FCookie := FCookie + Data + ';';
end;
Categories: Delphi stuff, Software Tags:

twitter library update

February 27th, 2011 No comments

Slightly modified my delphi twitter library to work with the latest ICS distribution and to remove the dependency of an altered OverbyteIcsHttpProt file.

Download
TwitterLib - 1211 downloads

Categories: Delphi stuff, Software Tags: