View Single Post
  #3  
Old 27-05-2019, 19:50
Cesar82's Avatar
Cesar82 Cesar82 is offline
Registered User
 
Join Date: May 2011
Location: Brazil
Posts: 1,073
Thanks: 1,814
Thanked 2,302 Times in 786 Posts
Cesar82 is on a distinguished road
Quote:
Originally Posted by gatosky1620 View Post
how i do to add the constant "username" in the [IniFileInfo]
try
Open script and edit this line (Insert text in red color and delete blue color part)

Code:
function DecodeINI(Line: String): TIniFileInfo;
var
  TmpStr: String;
begin
  TmpStr := Line
  if Copy(TmpStr, Length(TmpStr), 1) <> ';' then
    TmpStr := TmpStr + ';';
  //.....
  if Pos('Value:', TmpStr) <> 0 then begin
    Result.Value := Copy(TmpStr, Pos('Value:', TmpStr) + Length('Value:'), Length(TmpStr));
    Result.Value := ExpandConstant(Trim(Copy(Result.Value, 0, Pos(';', Result.Value) - 1))) + '|';
    StringChange(Result.Value, ' ', '');
    Delete(TmpStr, 1, Pos(';', TmpStr));
    if Pos(LowerCase(ActLangShort + '='), LowerCase(Result.Value)) > 0 then begin
      Result.Value := Result.Value + '|';
      Result.Value := Copy(Result.Value, Pos(LowerCase(ActLangShort + '='), LowerCase(Result.Value)) + Length(ActLangShort + '='), Length(Result.Value));
      Result.Value := Trim(Copy(Result.Value, 0, Pos('|', Result.Value) - 1));
    end else
      if Pos('=', Result.Value) > 0 then
        Result.Value := TranslatorINI(ActLangShort);
  end else
    Result.Value := TranslatorINI(ActLangShort);
  if Pos('Create:', TmpStr) <> 0 then begin
use:
Code:
SetIniFile2={app}\steam_emu.ini; Section: Settings; Key: UserName; Value: {username}
I did not test, but I think it works.

Last edited by Cesar82; 27-05-2019 at 20:05.
Reply With Quote
The Following User Says Thank You to Cesar82 For This Useful Post:
Simorq (29-07-2019)