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 


How run game's executable file from CE 6.1 trainer?
Goto page Previous  1, 2, 3
 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting
View previous topic :: View next topic  
Author Message
Shahryar
Advanced Cheater
Reputation: 0

Joined: 11 Jun 2011
Posts: 85

PostPosted: Tue Jun 14, 2011 1:41 pm    Post subject: Reply with quote

Dark Byte wrote:
wiccaan:
remember that the name of the opendialog object will be formname+opendialog (check if it's nil or not)

and then you can show it using openDialog_execute(formname_dialogname)

iron soft:
Try:
local f = io.popen( filetolaunch, "r" );
or
local f = io.popen( '"'..filetolaunch..'"', "r" );


filetolaunch's path is
Code:
C:\some_folder\some_file.exe

while should be
Code:
C:\\some_folder\\some_file.exe

Now how can I convert "\" to "\\"?
Back to top
View user's profile Send private message Send e-mail Visit poster's website
atom0s
Moderator
Reputation: 198

Joined: 25 Jan 2006
Posts: 8516
Location: 127.0.0.1

PostPosted: Tue Jun 14, 2011 2:00 pm    Post subject: Reply with quote

You can launch it as the current path it is using the second method DB told you.

Code:
local filetolaunch = [[C:\test\winmine.exe]]; -- literal string as example
local f = io.popen( '"'..filetolaunch..'"', "r" );

_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
Shahryar
Advanced Cheater
Reputation: 0

Joined: 11 Jun 2011
Posts: 85

PostPosted: Tue Jun 14, 2011 2:20 pm    Post subject: Reply with quote

Wiccaan wrote:
You can launch it as the current path it is using the second method DB told you.

Code:
local filetolaunch = [[C:\test\winmine.exe]]; -- literal string as example
local f = io.popen( '"'..filetolaunch..'"', "r" );


Worked.
how close cmd window.

Another question:
Now How to click again on the Launch button, again does not open OpenDialog window and exe file be is run?
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Dark Byte
Site Admin
Reputation: 457

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

PostPosted: Tue Jun 14, 2011 2:30 pm    Post subject: Reply with quote

wiccaan:
instead of
Code:

local dlg = openDialog_execute( "frmExampleTrainer_odExampleTrainer" ); 

do
Code:

openDialog_execute( frmExampleTrainer_odExampleTrainer ); 

It requires an object pointer, not a string

iron soft:
no idea on how to close it. I still don't know why shellExecute won't work

and try storing the location to a file in a known location, or try playing with the registry command line functions

_________________
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
Shahryar
Advanced Cheater
Reputation: 0

Joined: 11 Jun 2011
Posts: 85

PostPosted: Tue Jun 14, 2011 2:38 pm    Post subject: Reply with quote

Dark Byte wrote:
wiccaan:
instead of
Code:

local dlg = openDialog_execute( "frmExampleTrainer_odExampleTrainer" ); 

do
Code:

openDialog_execute( frmExampleTrainer_odExampleTrainer ); 

It requires an object pointer, not a string

iron soft:
no idea on how to close it. I still don't know why shellExecute won't work

and try storing the location to a file in a known location, or try playing with the registry command line functions


Excuse me but how "try playing with the registry command line functions"?
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Cain142
How do I cheat?
Reputation: 0

Joined: 16 Jun 2011
Posts: 1

PostPosted: Thu Jun 16, 2011 2:27 pm    Post subject: Reply with quote

Dark Byte wrote:
if you know the location of the game's exe you can use shellExecute:

example:
Code:

shellExecute([[c:\program files\blabla\mygame\mygamesexe.exe]]);


just put it under the onClick event handler of a button


How would i do if i dont know the path to the installed program?
Lets say i make a trainer and release it and the user installed to a custom path, how would i make a launcher button that will launch the game if trainer is put in same directory as the game client?
I tried shellexecute and only had the launcher.exe and no path but that didnt work to well.
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 457

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

PostPosted: Thu Jun 16, 2011 3:52 pm    Post subject: Reply with quote

try reading what icon soft has said (using an open dialog window for the user to pick)

Alternatively, you could do a command line command to fetch the result of the registry (e.g perhaps the game's exe path has been stored in the registry somewhere)

_________________
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
pilgrams
Expert Cheater
Reputation: 0

Joined: 25 Apr 2011
Posts: 203

PostPosted: Fri Jun 17, 2011 8:51 pm    Post subject: Reply with quote

I can't get my trainer to work, i try to open it and it does nothing. So what can you do to get it to do what it suppose to do?
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 457

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

PostPosted: Fri Jun 17, 2011 9:55 pm    Post subject: Reply with quote

does your script contain the code to show a form ?
_________________
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
pilgrams
Expert Cheater
Reputation: 0

Joined: 25 Apr 2011
Posts: 203

PostPosted: Fri Jun 17, 2011 10:50 pm    Post subject: Reply with quote

Dark Byte wrote:
does your script contain the code to show a form ?


Yeah, I can't get it to work and I can't even get a cheat table to work as a trainer. I can make them, then when i am finished I make the trainer, then I try to open the trainer i made and it does nothing. It won't open my trainer for some reason.
Back to top
View user's profile Send private message
Wheel Of Fate
Advanced Cheater
Reputation: 0

Joined: 01 Oct 2010
Posts: 75

PostPosted: Tue Jun 21, 2011 7:11 am    Post subject: Reply with quote

Code:
os.execute("game.exe")


Try This But The Trainer Must Be In The Same Directory With The Game
This Will Lunch The Game Without Browse

If This Wrong Please Someone Correct Me I Found This On Another Forum?
Back to top
View user's profile Send private message AIM Address
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting All times are GMT - 6 Hours
Goto page Previous  1, 2, 3
Page 3 of 3

 
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