<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.cheatengine.org/index.php?action=history&amp;feed=atom&amp;title=Tutorials%3ALua%3ASetup_Auto_Attach</id>
	<title>Tutorials:Lua:Setup Auto Attach - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.cheatengine.org/index.php?action=history&amp;feed=atom&amp;title=Tutorials%3ALua%3ASetup_Auto_Attach"/>
	<link rel="alternate" type="text/html" href="https://wiki.cheatengine.org/index.php?title=Tutorials:Lua:Setup_Auto_Attach&amp;action=history"/>
	<updated>2026-04-14T18:59:00Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.32.0</generator>
	<entry>
		<id>https://wiki.cheatengine.org/index.php?title=Tutorials:Lua:Setup_Auto_Attach&amp;diff=5767&amp;oldid=prev</id>
		<title>FreeER at 01:34, 6 February 2018</title>
		<link rel="alternate" type="text/html" href="https://wiki.cheatengine.org/index.php?title=Tutorials:Lua:Setup_Auto_Attach&amp;diff=5767&amp;oldid=prev"/>
		<updated>2018-02-06T01:34:53Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revision as of 01:34, 6 February 2018&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l12&quot; &gt;Line 12:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 12:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;'''On the Cheat Engine main form press ''Ctrl+Alt+L''''' to open the cheat table Lua script form.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;'''On the Cheat Engine main form press ''Ctrl+Alt+L''''' to open the cheat table Lua script form.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Now &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Let&lt;/del&gt;'s add the Lua script &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;for the &lt;/del&gt;auto attach to process timer&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;.&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Now &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;let&lt;/ins&gt;'s add the Lua script &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;to &lt;/ins&gt;auto attach to &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;the &lt;/ins&gt;process&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt; &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;pre&amp;gt;getAutoAttachList().add(&amp;quot;Tutorial-i386.exe&amp;quot;)&amp;lt;/pre&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt; &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;yep, that's probably all you need, it's what Cheat Engine generates for the trainers it makes. However, if you need more control for some reason, you can do it yourself with a &lt;/ins&gt;timer &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;and '''openProcess'''&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt; &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;!-- &amp;lt;pre&amp;gt;PROCESS_NAME = 'Tutorial-i386.exe'&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;!-- &amp;lt;pre&amp;gt;PROCESS_NAME = 'Tutorial-i386.exe'&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;--------&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;--------&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;-------- Auto Attach&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;-------- Auto Attach&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;--------&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;--------&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;local autoAttachTimer = nil&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;local autoAttachTimer = nil &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;---- variable to hold timer object&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;local autoAttachTimerInterval = 1000 ---- Timer intervals are in milliseconds&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;local autoAttachTimerInterval = 1000 ---- Timer intervals are in milliseconds&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;local autoAttachTimerTicks = 0&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;local autoAttachTimerTicks = 0 &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;---- variable to count number of times the timer has run&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;local autoAttachTimerTickMax = 5000 ---- Set to zero to disable ticks max&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;local autoAttachTimerTickMax = 5000 ---- Set to zero to disable ticks max&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;local function autoAttachTimer_tick(timer) ---- Timer tick call back&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;local function autoAttachTimer_tick(timer) ---- Timer tick call back&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;        ---- Destroy timer if max ticks is reached&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	if autoAttachTimerTickMax &amp;gt; 0 and autoAttachTimerTicks &amp;gt;= autoAttachTimerTickMax then&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	if autoAttachTimerTickMax &amp;gt; 0 and autoAttachTimerTicks &amp;gt;= autoAttachTimerTickMax then&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;		timer.destroy() &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;---- Destroy timer if max ticks is reached&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;		timer.destroy()&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	end&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	end&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	if getProcessIDFromProcessName(PROCESS_NAME) ~= nil then &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;---- Check if process is running&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;        ---- Check if process is running&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	if getProcessIDFromProcessName(PROCESS_NAME) ~= nil then&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;		timer.destroy() ---- Destroy timer&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;		timer.destroy() ---- Destroy timer&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;		openProcess(PROCESS_NAME) ---- Open the process&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;		openProcess(PROCESS_NAME) ---- Open the process&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l35&quot; &gt;Line 35:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 42:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;autoAttachTimer.OnTimer = autoAttachTimer_tick ---- Set timer tick call back&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;autoAttachTimer.OnTimer = autoAttachTimer_tick ---- Set timer tick call back&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/pre&amp;gt; --&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/pre&amp;gt; --&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;p &lt;/del&gt;style&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;=&lt;/del&gt;&amp;quot;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;line&lt;/del&gt;-&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;height&lt;/del&gt;:&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;1.15em&lt;/del&gt;;white-space:pre&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;;font-family:'Lucida Console'&lt;/del&gt;;display:block;overflow-x:auto;padding:0.5em;background:rgb(&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;35&lt;/del&gt;, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;36&lt;/del&gt;, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;31&lt;/del&gt;);color:rgb(&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;248&lt;/del&gt;, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;248&lt;/del&gt;, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;242&lt;/del&gt;);&amp;quot;&amp;gt;PROCESS_NAME = &amp;lt;span style=&amp;quot;color:rgb(&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;230&lt;/del&gt;, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;219&lt;/del&gt;, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;116&lt;/del&gt;);&amp;quot;&amp;gt;'Tutorial-i386.exe'&amp;lt;/span&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;!--&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;span style=&amp;quot;color:rgb(117, 113, 94);&amp;quot;&amp;gt;--------&amp;lt;/span&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;  Monokai &lt;/ins&gt;style&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;, no clue what the original was...&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;span style=&amp;quot;color:rgb(117, 113, 94);&amp;quot;&amp;gt;-------- Auto Attach&amp;lt;/span&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;  had to manually add &lt;/ins&gt;&amp;quot;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;white&lt;/ins&gt;-&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;space&lt;/ins&gt;:&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;pre&lt;/ins&gt;;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;quot; to the style list to get line breaks&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;span style=&amp;quot;color:rgb(117, 113, 94);&amp;quot;&amp;gt;--------&amp;lt;/span&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt; --&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;span style=&amp;quot;color:rgb(249, 38, 114);&amp;quot;&amp;gt;local&amp;lt;/span&amp;gt; autoAttachTimer = &amp;lt;span style=&amp;quot;color:rgb(&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;174&lt;/del&gt;, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;129&lt;/del&gt;, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;255&lt;/del&gt;);&amp;quot;&amp;gt;nil&amp;lt;/span&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt; &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;span style=&amp;quot;color:rgb(&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;249&lt;/del&gt;, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;38&lt;/del&gt;, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;114&lt;/del&gt;);&amp;quot;&amp;gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;local&lt;/del&gt;&amp;lt;/span&amp;gt; &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;autoAttachTimerInterval = &lt;/del&gt;&amp;lt;span style=&amp;quot;color:rgb(&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;174&lt;/del&gt;, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;129&lt;/del&gt;, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;255&lt;/del&gt;);&amp;quot;&amp;gt;1000&amp;lt;/span&amp;gt; &amp;lt;span style=&amp;quot;color:rgb(117, 113, 94);&amp;quot;&amp;gt;---- Timer intervals are in milliseconds&amp;lt;/span&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;p class=&amp;quot;hljs&amp;quot; style=&amp;quot;&lt;/ins&gt;white-space:pre; display: block; overflow-x: auto; padding: 0.5em; background: rgb(&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;39&lt;/ins&gt;, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;40&lt;/ins&gt;, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;34&lt;/ins&gt;); color: rgb(&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;221&lt;/ins&gt;, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;221&lt;/ins&gt;, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;221&lt;/ins&gt;);&amp;quot;&amp;gt;PROCESS_NAME = &amp;lt;span &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;class=&amp;quot;hljs-string&amp;quot; &lt;/ins&gt;style=&amp;quot;color: rgb(&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;166&lt;/ins&gt;, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;226&lt;/ins&gt;, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;46&lt;/ins&gt;);&amp;quot;&amp;gt;'Tutorial-i386.exe'&amp;lt;/span&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;span style=&amp;quot;color:rgb(249, 38, 114);&amp;quot;&amp;gt;local&amp;lt;/span&amp;gt; autoAttachTimerTicks = &amp;lt;span style=&amp;quot;color:rgb(&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;174&lt;/del&gt;, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;129&lt;/del&gt;, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;255&lt;/del&gt;);&amp;quot;&amp;gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;0&lt;/del&gt;&amp;lt;/span&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;span &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;class=&amp;quot;hljs-comment&amp;quot; &lt;/ins&gt;style=&amp;quot;color: rgb(117, 113, 94);&amp;quot;&amp;gt;--------&amp;lt;/span&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;span style=&amp;quot;color:rgb(249, 38, 114);&amp;quot;&amp;gt;local&amp;lt;/span&amp;gt; autoAttachTimerTickMax = &amp;lt;span &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;style&lt;/del&gt;=&amp;quot;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;color:rgb(174, 129, 255);&lt;/del&gt;&amp;quot;&amp;gt;5000&amp;lt;/span&amp;gt; &amp;lt;span style=&amp;quot;color:rgb(117, 113, 94);&amp;quot;&amp;gt;---- Set to zero to disable ticks max&amp;lt;/span&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;span &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;class=&amp;quot;hljs-comment&amp;quot; &lt;/ins&gt;style=&amp;quot;color: rgb(117, 113, 94);&amp;quot;&amp;gt;-------- Auto Attach&amp;lt;/span&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;span style=&amp;quot;color:rgb(249, 38, 114);&amp;quot;&amp;gt;local&amp;lt;/span&amp;gt; &amp;lt;span style=&amp;quot;color:rgb(249, 38, 114);&amp;quot;&amp;gt;function&amp;lt;/span&amp;gt; &amp;lt;span style=&amp;quot;color:rgb(166, 226, 46);&amp;quot;&amp;gt;autoAttachTimer_tick&amp;lt;/span&amp;gt;&amp;lt;span style=&amp;quot;color:rgb(&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;248&lt;/del&gt;, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;248&lt;/del&gt;, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;242&lt;/del&gt;);&amp;quot;&amp;gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;(timer)&lt;/del&gt;&amp;lt;/span&amp;gt; &amp;lt;span style=&amp;quot;color:rgb(117, 113, 94);&amp;quot;&amp;gt;---- &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Timer tick call back&lt;/del&gt;&amp;lt;/span&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;span &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;class=&amp;quot;hljs-comment&amp;quot; &lt;/ins&gt;style=&amp;quot;color: rgb(117, 113, 94);&amp;quot;&amp;gt;--------&amp;lt;/span&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;   &lt;/del&gt;&amp;lt;span style=&amp;quot;color:rgb(249, 38, 114);&amp;quot;&amp;gt;if&amp;lt;/span&amp;gt; autoAttachTimerTickMax &amp;amp;gt; &amp;lt;span &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;style&lt;/del&gt;=&amp;quot;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;color:rgb(174, 129, 255);&lt;/del&gt;&amp;quot;&amp;gt;0&amp;lt;/span&amp;gt; &amp;lt;span style=&amp;quot;color:rgb(249, 38, 114);&amp;quot;&amp;gt;and&amp;lt;/span&amp;gt; autoAttachTimerTicks &amp;amp;gt;= autoAttachTimerTickMax &amp;lt;span style=&amp;quot;color:rgb(249, 38, 114);&amp;quot;&amp;gt;then&amp;lt;/span&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;span &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;class=&amp;quot;hljs-keyword&amp;quot; &lt;/ins&gt;style=&amp;quot;color: rgb(249, 38, 114)&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;; font-weight: 700&lt;/ins&gt;;&amp;quot;&amp;gt;local&amp;lt;/span&amp;gt; autoAttachTimer = &amp;lt;span &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;class=&amp;quot;hljs-keyword&amp;quot; &lt;/ins&gt;style=&amp;quot;color: rgb(&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;249&lt;/ins&gt;, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;38&lt;/ins&gt;, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;114&lt;/ins&gt;)&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;; font-weight: 700&lt;/ins&gt;;&amp;quot;&amp;gt;nil&amp;lt;/span&amp;gt; &amp;lt;span &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;class=&amp;quot;hljs-comment&amp;quot; &lt;/ins&gt;style=&amp;quot;color: rgb(&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;117&lt;/ins&gt;, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;113&lt;/ins&gt;, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;94&lt;/ins&gt;);&amp;quot;&amp;gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;---- variable to hold timer object&lt;/ins&gt;&amp;lt;/span&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;      &lt;/del&gt;timer.destroy() &amp;lt;span style=&amp;quot;color:rgb(&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;117&lt;/del&gt;, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;113&lt;/del&gt;, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;94&lt;/del&gt;);&amp;quot;&amp;gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;---- Destroy timer if max ticks is reached&lt;/del&gt;&amp;lt;/span&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;span &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;class=&amp;quot;hljs-keyword&amp;quot; &lt;/ins&gt;style=&amp;quot;color: rgb(&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;249&lt;/ins&gt;, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;38&lt;/ins&gt;, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;114&lt;/ins&gt;)&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;; font-weight: 700&lt;/ins&gt;;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;quot;&amp;gt;local&amp;lt;/span&amp;gt; autoAttachTimerInterval = &amp;lt;span class=&amp;quot;hljs-number&lt;/ins&gt;&amp;quot;&amp;gt;1000&amp;lt;/span&amp;gt; &amp;lt;span &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;class=&amp;quot;hljs-comment&amp;quot; &lt;/ins&gt;style=&amp;quot;color: rgb(117, 113, 94);&amp;quot;&amp;gt;---- Timer intervals are in milliseconds&amp;lt;/span&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;   &lt;/del&gt;&amp;lt;span style=&amp;quot;color:rgb(&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;249&lt;/del&gt;, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;38&lt;/del&gt;, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;114&lt;/del&gt;);&amp;quot;&amp;gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;end&lt;/del&gt;&amp;lt;/span&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;span &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;class=&amp;quot;hljs-keyword&amp;quot; &lt;/ins&gt;style=&amp;quot;color: rgb(249, 38, 114)&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;; font-weight: 700&lt;/ins&gt;;&amp;quot;&amp;gt;local&amp;lt;/span&amp;gt; autoAttachTimerTicks = &amp;lt;span &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;class=&amp;quot;hljs-number&amp;quot;&amp;gt;0&amp;lt;/span&amp;gt; &amp;lt;span class=&amp;quot;hljs-comment&amp;quot; &lt;/ins&gt;style=&amp;quot;color: rgb(&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;117&lt;/ins&gt;, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;113&lt;/ins&gt;, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;94&lt;/ins&gt;);&amp;quot;&amp;gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;---- variable to count number of times the timer has run&lt;/ins&gt;&amp;lt;/span&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;   &lt;/del&gt;&amp;lt;span style=&amp;quot;color:rgb(249, 38, 114);&amp;quot;&amp;gt;if&amp;lt;/span&amp;gt; getProcessIDFromProcessName(PROCESS_NAME) &amp;lt;span &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;style&lt;/del&gt;=&amp;quot;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;color:pink;&lt;/del&gt;&amp;quot;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;&amp;gt;~=&amp;lt;/span&amp;gt; &amp;lt;span &lt;/del&gt;style=&amp;quot;color:rgb(&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;174&lt;/del&gt;, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;129&lt;/del&gt;, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;255&lt;/del&gt;);&amp;quot;&amp;gt;nil&amp;lt;/span&amp;gt; &amp;lt;span style=&amp;quot;color:rgb(249, 38, 114);&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;&amp;quot;&amp;gt;then&amp;lt;/span&amp;gt; &amp;lt;span style=&amp;quot;color&lt;/del&gt;:&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;rgb(117, 113, 94)&lt;/del&gt;;&amp;quot;&amp;gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;---- Check if process is running&lt;/del&gt;&amp;lt;/span&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;span &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;class=&amp;quot;hljs-keyword&amp;quot; &lt;/ins&gt;style=&amp;quot;color: rgb(249, 38, 114)&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;; font-weight: 700&lt;/ins&gt;;&amp;quot;&amp;gt;local&amp;lt;/span&amp;gt; autoAttachTimerTickMax = &amp;lt;span &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;class&lt;/ins&gt;=&amp;quot;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;hljs-number&lt;/ins&gt;&amp;quot;&amp;gt;5000&amp;lt;/span&amp;gt; &amp;lt;span &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;class=&amp;quot;hljs-comment&amp;quot; &lt;/ins&gt;style=&amp;quot;color: rgb(117, 113, 94);&amp;quot;&amp;gt;---- Set to zero to disable ticks max&amp;lt;/span&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;      &lt;/del&gt;timer.destroy() &amp;lt;span style=&amp;quot;color:rgb(117, 113, 94);&amp;quot;&amp;gt;---- Destroy timer&amp;lt;/span&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;span &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;class=&amp;quot;hljs-keyword&amp;quot; &lt;/ins&gt;style=&amp;quot;color: rgb(249, 38, 114)&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;; font-weight: 700&lt;/ins&gt;;&amp;quot;&amp;gt;local&amp;lt;/span&amp;gt; &amp;lt;span &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;class=&amp;quot;hljs-function&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;hljs-keyword&amp;quot; &lt;/ins&gt;style=&amp;quot;color: rgb(249, 38, 114)&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;; font-weight: 700&lt;/ins&gt;;&amp;quot;&amp;gt;function&amp;lt;/span&amp;gt; &amp;lt;span &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;class=&amp;quot;hljs-title&amp;quot; &lt;/ins&gt;style=&amp;quot;color: rgb(166, 226, 46)&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;; font-weight: 700&lt;/ins&gt;;&amp;quot;&amp;gt;autoAttachTimer_tick&amp;lt;/span&amp;gt;&amp;lt;span &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;class=&amp;quot;hljs-params&amp;quot;&amp;gt;(timer)&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt; &amp;lt;span class=&amp;quot;hljs-comment&amp;quot; &lt;/ins&gt;style=&amp;quot;color: rgb(&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;117&lt;/ins&gt;, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;113&lt;/ins&gt;, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;94&lt;/ins&gt;);&amp;quot;&amp;gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;---- Timer tick call back&lt;/ins&gt;&amp;lt;/span&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;      &lt;/del&gt;openProcess(PROCESS_NAME) &amp;lt;span style=&amp;quot;color:rgb(117, 113, 94);&amp;quot;&amp;gt;---- Open the process&amp;lt;/span&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;        &lt;/ins&gt;&amp;lt;span &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;class=&amp;quot;hljs-comment&amp;quot; &lt;/ins&gt;style=&amp;quot;color: rgb(117, 113, 94);&amp;quot;&amp;gt;---- &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Destroy timer if max ticks is reached&lt;/ins&gt;&amp;lt;/span&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;   &lt;/del&gt;&amp;lt;span style=&amp;quot;color:rgb(249, 38, 114);&amp;quot;&amp;gt;end&amp;lt;/span&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;	&lt;/ins&gt;&amp;lt;span &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;class=&amp;quot;hljs-keyword&amp;quot; &lt;/ins&gt;style=&amp;quot;color: rgb(249, 38, 114)&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;; font-weight: 700&lt;/ins&gt;;&amp;quot;&amp;gt;if&amp;lt;/span&amp;gt; autoAttachTimerTickMax &amp;amp;gt; &amp;lt;span &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;class&lt;/ins&gt;=&amp;quot;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;hljs-number&lt;/ins&gt;&amp;quot;&amp;gt;0&amp;lt;/span&amp;gt; &amp;lt;span &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;class=&amp;quot;hljs-keyword&amp;quot; &lt;/ins&gt;style=&amp;quot;color: rgb(249, 38, 114)&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;; font-weight: 700&lt;/ins&gt;;&amp;quot;&amp;gt;and&amp;lt;/span&amp;gt; autoAttachTimerTicks &amp;amp;gt;= autoAttachTimerTickMax &amp;lt;span &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;class=&amp;quot;hljs-keyword&amp;quot; &lt;/ins&gt;style=&amp;quot;color: rgb(249, 38, 114)&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;; font-weight: 700&lt;/ins&gt;;&amp;quot;&amp;gt;then&amp;lt;/span&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;   &lt;/del&gt;autoAttachTimerTicks = autoAttachTimerTicks + &amp;lt;span &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;style&lt;/del&gt;=&amp;quot;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;color:rgb(174, 129, 255);&lt;/del&gt;&amp;quot;&amp;gt;1&amp;lt;/span&amp;gt; &amp;lt;span style=&amp;quot;color:rgb(117, 113, 94);&amp;quot;&amp;gt;---- Increase ticks&amp;lt;/span&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;		&lt;/ins&gt;timer.destroy()&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;span style=&amp;quot;color:rgb(249, 38, 114);&amp;quot;&amp;gt;end&amp;lt;/span&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;	&lt;/ins&gt;&amp;lt;span &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;class=&amp;quot;hljs-keyword&amp;quot; &lt;/ins&gt;style=&amp;quot;color: rgb(&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;249&lt;/ins&gt;, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;38&lt;/ins&gt;, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;114&lt;/ins&gt;)&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;; font-weight: 700&lt;/ins&gt;;&amp;quot;&amp;gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;end&lt;/ins&gt;&amp;lt;/span&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;autoAttachTimer = createTimer(getMainForm()) &amp;lt;span style=&amp;quot;color:rgb(117, 113, 94);&amp;quot;&amp;gt;---- Create timer with the main form as it's parent&amp;lt;/span&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;        &lt;/ins&gt;&amp;lt;span &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;class=&amp;quot;hljs-comment&amp;quot; &lt;/ins&gt;style=&amp;quot;color: rgb(&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;117&lt;/ins&gt;, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;113&lt;/ins&gt;, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;94&lt;/ins&gt;);&amp;quot;&amp;gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;---- Check if process is running&lt;/ins&gt;&amp;lt;/span&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;autoAttachTimer.Interval = autoAttachTimerInterval &amp;lt;span style=&amp;quot;color:rgb(117, 113, 94);&amp;quot;&amp;gt;---- Set timer interval&amp;lt;/span&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;	&lt;/ins&gt;&amp;lt;span &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;class=&amp;quot;hljs-keyword&amp;quot; &lt;/ins&gt;style=&amp;quot;color: rgb(249, 38, 114)&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;; font-weight: 700&lt;/ins&gt;;&amp;quot;&amp;gt;if&amp;lt;/span&amp;gt; getProcessIDFromProcessName(PROCESS_NAME) &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;~= &lt;/ins&gt;&amp;lt;span &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;class&lt;/ins&gt;=&amp;quot;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;hljs-keyword&lt;/ins&gt;&amp;quot; style=&amp;quot;color: rgb(&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;249&lt;/ins&gt;, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;38&lt;/ins&gt;, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;114&lt;/ins&gt;)&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;; font-weight: 700&lt;/ins&gt;;&amp;quot;&amp;gt;nil&amp;lt;/span&amp;gt; &amp;lt;span &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;class=&amp;quot;hljs-keyword&amp;quot; &lt;/ins&gt;style=&amp;quot;color: rgb(249, 38, 114); &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;font-weight&lt;/ins&gt;: &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;700&lt;/ins&gt;;&amp;quot;&amp;gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;then&lt;/ins&gt;&amp;lt;/span&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;autoAttachTimer.OnTimer = autoAttachTimer_tick &amp;lt;span style=&amp;quot;color:rgb(117, 113, 94);&amp;quot;&amp;gt;---- Set timer tick call back&amp;lt;/span&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;		&lt;/ins&gt;timer.destroy() &amp;lt;span &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;class=&amp;quot;hljs-comment&amp;quot; &lt;/ins&gt;style=&amp;quot;color: rgb(117, 113, 94);&amp;quot;&amp;gt;---- Destroy timer&amp;lt;/span&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/p&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;		&lt;/ins&gt;openProcess(PROCESS_NAME) &amp;lt;span &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;class=&amp;quot;hljs-comment&amp;quot; &lt;/ins&gt;style=&amp;quot;color: rgb(117, 113, 94);&amp;quot;&amp;gt;---- Open the process&amp;lt;/span&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;	&lt;/ins&gt;&amp;lt;span &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;class=&amp;quot;hljs-keyword&amp;quot; &lt;/ins&gt;style=&amp;quot;color: rgb(249, 38, 114)&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;; font-weight: 700&lt;/ins&gt;;&amp;quot;&amp;gt;end&amp;lt;/span&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;	&lt;/ins&gt;autoAttachTimerTicks = autoAttachTimerTicks + &amp;lt;span &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;class&lt;/ins&gt;=&amp;quot;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;hljs-number&lt;/ins&gt;&amp;quot;&amp;gt;1&amp;lt;/span&amp;gt; &amp;lt;span &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;class=&amp;quot;hljs-comment&amp;quot; &lt;/ins&gt;style=&amp;quot;color: rgb(117, 113, 94);&amp;quot;&amp;gt;---- Increase ticks&amp;lt;/span&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;span &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;class=&amp;quot;hljs-keyword&amp;quot; &lt;/ins&gt;style=&amp;quot;color: rgb(249, 38, 114)&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;; font-weight: 700&lt;/ins&gt;;&amp;quot;&amp;gt;end&amp;lt;/span&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;autoAttachTimer = createTimer(getMainForm()) &amp;lt;span &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;class=&amp;quot;hljs-comment&amp;quot; &lt;/ins&gt;style=&amp;quot;color: rgb(117, 113, 94);&amp;quot;&amp;gt;---- Create timer with the main form as it's parent&amp;lt;/span&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;autoAttachTimer.Interval = autoAttachTimerInterval &amp;lt;span &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;class=&amp;quot;hljs-comment&amp;quot; &lt;/ins&gt;style=&amp;quot;color: rgb(117, 113, 94);&amp;quot;&amp;gt;---- Set timer interval&amp;lt;/span&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;autoAttachTimer.OnTimer = autoAttachTimer_tick &amp;lt;span &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;class=&amp;quot;hljs-comment&amp;quot; &lt;/ins&gt;style=&amp;quot;color: rgb(117, 113, 94);&amp;quot;&amp;gt;---- Set timer tick call back&amp;lt;/span&amp;gt;&amp;lt;/p&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;'''Set the process name to the process you are attaching to''', use the full process name from the process list.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;'''Set the process name to the process you are attaching to''', use the full process name from the process list.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>FreeER</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.cheatengine.org/index.php?title=Tutorials:Lua:Setup_Auto_Attach&amp;diff=4158&amp;oldid=prev</id>
		<title>TheyCallMeTim13 at 14:03, 19 March 2017</title>
		<link rel="alternate" type="text/html" href="https://wiki.cheatengine.org/index.php?title=Tutorials:Lua:Setup_Auto_Attach&amp;diff=4158&amp;oldid=prev"/>
		<updated>2017-03-19T14:03:04Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revision as of 14:03, 19 March 2017&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l7&quot; &gt;Line 7:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 7:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Tutorial]]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Tutorial]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Lua]]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Lua]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;{{DISPLAYTITLE:Setup a Lua auto attach script}}&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== How to setup a Lua auto attach script ==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== How to setup a Lua auto attach script ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>TheyCallMeTim13</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.cheatengine.org/index.php?title=Tutorials:Lua:Setup_Auto_Attach&amp;diff=4007&amp;oldid=prev</id>
		<title>TheyCallMeTim13 at 12:54, 19 March 2017</title>
		<link rel="alternate" type="text/html" href="https://wiki.cheatengine.org/index.php?title=Tutorials:Lua:Setup_Auto_Attach&amp;diff=4007&amp;oldid=prev"/>
		<updated>2017-03-19T12:54:22Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revision as of 12:54, 19 March 2017&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l5&quot; &gt;Line 5:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 5:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;    Theme:  Monokai Sublime&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;    Theme:  Monokai Sublime&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;--&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;--&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[Category:Tutorial]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[Category:Lua]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== How to setup a Lua auto attach script ==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== How to setup a Lua auto attach script ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>TheyCallMeTim13</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.cheatengine.org/index.php?title=Tutorials:Lua:Setup_Auto_Attach&amp;diff=3744&amp;oldid=prev</id>
		<title>TheyCallMeTim13 at 09:10, 17 March 2017</title>
		<link rel="alternate" type="text/html" href="https://wiki.cheatengine.org/index.php?title=Tutorials:Lua:Setup_Auto_Attach&amp;diff=3744&amp;oldid=prev"/>
		<updated>2017-03-17T09:10:45Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revision as of 09:10, 17 March 2017&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l32&quot; &gt;Line 32:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 32:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;autoAttachTimer.OnTimer = autoAttachTimer_tick ---- Set timer tick call back&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;autoAttachTimer.OnTimer = autoAttachTimer_tick ---- Set timer tick call back&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/pre&amp;gt; --&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/pre&amp;gt; --&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;p style=&amp;quot;white-space:pre;font-family:'Lucida Console';display:block;overflow-x:auto;padding:0.5em;background:rgb(35, 36, 31);color:rgb(248, 248, 242);&amp;quot;&amp;gt;PROCESS_NAME = &amp;lt;span style=&amp;quot;color:rgb(230, 219, 116);&amp;quot;&amp;gt;'Tutorial-i386.exe'&amp;lt;/span&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;p style=&amp;quot;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;line-height:1.15em;&lt;/ins&gt;white-space:pre;font-family:'Lucida Console';display:block;overflow-x:auto;padding:0.5em;background:rgb(35, 36, 31);color:rgb(248, 248, 242);&amp;quot;&amp;gt;PROCESS_NAME = &amp;lt;span style=&amp;quot;color:rgb(230, 219, 116);&amp;quot;&amp;gt;'Tutorial-i386.exe'&amp;lt;/span&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;span style=&amp;quot;color:rgb(117, 113, 94);&amp;quot;&amp;gt;--------&amp;lt;/span&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;span style=&amp;quot;color:rgb(117, 113, 94);&amp;quot;&amp;gt;--------&amp;lt;/span&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;span style=&amp;quot;color:rgb(117, 113, 94);&amp;quot;&amp;gt;-------- Auto Attach&amp;lt;/span&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;span style=&amp;quot;color:rgb(117, 113, 94);&amp;quot;&amp;gt;-------- Auto Attach&amp;lt;/span&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>TheyCallMeTim13</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.cheatengine.org/index.php?title=Tutorials:Lua:Setup_Auto_Attach&amp;diff=3663&amp;oldid=prev</id>
		<title>TheyCallMeTim13 at 06:58, 16 March 2017</title>
		<link rel="alternate" type="text/html" href="https://wiki.cheatengine.org/index.php?title=Tutorials:Lua:Setup_Auto_Attach&amp;diff=3663&amp;oldid=prev"/>
		<updated>2017-03-16T06:58:49Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revision as of 06:58, 16 March 2017&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l15&quot; &gt;Line 15:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 15:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;--------&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;--------&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;local autoAttachTimer = nil&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;local autoAttachTimer = nil&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;local autoAttachTimerInterval = &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;100&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;local autoAttachTimerInterval = &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;1000 ---- Timer intervals are in milliseconds&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;local autoAttachTimerTicks = 0&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;local autoAttachTimerTicks = 0&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;local autoAttachTimerTickMax = 5000&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;local autoAttachTimerTickMax = 5000 &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;---- Set to zero to disable ticks max&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;local function autoAttachTimer_tick(timer) ---- Timer tick call back&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;local function autoAttachTimer_tick(timer) ---- Timer tick call back&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	if autoAttachTimerTickMax &amp;gt; 0 and autoAttachTimerTicks &amp;gt;= autoAttachTimerTickMax then&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	if autoAttachTimerTickMax &amp;gt; 0 and autoAttachTimerTicks &amp;gt;= autoAttachTimerTickMax then&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l37&quot; &gt;Line 37:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 37:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;span style=&amp;quot;color:rgb(117, 113, 94);&amp;quot;&amp;gt;--------&amp;lt;/span&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;span style=&amp;quot;color:rgb(117, 113, 94);&amp;quot;&amp;gt;--------&amp;lt;/span&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;span style=&amp;quot;color:rgb(249, 38, 114);&amp;quot;&amp;gt;local&amp;lt;/span&amp;gt; autoAttachTimer = &amp;lt;span style=&amp;quot;color:rgb(174, 129, 255);&amp;quot;&amp;gt;nil&amp;lt;/span&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;span style=&amp;quot;color:rgb(249, 38, 114);&amp;quot;&amp;gt;local&amp;lt;/span&amp;gt; autoAttachTimer = &amp;lt;span style=&amp;quot;color:rgb(174, 129, 255);&amp;quot;&amp;gt;nil&amp;lt;/span&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;span style=&amp;quot;color:rgb(249, 38, 114);&amp;quot;&amp;gt;local&amp;lt;/span&amp;gt; autoAttachTimerInterval = &amp;lt;span style=&amp;quot;color:rgb(174, 129, 255);&amp;quot;&amp;gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;100&lt;/del&gt;&amp;lt;/span&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;span style=&amp;quot;color:rgb(249, 38, 114);&amp;quot;&amp;gt;local&amp;lt;/span&amp;gt; autoAttachTimerInterval = &amp;lt;span style=&amp;quot;color:rgb(174, 129, 255);&amp;quot;&amp;gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;1000&amp;lt;/span&amp;gt; &amp;lt;span style=&amp;quot;color:rgb(117, 113, 94);&amp;quot;&amp;gt;---- Timer intervals are in milliseconds&lt;/ins&gt;&amp;lt;/span&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;span style=&amp;quot;color:rgb(249, 38, 114);&amp;quot;&amp;gt;local&amp;lt;/span&amp;gt; autoAttachTimerTicks = &amp;lt;span style=&amp;quot;color:rgb(174, 129, 255);&amp;quot;&amp;gt;0&amp;lt;/span&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;span style=&amp;quot;color:rgb(249, 38, 114);&amp;quot;&amp;gt;local&amp;lt;/span&amp;gt; autoAttachTimerTicks = &amp;lt;span style=&amp;quot;color:rgb(174, 129, 255);&amp;quot;&amp;gt;0&amp;lt;/span&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;span style=&amp;quot;color:rgb(249, 38, 114);&amp;quot;&amp;gt;local&amp;lt;/span&amp;gt; autoAttachTimerTickMax = &amp;lt;span style=&amp;quot;color:rgb(174, 129, 255);&amp;quot;&amp;gt;5000&amp;lt;/span&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;span style=&amp;quot;color:rgb(249, 38, 114);&amp;quot;&amp;gt;local&amp;lt;/span&amp;gt; autoAttachTimerTickMax = &amp;lt;span style=&amp;quot;color:rgb(174, 129, 255);&amp;quot;&amp;gt;5000&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;/span&amp;gt; &amp;lt;span style=&amp;quot;color:rgb(117, 113, 94);&amp;quot;&amp;gt;---- Set to zero to disable ticks max&lt;/ins&gt;&amp;lt;/span&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;span style=&amp;quot;color:rgb(249, 38, 114);&amp;quot;&amp;gt;local&amp;lt;/span&amp;gt; &amp;lt;span style=&amp;quot;color:rgb(249, 38, 114);&amp;quot;&amp;gt;function&amp;lt;/span&amp;gt; &amp;lt;span style=&amp;quot;color:rgb(166, 226, 46);&amp;quot;&amp;gt;autoAttachTimer_tick&amp;lt;/span&amp;gt;&amp;lt;span style=&amp;quot;color:rgb(248, 248, 242);&amp;quot;&amp;gt;(timer)&amp;lt;/span&amp;gt; &amp;lt;span style=&amp;quot;color:rgb(117, 113, 94);&amp;quot;&amp;gt;---- Timer tick call back&amp;lt;/span&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;span style=&amp;quot;color:rgb(249, 38, 114);&amp;quot;&amp;gt;local&amp;lt;/span&amp;gt; &amp;lt;span style=&amp;quot;color:rgb(249, 38, 114);&amp;quot;&amp;gt;function&amp;lt;/span&amp;gt; &amp;lt;span style=&amp;quot;color:rgb(166, 226, 46);&amp;quot;&amp;gt;autoAttachTimer_tick&amp;lt;/span&amp;gt;&amp;lt;span style=&amp;quot;color:rgb(248, 248, 242);&amp;quot;&amp;gt;(timer)&amp;lt;/span&amp;gt; &amp;lt;span style=&amp;quot;color:rgb(117, 113, 94);&amp;quot;&amp;gt;---- Timer tick call back&amp;lt;/span&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;    &amp;lt;span style=&amp;quot;color:rgb(249, 38, 114);&amp;quot;&amp;gt;if&amp;lt;/span&amp;gt; autoAttachTimerTickMax &amp;amp;gt; &amp;lt;span style=&amp;quot;color:rgb(174, 129, 255);&amp;quot;&amp;gt;0&amp;lt;/span&amp;gt; &amp;lt;span style=&amp;quot;color:rgb(249, 38, 114);&amp;quot;&amp;gt;and&amp;lt;/span&amp;gt; autoAttachTimerTicks &amp;amp;gt;= autoAttachTimerTickMax &amp;lt;span style=&amp;quot;color:rgb(249, 38, 114);&amp;quot;&amp;gt;then&amp;lt;/span&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;    &amp;lt;span style=&amp;quot;color:rgb(249, 38, 114);&amp;quot;&amp;gt;if&amp;lt;/span&amp;gt; autoAttachTimerTickMax &amp;amp;gt; &amp;lt;span style=&amp;quot;color:rgb(174, 129, 255);&amp;quot;&amp;gt;0&amp;lt;/span&amp;gt; &amp;lt;span style=&amp;quot;color:rgb(249, 38, 114);&amp;quot;&amp;gt;and&amp;lt;/span&amp;gt; autoAttachTimerTicks &amp;amp;gt;= autoAttachTimerTickMax &amp;lt;span style=&amp;quot;color:rgb(249, 38, 114);&amp;quot;&amp;gt;then&amp;lt;/span&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>TheyCallMeTim13</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.cheatengine.org/index.php?title=Tutorials:Lua:Setup_Auto_Attach&amp;diff=3662&amp;oldid=prev</id>
		<title>TheyCallMeTim13 at 06:53, 16 March 2017</title>
		<link rel="alternate" type="text/html" href="https://wiki.cheatengine.org/index.php?title=Tutorials:Lua:Setup_Auto_Attach&amp;diff=3662&amp;oldid=prev"/>
		<updated>2017-03-16T06:53:36Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revision as of 06:53, 16 March 2017&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l20&quot; &gt;Line 20:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 20:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;local function autoAttachTimer_tick(timer) ---- Timer tick call back&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;local function autoAttachTimer_tick(timer) ---- Timer tick call back&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	if autoAttachTimerTickMax &amp;gt; 0 and autoAttachTimerTicks &amp;gt;= autoAttachTimerTickMax then&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	if autoAttachTimerTickMax &amp;gt; 0 and autoAttachTimerTicks &amp;gt;= autoAttachTimerTickMax then&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;		timer.destroy() ---- &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Destory &lt;/del&gt;timer if max ticks is reached&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;		timer.destroy() ---- &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Destroy &lt;/ins&gt;timer if max ticks is reached&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	end&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	end&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	if getProcessIDFromProcessName(PROCESS_NAME) ~= nil then ---- Check if process is running&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	if getProcessIDFromProcessName(PROCESS_NAME) ~= nil then ---- Check if process is running&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;		timer.destroy() ---- &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Destory &lt;/del&gt;timer&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;		timer.destroy() ---- &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Destroy &lt;/ins&gt;timer&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;		openProcess(PROCESS_NAME) ---- Open the process&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;		openProcess(PROCESS_NAME) ---- Open the process&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	end&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	end&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l42&quot; &gt;Line 42:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 42:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;span style=&amp;quot;color:rgb(249, 38, 114);&amp;quot;&amp;gt;local&amp;lt;/span&amp;gt; &amp;lt;span style=&amp;quot;color:rgb(249, 38, 114);&amp;quot;&amp;gt;function&amp;lt;/span&amp;gt; &amp;lt;span style=&amp;quot;color:rgb(166, 226, 46);&amp;quot;&amp;gt;autoAttachTimer_tick&amp;lt;/span&amp;gt;&amp;lt;span style=&amp;quot;color:rgb(248, 248, 242);&amp;quot;&amp;gt;(timer)&amp;lt;/span&amp;gt; &amp;lt;span style=&amp;quot;color:rgb(117, 113, 94);&amp;quot;&amp;gt;---- Timer tick call back&amp;lt;/span&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;span style=&amp;quot;color:rgb(249, 38, 114);&amp;quot;&amp;gt;local&amp;lt;/span&amp;gt; &amp;lt;span style=&amp;quot;color:rgb(249, 38, 114);&amp;quot;&amp;gt;function&amp;lt;/span&amp;gt; &amp;lt;span style=&amp;quot;color:rgb(166, 226, 46);&amp;quot;&amp;gt;autoAttachTimer_tick&amp;lt;/span&amp;gt;&amp;lt;span style=&amp;quot;color:rgb(248, 248, 242);&amp;quot;&amp;gt;(timer)&amp;lt;/span&amp;gt; &amp;lt;span style=&amp;quot;color:rgb(117, 113, 94);&amp;quot;&amp;gt;---- Timer tick call back&amp;lt;/span&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;    &amp;lt;span style=&amp;quot;color:rgb(249, 38, 114);&amp;quot;&amp;gt;if&amp;lt;/span&amp;gt; autoAttachTimerTickMax &amp;amp;gt; &amp;lt;span style=&amp;quot;color:rgb(174, 129, 255);&amp;quot;&amp;gt;0&amp;lt;/span&amp;gt; &amp;lt;span style=&amp;quot;color:rgb(249, 38, 114);&amp;quot;&amp;gt;and&amp;lt;/span&amp;gt; autoAttachTimerTicks &amp;amp;gt;= autoAttachTimerTickMax &amp;lt;span style=&amp;quot;color:rgb(249, 38, 114);&amp;quot;&amp;gt;then&amp;lt;/span&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;    &amp;lt;span style=&amp;quot;color:rgb(249, 38, 114);&amp;quot;&amp;gt;if&amp;lt;/span&amp;gt; autoAttachTimerTickMax &amp;amp;gt; &amp;lt;span style=&amp;quot;color:rgb(174, 129, 255);&amp;quot;&amp;gt;0&amp;lt;/span&amp;gt; &amp;lt;span style=&amp;quot;color:rgb(249, 38, 114);&amp;quot;&amp;gt;and&amp;lt;/span&amp;gt; autoAttachTimerTicks &amp;amp;gt;= autoAttachTimerTickMax &amp;lt;span style=&amp;quot;color:rgb(249, 38, 114);&amp;quot;&amp;gt;then&amp;lt;/span&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;       timer.destroy() &amp;lt;span style=&amp;quot;color:rgb(117, 113, 94);&amp;quot;&amp;gt;---- &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Destory &lt;/del&gt;timer if max ticks is reached&amp;lt;/span&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;       timer.destroy() &amp;lt;span style=&amp;quot;color:rgb(117, 113, 94);&amp;quot;&amp;gt;---- &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Destroy &lt;/ins&gt;timer if max ticks is reached&amp;lt;/span&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;    &amp;lt;span style=&amp;quot;color:rgb(249, 38, 114);&amp;quot;&amp;gt;end&amp;lt;/span&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;    &amp;lt;span style=&amp;quot;color:rgb(249, 38, 114);&amp;quot;&amp;gt;end&amp;lt;/span&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;    &amp;lt;span style=&amp;quot;color:rgb(249, 38, 114);&amp;quot;&amp;gt;if&amp;lt;/span&amp;gt; getProcessIDFromProcessName(PROCESS_NAME) &amp;lt;span style=&amp;quot;color:pink;&amp;quot;&amp;gt;~=&amp;lt;/span&amp;gt; &amp;lt;span style=&amp;quot;color:rgb(174, 129, 255);&amp;quot;&amp;gt;nil&amp;lt;/span&amp;gt; &amp;lt;span style=&amp;quot;color:rgb(249, 38, 114);&amp;quot;&amp;gt;then&amp;lt;/span&amp;gt; &amp;lt;span style=&amp;quot;color:rgb(117, 113, 94);&amp;quot;&amp;gt;---- Check if process is running&amp;lt;/span&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;    &amp;lt;span style=&amp;quot;color:rgb(249, 38, 114);&amp;quot;&amp;gt;if&amp;lt;/span&amp;gt; getProcessIDFromProcessName(PROCESS_NAME) &amp;lt;span style=&amp;quot;color:pink;&amp;quot;&amp;gt;~=&amp;lt;/span&amp;gt; &amp;lt;span style=&amp;quot;color:rgb(174, 129, 255);&amp;quot;&amp;gt;nil&amp;lt;/span&amp;gt; &amp;lt;span style=&amp;quot;color:rgb(249, 38, 114);&amp;quot;&amp;gt;then&amp;lt;/span&amp;gt; &amp;lt;span style=&amp;quot;color:rgb(117, 113, 94);&amp;quot;&amp;gt;---- Check if process is running&amp;lt;/span&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;       timer.destroy() &amp;lt;span style=&amp;quot;color:rgb(117, 113, 94);&amp;quot;&amp;gt;---- &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Destory &lt;/del&gt;timer&amp;lt;/span&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;       timer.destroy() &amp;lt;span style=&amp;quot;color:rgb(117, 113, 94);&amp;quot;&amp;gt;---- &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Destroy &lt;/ins&gt;timer&amp;lt;/span&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;       openProcess(PROCESS_NAME) &amp;lt;span style=&amp;quot;color:rgb(117, 113, 94);&amp;quot;&amp;gt;---- Open the process&amp;lt;/span&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;       openProcess(PROCESS_NAME) &amp;lt;span style=&amp;quot;color:rgb(117, 113, 94);&amp;quot;&amp;gt;---- Open the process&amp;lt;/span&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;    &amp;lt;span style=&amp;quot;color:rgb(249, 38, 114);&amp;quot;&amp;gt;end&amp;lt;/span&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;    &amp;lt;span style=&amp;quot;color:rgb(249, 38, 114);&amp;quot;&amp;gt;end&amp;lt;/span&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>TheyCallMeTim13</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.cheatengine.org/index.php?title=Tutorials:Lua:Setup_Auto_Attach&amp;diff=3658&amp;oldid=prev</id>
		<title>TheyCallMeTim13 at 06:28, 16 March 2017</title>
		<link rel="alternate" type="text/html" href="https://wiki.cheatengine.org/index.php?title=Tutorials:Lua:Setup_Auto_Attach&amp;diff=3658&amp;oldid=prev"/>
		<updated>2017-03-16T06:28:12Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revision as of 06:28, 16 March 2017&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l62&quot; &gt;Line 62:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 62:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;You should see the &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;pocess &lt;/del&gt;name at the top of the Cheat Engine form.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;You should see the &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;process &lt;/ins&gt;name at the top of the Cheat Engine form.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[File:Tutorials.Lua.AutoAttachScript.02.png|border]]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[File:Tutorials.Lua.AutoAttachScript.02.png|border]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>TheyCallMeTim13</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.cheatengine.org/index.php?title=Tutorials:Lua:Setup_Auto_Attach&amp;diff=3656&amp;oldid=prev</id>
		<title>TheyCallMeTim13 at 06:15, 16 March 2017</title>
		<link rel="alternate" type="text/html" href="https://wiki.cheatengine.org/index.php?title=Tutorials:Lua:Setup_Auto_Attach&amp;diff=3656&amp;oldid=prev"/>
		<updated>2017-03-16T06:15:59Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revision as of 06:15, 16 March 2017&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot; &gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;!--&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Syntax Highlighter:&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;   url:    http://pinetools.com/syntax-highlighter&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;   Lang:   Lua&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;   Theme:  Monokai Sublime&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;--&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== How to setup a Lua auto attach script ==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== How to setup a Lua auto attach script ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>TheyCallMeTim13</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.cheatengine.org/index.php?title=Tutorials:Lua:Setup_Auto_Attach&amp;diff=3655&amp;oldid=prev</id>
		<title>TheyCallMeTim13: Created page with '== How to setup a Lua auto attach script ==  '''On the Cheat Engine main form press ''Ctrl+Alt+L''''' to open the cheat table Lua script form.  Now Let's add the Lua script for t…'</title>
		<link rel="alternate" type="text/html" href="https://wiki.cheatengine.org/index.php?title=Tutorials:Lua:Setup_Auto_Attach&amp;diff=3655&amp;oldid=prev"/>
		<updated>2017-03-16T06:07:08Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;#039;== How to setup a Lua auto attach script ==  &amp;#039;&amp;#039;&amp;#039;On the Cheat Engine main form press &amp;#039;&amp;#039;Ctrl+Alt+L&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; to open the cheat table Lua script form.  Now Let&amp;#039;s add the Lua script for t…&amp;#039;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;== How to setup a Lua auto attach script ==&lt;br /&gt;
&lt;br /&gt;
'''On the Cheat Engine main form press ''Ctrl+Alt+L''''' to open the cheat table Lua script form.&lt;br /&gt;
&lt;br /&gt;
Now Let's add the Lua script for the auto attach to process timer.&lt;br /&gt;
&amp;lt;!-- &amp;lt;pre&amp;gt;PROCESS_NAME = 'Tutorial-i386.exe'&lt;br /&gt;
--------&lt;br /&gt;
-------- Auto Attach&lt;br /&gt;
--------&lt;br /&gt;
local autoAttachTimer = nil&lt;br /&gt;
local autoAttachTimerInterval = 100&lt;br /&gt;
local autoAttachTimerTicks = 0&lt;br /&gt;
local autoAttachTimerTickMax = 5000&lt;br /&gt;
local function autoAttachTimer_tick(timer) ---- Timer tick call back&lt;br /&gt;
	if autoAttachTimerTickMax &amp;gt; 0 and autoAttachTimerTicks &amp;gt;= autoAttachTimerTickMax then&lt;br /&gt;
		timer.destroy() ---- Destory timer if max ticks is reached&lt;br /&gt;
	end&lt;br /&gt;
	if getProcessIDFromProcessName(PROCESS_NAME) ~= nil then ---- Check if process is running&lt;br /&gt;
		timer.destroy() ---- Destory timer&lt;br /&gt;
		openProcess(PROCESS_NAME) ---- Open the process&lt;br /&gt;
	end&lt;br /&gt;
	autoAttachTimerTicks = autoAttachTimerTicks + 1 ---- Increase ticks&lt;br /&gt;
end&lt;br /&gt;
autoAttachTimer = createTimer(getMainForm()) ---- Create timer with the main form as it's parent&lt;br /&gt;
autoAttachTimer.Interval = autoAttachTimerInterval ---- Set timer interval&lt;br /&gt;
autoAttachTimer.OnTimer = autoAttachTimer_tick ---- Set timer tick call back&lt;br /&gt;
&amp;lt;/pre&amp;gt; --&amp;gt;&lt;br /&gt;
&amp;lt;p style=&amp;quot;white-space:pre;font-family:'Lucida Console';display:block;overflow-x:auto;padding:0.5em;background:rgb(35, 36, 31);color:rgb(248, 248, 242);&amp;quot;&amp;gt;PROCESS_NAME = &amp;lt;span style=&amp;quot;color:rgb(230, 219, 116);&amp;quot;&amp;gt;'Tutorial-i386.exe'&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:rgb(117, 113, 94);&amp;quot;&amp;gt;--------&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:rgb(117, 113, 94);&amp;quot;&amp;gt;-------- Auto Attach&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:rgb(117, 113, 94);&amp;quot;&amp;gt;--------&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:rgb(249, 38, 114);&amp;quot;&amp;gt;local&amp;lt;/span&amp;gt; autoAttachTimer = &amp;lt;span style=&amp;quot;color:rgb(174, 129, 255);&amp;quot;&amp;gt;nil&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:rgb(249, 38, 114);&amp;quot;&amp;gt;local&amp;lt;/span&amp;gt; autoAttachTimerInterval = &amp;lt;span style=&amp;quot;color:rgb(174, 129, 255);&amp;quot;&amp;gt;100&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:rgb(249, 38, 114);&amp;quot;&amp;gt;local&amp;lt;/span&amp;gt; autoAttachTimerTicks = &amp;lt;span style=&amp;quot;color:rgb(174, 129, 255);&amp;quot;&amp;gt;0&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:rgb(249, 38, 114);&amp;quot;&amp;gt;local&amp;lt;/span&amp;gt; autoAttachTimerTickMax = &amp;lt;span style=&amp;quot;color:rgb(174, 129, 255);&amp;quot;&amp;gt;5000&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:rgb(249, 38, 114);&amp;quot;&amp;gt;local&amp;lt;/span&amp;gt; &amp;lt;span style=&amp;quot;color:rgb(249, 38, 114);&amp;quot;&amp;gt;function&amp;lt;/span&amp;gt; &amp;lt;span style=&amp;quot;color:rgb(166, 226, 46);&amp;quot;&amp;gt;autoAttachTimer_tick&amp;lt;/span&amp;gt;&amp;lt;span style=&amp;quot;color:rgb(248, 248, 242);&amp;quot;&amp;gt;(timer)&amp;lt;/span&amp;gt; &amp;lt;span style=&amp;quot;color:rgb(117, 113, 94);&amp;quot;&amp;gt;---- Timer tick call back&amp;lt;/span&amp;gt;&lt;br /&gt;
   &amp;lt;span style=&amp;quot;color:rgb(249, 38, 114);&amp;quot;&amp;gt;if&amp;lt;/span&amp;gt; autoAttachTimerTickMax &amp;amp;gt; &amp;lt;span style=&amp;quot;color:rgb(174, 129, 255);&amp;quot;&amp;gt;0&amp;lt;/span&amp;gt; &amp;lt;span style=&amp;quot;color:rgb(249, 38, 114);&amp;quot;&amp;gt;and&amp;lt;/span&amp;gt; autoAttachTimerTicks &amp;amp;gt;= autoAttachTimerTickMax &amp;lt;span style=&amp;quot;color:rgb(249, 38, 114);&amp;quot;&amp;gt;then&amp;lt;/span&amp;gt;&lt;br /&gt;
      timer.destroy() &amp;lt;span style=&amp;quot;color:rgb(117, 113, 94);&amp;quot;&amp;gt;---- Destory timer if max ticks is reached&amp;lt;/span&amp;gt;&lt;br /&gt;
   &amp;lt;span style=&amp;quot;color:rgb(249, 38, 114);&amp;quot;&amp;gt;end&amp;lt;/span&amp;gt;&lt;br /&gt;
   &amp;lt;span style=&amp;quot;color:rgb(249, 38, 114);&amp;quot;&amp;gt;if&amp;lt;/span&amp;gt; getProcessIDFromProcessName(PROCESS_NAME) &amp;lt;span style=&amp;quot;color:pink;&amp;quot;&amp;gt;~=&amp;lt;/span&amp;gt; &amp;lt;span style=&amp;quot;color:rgb(174, 129, 255);&amp;quot;&amp;gt;nil&amp;lt;/span&amp;gt; &amp;lt;span style=&amp;quot;color:rgb(249, 38, 114);&amp;quot;&amp;gt;then&amp;lt;/span&amp;gt; &amp;lt;span style=&amp;quot;color:rgb(117, 113, 94);&amp;quot;&amp;gt;---- Check if process is running&amp;lt;/span&amp;gt;&lt;br /&gt;
      timer.destroy() &amp;lt;span style=&amp;quot;color:rgb(117, 113, 94);&amp;quot;&amp;gt;---- Destory timer&amp;lt;/span&amp;gt;&lt;br /&gt;
      openProcess(PROCESS_NAME) &amp;lt;span style=&amp;quot;color:rgb(117, 113, 94);&amp;quot;&amp;gt;---- Open the process&amp;lt;/span&amp;gt;&lt;br /&gt;
   &amp;lt;span style=&amp;quot;color:rgb(249, 38, 114);&amp;quot;&amp;gt;end&amp;lt;/span&amp;gt;&lt;br /&gt;
   autoAttachTimerTicks = autoAttachTimerTicks + &amp;lt;span style=&amp;quot;color:rgb(174, 129, 255);&amp;quot;&amp;gt;1&amp;lt;/span&amp;gt; &amp;lt;span style=&amp;quot;color:rgb(117, 113, 94);&amp;quot;&amp;gt;---- Increase ticks&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:rgb(249, 38, 114);&amp;quot;&amp;gt;end&amp;lt;/span&amp;gt;&lt;br /&gt;
autoAttachTimer = createTimer(getMainForm()) &amp;lt;span style=&amp;quot;color:rgb(117, 113, 94);&amp;quot;&amp;gt;---- Create timer with the main form as it's parent&amp;lt;/span&amp;gt;&lt;br /&gt;
autoAttachTimer.Interval = autoAttachTimerInterval &amp;lt;span style=&amp;quot;color:rgb(117, 113, 94);&amp;quot;&amp;gt;---- Set timer interval&amp;lt;/span&amp;gt;&lt;br /&gt;
autoAttachTimer.OnTimer = autoAttachTimer_tick &amp;lt;span style=&amp;quot;color:rgb(117, 113, 94);&amp;quot;&amp;gt;---- Set timer tick call back&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Set the process name to the process you are attaching to''', use the full process name from the process list.&lt;br /&gt;
&lt;br /&gt;
'''Launch the process''' then '''click ''execute script'' in the cheat table Lua script form'''.&lt;br /&gt;
&lt;br /&gt;
[[File:Tutorials.Lua.AutoAttachScript.01.png|border]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You should see the pocess name at the top of the Cheat Engine form.&lt;br /&gt;
&lt;br /&gt;
[[File:Tutorials.Lua.AutoAttachScript.02.png|border]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now when ever the cheat table is opened Cheat Engine will attempt to run the ''cheat table Lua script'' which will start the auto attach timer. By default Cheat Engine will ask to run the ''cheat table Lua script''.&lt;br /&gt;
&lt;br /&gt;
Note: You can change what Cheat Engine does with the ''cheat table Lua script'' in the Cheat Engine ''general settings''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[Tutorials]]&lt;br /&gt;
&lt;br /&gt;
==== Syntax Highlighter ====&lt;br /&gt;
* [http://pinetools.com/syntax-highlighter pinetools.com/syntax-highlighter]&lt;/div&gt;</summary>
		<author><name>TheyCallMeTim13</name></author>
		
	</entry>
</feed>