View previous topic :: View next topic |
Author |
Message |
OrangutanGaming How do I cheat? Reputation: 0
Joined: 14 May 2018 Posts: 4
|
Posted: Mon May 14, 2018 8:41 am Post subject: Auto activate script |
|
|
Hi, I'm quite new to CE, so I'm sorry if a lot of this is the complete opposite of what someone should do. I made an "Auto assemble script" that I want to run as soon as my computer runs so that when I run that process, it automatically executes it. I added "getAutoAttachList().add("process.exe")" to my Cheat table Lua script, and that seemed to work fine, however, I couldn't find a way to get the script to execute. I tried adding it to "function onOpenProcess(processid)" but that seemed to just give me an error when I copied the code from the "Auto assemble script." Is there a way to have a CT that runs when my computer starts, wait until a program runs, executes that script, and if it closes, will still execute it again when it's reran?
|
|
Back to top |
|
|
TheyCallMeTim13 Wiki Contributor Reputation: 50
Joined: 24 Feb 2017 Posts: 976 Location: Pluto
|
|
Back to top |
|
|
OrangutanGaming How do I cheat? Reputation: 0
Joined: 14 May 2018 Posts: 4
|
Posted: Mon May 14, 2018 10:38 am Post subject: |
|
|
I keep getting Quote: | attempt to index a nil value | if I put any code after Code: | getAutoAttachList().add("process.exe") |
|
|
Back to top |
|
|
TheyCallMeTim13 Wiki Contributor Reputation: 50
Joined: 24 Feb 2017 Posts: 976 Location: Pluto
|
Posted: Mon May 14, 2018 4:02 pm Post subject: |
|
|
Is that the full script, this works fine for me.
Code: | getAutoAttachList().add('Tutorial-i386.exe')
speak('I have the power!') |
What's the actual script and error.
_________________
|
|
Back to top |
|
|
Corroder Grandmaster Cheater Supreme Reputation: 75
Joined: 10 Apr 2015 Posts: 1667
|
Posted: Mon May 14, 2018 5:56 pm Post subject: |
|
|
OrangutanGaming
Quote: |
Is there a way to have a CT that runs when my computer starts |
1. To run an app or execute a file when computer start by DOS, usually make a file name with AUTOEXEC.BAT and place it on root directory
in Windows 7 :
To run a batch file at start up: start >> all programs >> right-click startup >> open >> right click batch file >> create shortcut >> drag shortcut to startup folder.
or see this :
https://grok.lsu.edu/article.aspx?articleid=13076
Example a bat file to open cheat engine forum when computer start :
Code: | @echo off
title Auto launch Cheat Engine Forum
start firefox https://forum.cheatengine.org
exit |
2. To auto execute CT table file when CE start, save CT Table as a lua file and place on CE folder > autorun folder
something like this :
Code: | function dostuff(sender)
-- your code here
sender.destroy()
end
originalOnOpenProcess=onOpenProcess;
function onOpenProcess(processid)
t=createTimer(nil)
t.OnTimer=dostuff
t.Interval=1
t.Enabled=true
if originalOnOpenProcess~=nil then
originalOnOpenProcess(processid)
end
end |
Note : when mix AA script with lua script, remember lua script is execute first.
or check this :
https://wiki.cheatengine.org/index.php?title=Tutorials:Lua:Setup_Auto_Attach
_________________
Stealing Code From Stolen Code...
And Admit It.. Hmmm....Typically LOL |
|
Back to top |
|
|
OrangutanGaming How do I cheat? Reputation: 0
Joined: 14 May 2018 Posts: 4
|
Posted: Tue May 15, 2018 1:10 am Post subject: |
|
|
Code: | aalist=getAutoAttachList();
stringlist_add(aalist,"process.exe");
function onOpenProcess(processId)
if getProcessIDFromProcessName("Tabletop Simulator.exe") == processId then
getAddressList().getMemoryRecordByDescription("Auto Assmble script").Active=true;
end
end |
Code: | getAutoAttachList().add("Tabletop Simulator.exe")
getAddressList().getMemoryRecordByDescription("Auto Assmble script").Active=true |
Both of those give me the error:
Quote: | Error:[string "aalist=getAutoAttachList();
..."]:6: attempt to index a nil value | or shows the first line of the 2nd code block as the source of the error. Just having Code: | getAutoAttachList().add("process.exe") | gives me no error though.
|
|
Back to top |
|
|
TheyCallMeTim13 Wiki Contributor Reputation: 50
Joined: 24 Feb 2017 Posts: 976 Location: Pluto
|
Posted: Tue May 15, 2018 1:54 am Post subject: |
|
|
The error is telling you you're indexing a nil value (same as "nil.someIndex") on line 6. Check for "nil" with the memory record.
Code: | getAutoAttachList().add("process.exe")
function onOpenProcess(processId)
if getProcessIDFromProcessName("Tabletop Simulator.exe") == processId then
aas = getAddressList().getMemoryRecordByDescription("Auto Assmble script")
if aas ~= nil then
aas.Active=true
end
end
end |
_________________
|
|
Back to top |
|
|
OrangutanGaming How do I cheat? Reputation: 0
Joined: 14 May 2018 Posts: 4
|
Posted: Tue May 15, 2018 10:53 am Post subject: |
|
|
Code: | getAutoAttachList().add("Tabletop Simulator.exe");
function onOpenProcess(processId)
if getProcessIDFromProcessName("Tabletop Simulator.exe") == processId then
getAddressList().getMemoryRecordByDescription("Auto Assemble script").Active=true
end
end |
This code is working, made a typo in "assemble" and still can't find a way to rename the script, but with the specific script, it won't activate when the game is initially ran with this setup, but if I start the script while in a game, it will activate fine. Is there a way to check it's activate status accurately, so check if it's active, and if not, wait 5 secs, then try to activate it again? I found the sleep function, but using Code: | getAddressList().getMemoryRecordByDescription("Auto Assemble script").Active | didn't work
|
|
Back to top |
|
|
|