Ir para conteúdo
Sistema de Servidores de Jogos ×
  • Quem está por aqui   0 membros estão online

    • Nenhum usuário registrado visualizando esta página.

Posts Recomendados

Bom Gente a Minha ideia é criar um limpa logs automatico para GC, mais como assim altomatico? tipow apenas na primeira vez que você executalo ele vai gerar uma ini pra guardar as informações do diretorio do seu grand chase ai sempre que voce abrir ele ja vai automatico e nao precisa vc procurar. So que contem tabem a função de executar o launcher do gc apos apagar os logs.. porem essa função so funciona se eu procurar novamente o diretorio do Arquivo ou seja somente se eu abrir a janela de busca e selecionalo denovo..

 

vou postar o codigo abaixo e down do projeto pra vcs verem o problema me deem uma luz pf :)

 

unit Unit1;

 

interface

 

uses

Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,

Dialogs, StdCtrls, XPMan, IniFiles, ExtCtrls, ExtDlgs, ShellApi;

 

type

TForm1 = class(TForm)

Label1: TLabel;

XPManifest1: TXPManifest;

OpenDialog1: TOpenDialog;

GroupBox1: TGroupBox;

Edit1: TEdit;

Button3: TButton;

GroupBox2: TGroupBox;

Button1: TButton;

Button2: TButton;

GroupBox3: TGroupBox;

Label2: TLabel;

Label3: TLabel;

Label4: TLabel;

Label5: TLabel;

Timer1: TTimer;

Label6: TLabel;

Timer2: TTimer;

Label7: TLabel;

procedure Button1Click(Sender: TObject);

procedure Button3Click(Sender: TObject);

procedure FormCreate(Sender: TObject);

procedure Button2Click(Sender: TObject);

procedure Timer1Timer(Sender: TObject);

procedure Timer2Timer(Sender: TObject);

 

private

{ Private declarations }

public

{ Public declarations }

end;

 

var

Form1: TForm1;

arq: TIniFile;

SearchRec : TSearchRec;

num: Integer;

 

implementation

 

 

 

{$R *.dfm}

 

 

procedure TForm1.Button1Click(Sender: TObject);

begin

if

Edit1.Enabled= False then

begin

Edit1.Enabled:= True ;

Button3.Enabled:= True ;

end

else

Begin

if Edit1.Enabled= True then

Begin

Edit1.Enabled:= False;

Begin

arq := TiniFile.create(ExtractFilePath(ParamStr(0)) + 'Config.ini') ;

Arq.WriteString('Config', 'Diretorio', Edit1.text);

Arq.free;

End;

Button3.Enabled:= False ;

End;

end;

 

end;

 

procedure TForm1.Button3Click(Sender: TObject);

begin

opendialog1.execute;

Edit1.Text :=ExtractFilePath(opendialog1.FileName);

end;

 

procedure TForm1.FormCreate(Sender: TObject);

begin

arq:= TIniFile.Create(ExtractFilePath(ParamStr(0)) + 'Config.ini');

num := arq.Readinteger('Config', 'Auto', 0);

if FileExists(ExtractFilePath(ParamStr(0)) + 'Config.ini') then

begin

arq:= TIniFile.Create(ExtractFilePath(ParamStr(0)) + 'Config.ini');

Edit1.Text := arq.ReadString('Config', 'Diretorio', '');

end

else

begin

arq := TIniFile.Create(ExtractFilePath(ParamStr(0)) + 'Config.ini');

