| 24quant42 Cheater
 
 ![]() Reputation: 0 
 Joined: 19 Apr 2023
 Posts: 31
 
 
 | 
			
				|  Posted: Thu Aug 22, 2024 5:45 pm    Post subject: ReAttach Process |   |  
				| 
 |  
				| A script to display the process reconnection button. 
 There are cases when you need to quickly reconnect to the process, since automatic reconnection does not work in the settings, I decided to add a button to the main menu.
 The extension is triggered when you first connect to any process, then you can click on the button to reconnect to the process, it's better than opening a window and searching for the process again
 
 
 
 
 Instruction manual:
 Create a file in the *.lua format, paste the save script there, into a folder...Cheat Engine/autorun/
 
 Any edits for the better are welcome
 
 
 
 
 
  	  | Code: |  	  | function OnClickReAttachProcess()
 openProcess(process)
 end
 
 function makeBtnRetachProcess(mainForm)
 local btn = createButton(mainForm)
 btn.Left = 0
 btn.Top = 0
 btn.Width = 200
 btn.Height = 200
 btn.OnClick = OnClickReAttachProcess
 btn.Caption="ReAttach Process"
 btn.Name="btnRetachProcess"
 --print("Maked BTN")
 return btn
 end
 
 function findComponentByName(form, nameFinding)
 for i=0, form.getComponentCount() -1 do
 local component=form.getComponent(i)
 if component.Name==nameFinding then
 return component
 end
 end
 return nil
 end
 
 function getFMain()
 for i=0, getFormCount()-1 do
 local mainForm=getForm(i)
 if mainForm.Name=="MainForm" then
 return mainForm
 end
 end
 end
 
 function onStart()
 local mainForm=getFMain()
 local componentProcessLabel=findComponentByName(mainForm,"ProcessLabel")
 
 if componentProcessLabel.Caption ~= "No Process Selected" then
 --print(componentProcessLabel.Caption)
 
 local btnRetachProcess=findComponentByName(mainForm,"btnRetachProcess")
 if btnRetachProcess then
 --print("YES")
 else
 btnRetachProcess=makeBtnRetachProcess(mainForm)
 local btnMemoryView=findComponentByName(mainForm,"btnMemoryView")
 btnRetachProcess.Left=btnMemoryView.Width+20
 btnRetachProcess.Top=btnMemoryView.Top-15
 btnRetachProcess.Height=btnMemoryView.Height+20
 btnRetachProcess.Width=btnRetachProcess.Width+30
 end
 
 object_destroy(t1)
 else
 --print(componentProcessLabel.Caption)
 end
 end
 
 function prepare()
 t1=createTimer(nil)
 timer_setInterval(t1,1000)
 timer_onTimer(t1,onStart)
 end
 
 --Main Function Entry Point
 
 prepare()
 
 | 
 
 
 
 
	
		
	 
		| Description: |  |  
		| Filesize: | 19.77 KB |  
		| Viewed: | 8554 Time(s) |  
		| 
  
 
 |  
 |  |