View previous topic :: View next topic |
Author |
Message |
Shahryar Advanced Cheater Reputation: 0
Joined: 11 Jun 2011 Posts: 85
|
Posted: Sat Jun 11, 2011 4:27 pm Post subject: How run game's executable file from CE 6.1 trainer? |
|
|
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 |
|
|
Dark Byte Site Admin Reputation: 458
Joined: 09 May 2003 Posts: 25288 Location: The netherlands
|
Posted: Sat Jun 11, 2011 4:31 pm Post subject: |
|
|
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 |
|
|
Shahryar Advanced Cheater Reputation: 0
Joined: 11 Jun 2011 Posts: 85
|
Posted: Sat Jun 11, 2011 5:31 pm Post subject: |
|
|
thanks. its work correctly.
|
|
Back to top |
|
|
Geri Moderator Reputation: 111
Joined: 05 Feb 2010 Posts: 5636
|
Posted: Sat Jun 11, 2011 5:33 pm Post subject: |
|
|
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.
_________________
|
|
Back to top |
|
|
Shahryar Advanced Cheater Reputation: 0
Joined: 11 Jun 2011 Posts: 85
|
Posted: Sat Jun 11, 2011 5:45 pm Post subject: |
|
|
but all trainers that i created them have a button that launch game.
i thing it can be useful for trainer.
|
|
Back to top |
|
|
Geri Moderator Reputation: 111
Joined: 05 Feb 2010 Posts: 5636
|
Posted: Sat Jun 11, 2011 5:53 pm Post subject: |
|
|
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.
_________________
|
|
Back to top |
|
|
Shahryar Advanced Cheater Reputation: 0
Joined: 11 Jun 2011 Posts: 85
|
Posted: Sat Jun 11, 2011 6:03 pm Post subject: |
|
|
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 |
|
|
Shahryar Advanced Cheater Reputation: 0
Joined: 11 Jun 2011 Posts: 85
|
Posted: Mon Jun 13, 2011 9:29 am Post subject: |
|
|
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 |
|
|
Dark Byte Site Admin Reputation: 458
Joined: 09 May 2003 Posts: 25288 Location: The netherlands
|
Posted: Mon Jun 13, 2011 9:32 am Post subject: |
|
|
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 |
|
|
Shahryar Advanced Cheater Reputation: 0
Joined: 11 Jun 2011 Posts: 85
|
Posted: Mon Jun 13, 2011 9:43 am Post subject: |
|
|
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 |
|
|
Dark Byte Site Admin Reputation: 458
Joined: 09 May 2003 Posts: 25288 Location: The netherlands
|
Posted: Mon Jun 13, 2011 9:48 am Post subject: |
|
|
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 |
|
|
Shahryar Advanced Cheater Reputation: 0
Joined: 11 Jun 2011 Posts: 85
|
Posted: Mon Jun 13, 2011 9:56 am Post subject: |
|
|
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 |
|
|
Dark Byte Site Admin Reputation: 458
Joined: 09 May 2003 Posts: 25288 Location: The netherlands
|
Posted: Mon Jun 13, 2011 10:31 am Post subject: |
|
|
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 |
|
|
Shahryar Advanced Cheater Reputation: 0
Joined: 11 Jun 2011 Posts: 85
|
Posted: Mon Jun 13, 2011 1:44 pm Post subject: |
|
|
How i can run a exe file by io.popen function?
|
|
Back to top |
|
|
atom0s Moderator Reputation: 198
Joined: 25 Jan 2006 Posts: 8517 Location: 127.0.0.1
|
Posted: Mon Jun 13, 2011 3:47 pm Post subject: |
|
|
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 |
|
|
|