View previous topic :: View next topic |
Author |
Message |
AJUniverse How do I cheat? Reputation: 0
Joined: 14 Jun 2022 Posts: 2
|
Posted: Tue Jun 14, 2022 5:13 pm Post subject: Creating a batch file that runs a game + Cheat Engine |
|
|
Hi, I'm trying to create a batch file that will run my game and 15 seconds later, open Cheat Engine (minimized if possible) along with a tweak/tweaks of my choices. I don't know where to begin but appreciate any help.
|
|
Back to top |
|
|
Corroder Grandmaster Cheater Supreme Reputation: 75
Joined: 10 Apr 2015 Posts: 1667
|
Posted: Tue Jun 14, 2022 8:29 pm Post subject: |
|
|
I don't know if this is a right section to post this, anyhow this is an example as the topic said. at least it work.
Code: | echo off
start /b "" "C:\Windows\system32\notepad.exe"
timeout /t 15
start /min "" "C:\Program Files\Cheat Engine 7.4\Cheat Engine.exe"
exit |
use notepad to write the script and save it as a batch file
_________________
Stealing Code From Stolen Code...
And Admit It.. Hmmm....Typically LOL |
|
Back to top |
|
|
gibberishh Cheater Reputation: 1
Joined: 30 Aug 2021 Posts: 37
|
Posted: Wed Jun 15, 2022 4:30 am Post subject: |
|
|
Corroder wrote: | I don't know if this is a right section to post this, anyhow this is an example as the topic said. at least it work.
Code: | echo off
start /b "" "C:\Windows\system32\notepad.exe"
timeout /t 15
start /min "" "C:\Program Files\Cheat Engine 7.4\Cheat Engine.exe"
exit |
use notepad to write the script and save it as a batch file |
In the fourth line, you might be better off using this, depending on what you want to do:
Code: | start /min "" "C:\Games\My Game\Cheat Table.ct" |
Use appropriate paths. This will open the cheat table instead of just opening CE.
Btw, I used to use batch files to open the game and associated cheat table. Now I simply edit the table Lua script to launch games.
Code: | local proc = "Game.exe"
function Launch()
if not getProcessIDFromProcessName(proc) then
if io.popen("if exist "..proc.." (echo 1)"):read() then -- looks for game exe in same folder
shellExecute(proc) -- launches game
sleep(1000)
else
messageDialog(proc.." is not available in this folder. Open the table from the same folder as the game or start the game first.",mtError,mbOK)
return
end
end
local ticks = 0
local maxTicks = 5000 -- keeps waiting until the process is available or so many milliseconds have elapsed
local tick = 100
while process ~= proc and ticks < maxTicks do
openProcess(proc)
sleep(tick)
ticks = ticks + tick
end
if process ~= proc then
messageDialog(proc.." is not running. Game not attached.",mtError,mbOK)
return
else
getAddressList().getMemoryRecord(0).Active = true -- not necessary, but this activates the first record in my table -- you can activate other records if you wish, or delete this line entirely
end
end
Launch() |
My Start Menu shortcut to the game points to the cheat table instead of the game exe.
_________________
It's not cheating. It's playing by my rules. |
|
Back to top |
|
|
Corroder Grandmaster Cheater Supreme Reputation: 75
Joined: 10 Apr 2015 Posts: 1667
|
Posted: Wed Jun 15, 2022 5:16 am Post subject: |
|
|
gibberishh wrote: |
...
My Start Menu shortcut to the game points to the cheat table instead of the game exe. |
Yes, of course I will do the same thing if I am using Lua script. Btw, the first topic ask for a batch file not a Lua script or Lua function.
_________________
Stealing Code From Stolen Code...
And Admit It.. Hmmm....Typically LOL |
|
Back to top |
|
|
gibberishh Cheater Reputation: 1
Joined: 30 Aug 2021 Posts: 37
|
Posted: Wed Jun 15, 2022 10:06 am Post subject: |
|
|
Corroder wrote: |
...
Yes, of course I will do the same thing if I am using Lua script. Btw, the first topic ask for a batch file not a Lua script or Lua function. |
True, but they haven't specified why they want a batch script. The 15-second delay leads me to conclude (maybe incorrectly) that they are simply trying to open a game and cheat table in one click -- which was my own reason for using batch files once upon a time.
The first part of my reply does give a batch script. The Lua script is only presented as an alternative. The Lua script also addresses the following:
AJUniverse wrote: | along with a tweak/tweaks of my choices | which is much more difficult to achieve through a batch file.
_________________
It's not cheating. It's playing by my rules. |
|
Back to top |
|
|
AJUniverse How do I cheat? Reputation: 0
Joined: 14 Jun 2022 Posts: 2
|
Posted: Wed Jun 15, 2022 5:55 pm Post subject: |
|
|
gibberishh wrote: | Corroder wrote: |
...
Yes, of course I will do the same thing if I am using Lua script. Btw, the first topic ask for a batch file not a Lua script or Lua function. |
True, but they haven't specified why they want a batch script. The 15-second delay leads me to conclude (maybe incorrectly) that they are simply trying to open a game and cheat table in one click -- which was my own reason for using batch files once upon a time.
The first part of my reply does give a batch script. The Lua script is only presented as an alternative. The Lua script also addresses the following:
AJUniverse wrote: | along with a tweak/tweaks of my choices | which is much more difficult to achieve through a batch file. |
Reason for the delay in cheat engine running is because the game has a 5 second splash screen before the .exe is running.
Can a Lua script be configured to open a game -> open cheat engine 13 seconds after with 3 different ct files active?
|
|
Back to top |
|
|
Corroder Grandmaster Cheater Supreme Reputation: 75
Joined: 10 Apr 2015 Posts: 1667
|
Posted: Wed Jun 15, 2022 11:04 pm Post subject: |
|
|
AJUniverse wrote: |
Can a Lua script be configured to open a game -> open cheat engine 13 seconds after with 3 different ct files active? |
Just an example:
Code: | app = "C:\\windows\\system32\\notepad.exe"
ct1 = "F:\\DrawArrow.CT"
ct2 = "F:\\MDIForm2.CT"
ct3 = "F:\\FloodFill_01.CT"
function launch()
shellExecute(app)
sleep(13000) --- 13 seconds
openProcess('notepad.exe')
local pid = pid or GetOpenedProcessID()
if pid and pid~=0 then
shellExecute(ct1) -- open CT file 1
sleep(1000)
shellExecute(ct2) -- open T file 2
sleep(1000)
shellExecute(ct3) -- open CT file 3
sleep(1000)
end
end
launch() |
I have no idea. anyhow if run manually, install 3 instances Cheat Engine in different folder. Something like : CE1, CE2, CE3 etc
_________________
Stealing Code From Stolen Code...
And Admit It.. Hmmm....Typically LOL |
|
Back to top |
|
|
gibberishh Cheater Reputation: 1
Joined: 30 Aug 2021 Posts: 37
|
|
Back to top |
|
|
|