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 


Standalone can't read external file in same folder

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

Joined: 10 Dec 2011
Posts: 32

PostPosted: Tue Feb 07, 2017 11:05 am    Post subject: Standalone can't read external file in same folder Reply with quote

Hi.

I have my trainer reading a few settings from an external file, which I want the user to be able to change at will and see the setting updated on the trainer. The problem arises when compiling the standalone file where the trainer will not see the file in the same folder. This is because the standalone is only a self-extracting package which will be run from a temp folder.

How can I make it so that the trainer know the folder path from where it actually originated or any other solution that allows me to have both files in the same place without hard-coding a path and forcing users to use that path?

Thanks!


NOTE: The content of the files are settings which I want the user to be able to change easily with notepad. I know that I can save settings to Windows registry but I was trying to avoid going that route and having to code more functions to handle everything inside the trainer.
Back to top
View user's profile Send private message
usernotfound
Expert Cheater
Reputation: 0

Joined: 21 Feb 2016
Posts: 115

PostPosted: Tue Feb 07, 2017 11:12 am    Post subject: Reply with quote

If I'm not misunderstanding I believe this is what you are looking for

Code:
TrainerOrigin : A variable that contains the path of the trainer that launched cheat engine (Only set when launched as a trainer)
Back to top
View user's profile Send private message
ner0
Cheater
Reputation: 0

Joined: 10 Dec 2011
Posts: 32

PostPosted: Tue Feb 07, 2017 12:18 pm    Post subject: Reply with quote

Glare wrote:
If I'm not misunderstanding I believe this is what you are looking for

Code:
TrainerOrigin : A variable that contains the path of the trainer that launched cheat engine (Only set when launched as a trainer)


That is exactly what I was looking for. Thank you!
Didn't find anything when searching the forum the first time around, but after another try I did find a thread where this was mentioned as introduced in CE 6.2. I hate spamming the forum with questions that have already been answered. Sorry, forum masters.

Thanks again, Glare.
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 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