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 1, 2, 3  Next
 
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: Sat Jun 11, 2011 4:27 pm    Post subject: How run game's executable file from CE 6.1 trainer? Reply with quote

how i can make a Launch button for my trainers with CE 6.1 trainer maker that run game's executable file and how i can show opendialog.
i don't know Script. Please help me.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Dark Byte
Site Admin
Reputation: 458

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

PostPosted: Sat Jun 11, 2011 4:31 pm    Post subject: Reply with quote

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

_________________
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: Sat Jun 11, 2011 5:31 pm    Post subject: Reply with quote

thanks. its work correctly. Very Happy
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Geri
Moderator
Reputation: 111

Joined: 05 Feb 2010
Posts: 5636

PostPosted: Sat Jun 11, 2011 5:33 pm    Post subject: Reply with quote

I am not sure if you know it, but you do not have to launch the game with the trainer. Just start the trainer and the game and the trainer will find the process, regardless which program was started first and where are they located.
_________________
My trainers can be found here: http://www.szemelyesintegracio.hu/cheats

If you are interested in any of my crappy articles/tutorials about CE and game hacking, you can find them here:
http://www.szemelyesintegracio.hu/cheats/41-game-hacking-articles

Don't request cheats or updates.
Back to top
View user's profile Send private message
Shahryar
Advanced Cheater
Reputation: 0

Joined: 11 Jun 2011
Posts: 85

PostPosted: Sat Jun 11, 2011 5:45 pm    Post subject: Reply with quote

but all trainers that i created them have a button that launch game.
i thing it can be useful for trainer.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Geri
Moderator
Reputation: 111

Joined: 05 Feb 2010
Posts: 5636

PostPosted: Sat Jun 11, 2011 5:53 pm    Post subject: Reply with quote

Yes I know it is there by default and it may be useful if someone want to use it, I just mentioned that it is not neccessary, just an extra feature. The trainer will work without launch button too. It is up to you that you want to add it or not.
_________________
My trainers can be found here: http://www.szemelyesintegracio.hu/cheats

If you are interested in any of my crappy articles/tutorials about CE and game hacking, you can find them here:
http://www.szemelyesintegracio.hu/cheats/41-game-hacking-articles

Don't request cheats or updates.
Back to top
View user's profile Send private message
Shahryar
Advanced Cheater
Reputation: 0

Joined: 11 Jun 2011
Posts: 85

PostPosted: Sat Jun 11, 2011 6:03 pm    Post subject: Reply with quote

I know that the trainer will work without launch button but if a trainer have a launch button not need first launch trainer and then launch game in other location.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Shahryar
Advanced Cheater
Reputation: 0

Joined: 11 Jun 2011
Posts: 85

PostPosted: Mon Jun 13, 2011 9:29 am    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


This code worked for some game that install in my system but some game after launched by this code, became crashed such as just cause 2. is there another code for launch game.
Please help me again.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Dark Byte
Site Admin
Reputation: 458

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

PostPosted: Mon Jun 13, 2011 9:32 am    Post subject: Reply with quote

Check the shortcut properties on your desktop or start menu and see what exactly it sets (working dir, parameters, etc...)


shellExecute's full parameter list:
Code:

shellExecute(command, parameters OPTIONAL, folder OPTIONAL, showcommand OPTIONAL)

_________________
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: Mon Jun 13, 2011 9:43 am    Post subject: Reply with quote

Dark Byte wrote:
Check the shortcut properties on your desktop or start menu and see what exactly it sets (working dir, parameters, etc...)


shellExecute's full parameter list:
Code:

shellExecute(command, parameters OPTIONAL, folder OPTIONAL, showcommand OPTIONAL)


exactly set
Code:
"C:\Program Files\Just Cause 2\JustCause2.exe"

and it haven't parameters and etc. i don't know why the game became crashed.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Dark Byte
Site Admin
Reputation: 458

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

PostPosted: Mon Jun 13, 2011 9:48 am    Post subject: Reply with quote

if you press windowskey+r and then type in "C:\Program Files\Just Cause 2\JustCause2.exe"
Does it run then?

_________________
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: Mon Jun 13, 2011 9:56 am    Post subject: Reply with quote

Dark Byte wrote:
if you press windowskey+r and then type in "C:\Program Files\Just Cause 2\JustCause2.exe"
Does it run then?


yes.
meantime i used this code in my trainer.
Code:
function LaunchClick()
filetolaunch=openDialog_execute(Trainer_OD)
if filetolaunch~='' then
shellExecute(filetolaunch);
end
end

whats problem?
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Dark Byte
Site Admin
Reputation: 458

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

PostPosted: Mon Jun 13, 2011 10:31 am    Post subject: Reply with quote

try
shellExecute('"'..filetolaunch..'"')

_________________
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: Mon Jun 13, 2011 1:44 pm    Post subject: Reply with quote

How i can run a exe file by io.popen function?
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: 8517
Location: 127.0.0.1

PostPosted: Mon Jun 13, 2011 3:47 pm    Post subject: Reply with quote

IRON SOFT wrote:
How i can run a exe file by io.popen function?


io.popen takes two params:
1.) File to launch.
2.) Access flags.

For example if you want to read from the launched process:
local filehandle = io.popen( "C:\\somefolder\\someapp.exe", "r" );

_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
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 1, 2, 3  Next
Page 1 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