| View previous topic :: View next topic |
| Author |
Message |
Corroder Grandmaster Cheater Supreme
Reputation: 75
Joined: 10 Apr 2015 Posts: 1668
|
Posted: Tue Sep 29, 2015 8:57 pm Post subject: shellExecute(local filename) not work |
|
|
I made a CE Trainer with a button function click to execute a local file.
| Code: |
function CEButton3Click(sender)
shellExecute("flename.exe")
end
|
The trainer is work fine when click a button to run filename.exe use the function above, with filename.exe placed in same diretory/folder (path) with the trainer.
But when trainer has save as a exe file (stand alone trainer), when click a button, it won't run filename.exe anymore.
Do i need use sheelExecute(path to file) or dofile() or io.popen() or is it able we add a local exe file and run it from/as stream file?
Hope some experts should tell or give an examples to fix the problem.
Is there any lua script (pure lua and no need "require") as a browser function to locating a local file we want to open, except luaBrowser.lua ?
Regards
|
|
| Back to top |
|
 |
Dark Byte Site Admin
Reputation: 471
Joined: 09 May 2003 Posts: 25846 Location: The netherlands
|
Posted: Tue Sep 29, 2015 9:42 pm Post subject: |
|
|
You need to provide shellExecute with the full path
If the filename is next to the trainer's .exe use TrainerOrigin else use getCheatEngineDir() to get the path to the extracted temp folder
e.g:
| Code: |
if TrainerOrigin~=nil then
path=TrainerOrigin
else
path=getCheatEngineDir()
end
--add dir seperator if needed
if string.sub(path,#path, #path)~="\\" then
path=path.."\\"
end
shellExecute(path.."filename.exe")
|
Of course, if the filename.exe has been added using the exe generator add file(s) then use getCheatEngineDir() only
_________________
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 |
|
 |
Corroder Grandmaster Cheater Supreme
Reputation: 75
Joined: 10 Apr 2015 Posts: 1668
|
Posted: Wed Sep 30, 2015 9:21 am Post subject: |
|
|
Thank you Dark Byte, I understood and implemented the method as your instructions. Now the trainer working properly..
Regards
|
|
| Back to top |
|
 |
|