arq.WriteString('Config', 'Diretorio', 'C:\Level Up! Games\GrandChase\');

Arq.WriteInteger('Config', 'Auto', 0);

arq.UpdateFile;

Edit1.Text := arq.ReadString('Config', 'Diretorio', '');

 

end;

 

end;

 

procedure TForm1.Button2Click(Sender: TObject);

var Txt : TextFile;

begin

if FileExists(Edit1.Text+'GrandChase.exe') And Edit1.Enabled= False then

Begin

Assignfile (Txt,Edit1.Text+'clientfilelist.Txt');

ReWrite (Txt); WriteLn (Txt,'');

CloseFile (Txt);

Assignfile (Txt,Edit1.Text+'crashlog.Txt');

ReWrite (Txt); WriteLn (Txt,'');

CloseFile (Txt);

Assignfile (Txt,Edit1.Text+'hardwareinfo.Txt');

ReWrite (Txt); WriteLn (Txt,'');

CloseFile (Txt);

Assignfile (Txt,Edit1.Text+'log.Txt');

ReWrite (Txt); WriteLn (Txt,'');

CloseFile (Txt);

Assignfile (Txt,Edit1.Text+'stateloadinglog.Txt');

ReWrite (Txt); WriteLn (Txt,'');

CloseFile (Txt);

Assignfile (Txt,Edit1.Text+'crashlog.log');

ReWrite (Txt); WriteLn (Txt,'');

CloseFile (Txt);

Assignfile (Txt,Edit1.Text+'log.log');

ReWrite (Txt); WriteLn (Txt,'');

CloseFile (Txt);

Assignfile (Txt,Edit1.Text+'log.html');

ReWrite (Txt); WriteLn (Txt,'');

CloseFile (Txt);

Assignfile (Txt,Edit1.Text+'pairplay.dat');

ReWrite (Txt); WriteLn (Txt,'');

CloseFile (Txt);

Assignfile (Txt,Edit1.Text+'crashdata.dat');

ReWrite (Txt); WriteLn (Txt,'');

CloseFile (Txt);

Assignfile (Txt,Edit1.Text+'log.htm');

ReWrite (Txt); WriteLn (Txt,'');

CloseFile (Txt);

Assignfile (Txt,Edit1.Text+'resfeedback.dat');

ReWrite (Txt); WriteLn (Txt,'');

CloseFile (Txt);

arq := TiniFile.create(ExtractFilePath(ParamStr(0)) + 'Config.ini') ;

Arq.WriteInteger('Config', 'Auto', 1);

arq.UpdateFile;

Arq.free;

Showmessage('Logs Deletados. Click Ok Para Iniciar o Grand Chase!');

ShellExecute(Handle, 'open', 'GrandChase.exe', nil, nil, SW_SHOWNORMAL) ;

application.terminate ;

End;

 

end;

 

procedure TForm1.Timer1Timer(Sender: TObject);

begin

if (FileExists(Edit1.Text+'GrandChase.exe')) and (Edit1.Enabled= False) then

 

Begin

with label6 do

begin

if (visible = false) then

visible := true

else

visible := false;

application.ProcessMessages;

end;

 

end

else

Label6.Visible := false;

 

end;

 

procedure TForm1.Timer2Timer(Sender: TObject);

begin

if (FileExists(Edit1.Text+'GrandChase.exe')) and (Edit1.enabled= False) then

Button2.enabled:= True

else

Button2.enabled:= False;

if not FileExists(Edit1.Text+'GrandChase.exe') then

begin

arq := TiniFile.create(ExtractFilePath(ParamStr(0)) + 'Config.ini') ;

Arq.WriteInteger('Config', 'Auto', 0);

arq.UpdateFile;

end;

if (FileExists(Edit1.Text+'GrandChase.exe')) and (num=1) then

begin

//Form1.hide;

//Form2.show

end

else

begin

If Edit1.enabled = False then

Timer1.Enabled:= True

else

label6.Visible:= False;

end;

 

end;

 

 

end.

 

 

Download do projeto

É necessário se cadastrar para acessar o conteúdo.

Scan do Mesmo:

É necessário se cadastrar para acessar o conteúdo.

Link para o comentário
https://www.webcheats.com.br/topic/1610702-ajuda-projeto-em-delphi/
Compartilhar em outros sites

Nao tendi sua duvida Ainda mais vo baixar seu projeto e intender mais ou menos oque voce quer!

vo Reler novamante!

Standard Trading - Shops - 🌟🔥 EXOSTA 🔥🌟 THE #1 TRADING & SERVICE CENTER  💎 The Magic Find Academy, my new Discord Server 💎 - Forum - Path of Exile
Link para o comentário
https://www.webcheats.com.br/topic/1610702-ajuda-projeto-em-delphi/#findComment-6929860
Compartilhar em outros sites

Nao tendi sua duvida Ainda mais vo baixar seu projeto e intender mais ou menos oque voce quer!

vo Reler novamante!

 

é simples que um programa pra apagar logs e executar o launcher do jogo.. ele pega esses endereçoes do launcher e logs por uma INI onde é salva as escolhar do usuario.. so que o programa apenas executa o launcher apenas quando o usuario clica no botao que ativa a funçao do opendialog no delphi abrindo a opção de procurar o arquivo ele somente cumpre 100% do codigo se executado dinovo a opção do opendialog.

Link para o comentário
https://www.webcheats.com.br/topic/1610702-ajuda-projeto-em-delphi/#findComment-6932960
Compartilhar em outros sites

Este tópico está impedido de receber novos posts.
×
×
  • Criar Novo...

Informação Importante

Nós fazemos uso de cookies no seu dispositivo para ajudar a tornar este site melhor. Você pode ajustar suas configurações de cookies , caso contrário, vamos supor que você está bem para continuar.