Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


[Help] AutoLoad CT on Startup (or button)

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Source
View previous topic :: View next topic  
Author Message
h4c0r-BG
Master Cheater
Reputation: 0

Joined: 29 Nov 2006
Posts: 449
Location: The yogurt country

PostPosted: Tue Oct 02, 2007 12:22 pm    Post subject: [Help] AutoLoad CT on Startup (or button) Reply with quote

I want to make my Cheat Engine... whenever it starts (on form create or whatever) to load a cheat table.

I've tryed:

Code:
LoadTable('C:\dsadadsad\table.CT',merge);


but it is not working ... and yeah it gives weird errors.


So what is the real=working code for that? o.O

_________________

Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 470

Joined: 09 May 2003
Posts: 25788
Location: The netherlands

PostPosted: Tue Oct 02, 2007 1:21 pm    Post subject: Reply with quote

have you declared and defined the merge boolean?
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.

Like my help? Join me on Patreon so i can keep helping
Back to top
View user's profile Send private message MSN Messenger
h4c0r-BG
Master Cheater
Reputation: 0

Joined: 29 Nov 2006
Posts: 449
Location: The yogurt country

PostPosted: Wed Oct 03, 2007 6:18 am    Post subject: Reply with quote

Dark Byte wrote:
have you declared and defined the merge boolean?


Thanks DB. Smile

Here is the working code (for me)

Code:
procedure TMainForm.Button5Click(Sender: TObject);
var merge: boolean;
    app: word;
    Extension: string;
resourcestring
  strUnknownExtension='Unknown extension';
begin
  merge:=false;
  if CheckIfSaved=false then exit;

//  OpenDialog1.InitialDir:=cheatenginedir;

//  if Opendialog1.Execute then
  begin
    Extension:=uppercase(extractfileext('C:\my.ct'));
    if (Extension<>'.PTR') and
       (Extension<>'.AMT') and
       (Extension<>'.GH') and
       (Extension<>'.CET') and
       (Extension<>'.CT2') and
       (Extension<>'.CT3') and
       (Extension<>'.CT') and
       (Extension<>'.EXE') then raise exception.create(strUnknownExtension);


    if ((numberofrecords>0) or (advancedoptions.numberofcodes>0)) and (Extension<>'.EXE') then app:=messagedlg('You wish to merge the current table with this table?',mtConfirmation,mbYesNoCancel,0);
    case app of
      mrCancel: exit;
      mrYes: merge:=true;
      mrNo: merge:=false;
    end;

    LoadTable('C:\my.ct',merge);
    reinterpretaddresses;

  end;

  if advancedoptions.codelist.Count>0 then
  begin
    advancedoptions.Position:=podesigned;
    advancedoptions.Left:=mainform.left-advancedoptions.Width;
    advancedoptions.Top:=mainform.Top+mainform.Height-advancedoptions.Height;

    if (advancedoptions.Left<0) or (advancedoptions.Top+advancedoptions.Height>screen.height) then
    begin
      advancedoptions.left:=0;
      advancedoptions.Top:=screen.Height-advancedoptions.Height;

    end;
    advancedoptions.show;
  end;

  Updatescreen;
  updatelist;
end;

_________________

Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Source All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites