Janilabo

Untitled

Sep 12th, 2012
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pascal 0.73 KB | None | 0 0
  1. {$DEFINE SW}
  2.  
  3. {$I MSSL\MSSL.scar}
  4.  
  5. var
  6.   x, y: Integer;
  7.  
  8. function SW_GetName2: string;
  9. var
  10.   x: Integer;
  11.   b: TBox;
  12.   p: TPointArray;
  13.   s: string;
  14. begin
  15.   if FindColorEx(p, 62208, 154, 180, 209, 192) then
  16.   begin
  17.     b := TPABounds(p);
  18.     for x := (b.X1 - 2) to 209 do
  19.     begin
  20.       s := MSSL_StrTrimEnd(GetTextAtEx(x, 182, 0, MSSL_MM.st[SW_MMS].font[SW_MainFont].obj, False, False, 0, 0, 62208, 10, True, tr_AllChars));
  21.       if (PregMatch('/[a-zA-Z_]{1,10}/', s) = s) then
  22.         if (Length(s) > Length(Result)) then
  23.           Result := s;
  24.     end;
  25.   end;
  26. end;
  27.  
  28. begin
  29.   MSSL_Setup;                        
  30.   SW_Client.Activate;                
  31.   WriteLn('Your name: ' + SW_GetName2);  
  32.   MSSL_Unsetup;
  33. end.
Advertisement
Add Comment
Please, Sign In to add comment