Jump to content

Join our Slack

Talk to other users and have a great time
Slack Server

Welcome to our Community

Click here to get your Exiled Bot license
Donation Store
d4ns0ul

Keybinding to Start The Bot

Recommended Posts

Dear ExiledBot Team, 

 

My request its very Simple

 

Is it possible to add a personnalised or not, key binding features for Starting the bot.

Like a F Button

Only For Starting

 

Thanks

 

Also will be nice to have Chaos and regret recipe Farming !!!

Share this post


Link to post
Share on other sites

I mean the first start button not pause and resume. 

Like space or enter maybe someting like that will be cool !

 

I want to automate the process of restarting my vm'S

and i cant automated the start bot.

Share this post


Link to post
Share on other sites

Hello there.

 

What you are asking for can easily be done with a small AutoHotKey script.

I've quickly written one up that you might find useful.

TrayTip,ExiledBot_Start,ExiledBot_Start is now running.
settimer,CheckForBot,1000 ;Comment this out if you want it to run even when the bot is not running.
return

^F12::  ;HotKey = Control+F12
Process, Exist, ExiledBot.exe
if (ErrorLevel = 0)
{
MsgBox ExiledBot is not running.
}
else
{
ControlClick,Button3,ahk_pid %ErrorLevel%
;Exitapp      ;Uncomment Exitapp if you want this program to close after the bot starts.
}
return

CheckForBot:
Process, Exist, ExiledBot.exe
if (ErrorLevel = 0)
{
ExitApp
}
return

Just start this program with your bot and Control+F12 becomes start bot.

 

Hope that helps. =P

Share this post


Link to post
Share on other sites

Hello there.

 

What you are asking for can easily be done with a small AutoHotKey script.

I've quickly written one up that you might find useful.

TrayTip,ExiledBot_Start,ExiledBot_Start is now running.
settimer,CheckForBot,1000 ;Comment this out if you want it to run even when the bot is not running.
return

^F12::  ;HotKey = Control+F12
Process, Exist, ExiledBot.exe
if (ErrorLevel = 0)
{
MsgBox ExiledBot is not running.
}
else
{
ControlClick,Button3,ahk_pid %ErrorLevel%
;Exitapp      ;Uncomment Exitapp if you want this program to close after the bot starts.
}
return

CheckForBot:
Process, Exist, ExiledBot.exe
if (ErrorLevel = 0)
{
ExitApp
}
return

Just start this program with your bot and Control+F12 becomes start bot.

 

Hope that helps. =P

 

 

Maybe some of you can make use of this:

SendMessage, 0xB772,,,, Exiled Bot (Elite)	;	STARTING THE BOT
SendMessage, 0xB773,,,, Exiled Bot (Elite)	;	STOPPING THE BOT
SendMessage, 0xB774,,,, Exiled Bot (Elite)	;	PAUSING THE BOT
SendMessage, 0xB775,,,, Exiled Bot (Elite)	;	RESUMING THE BOT

These are the SendMessage Codes (in the example above they are already wrapped in autoHotKey Code) to control the bot!

 

The main advantage is that you now can no longer accidentally restart the bot if you actually wanted to pause it. This is due to the fact that sending the SendMessage Code for pausing the bot (0xB774) to an already paused one, simply does nothing... an already paused bot cant be paused again :D (On the contrary to pressing the F11 hotkey!)

And of course, using SendMessage Codes is way faster and even more reliable then "pressing" buttons...

A Script could look like this:

#NoEnv
#Persistent
#MaxThreadsPerHotkey 1
SetBatchLines, -1
DetectHiddenWindows, On

;Some Vars
IniRead, ebpath, config.ini, Settings, ebpath
IniRead, poepath, config.ini, Settings, poepath
poename	=Path of Exile
poeexe	=PathOfExile.exe
ebname	=Exiled Bot (Elite)
ebexe	=ExiledBot.exe

;Process Watch/Control
loop
{
	WinGet, WinID, List, %ebname%
	if WinID<1
	{
		if FileExist(ebpath)
		{
			TrayTip, Exiled Bot not running!, Starting it for you... `;),2
			run %ebpath%
			WinWait, %ebname%
		}
		else
		{
			TrayTip, Exiled Bot not running!, Start Exiled Bot first... `;),2
			Sleep, 2000
			ExitApp	
		}
	}
	else
	{
		WinGet, EBPID, PID, %ebname%
		ebpath := GetModuleFileNameEx(EBPID)
		IniWrite, %ebpath%, config.ini, Settings, ebpath
		Loop, %WinID%
		{
			WinGet, ProcModuleNameEB, ProcessName,  % "ahk_id" WinID%A_Index%
			If(ProcModuleNameEB!=ebexe)
				continue
			ebhwnd:=WinID%A_Index%
		}
	}

	WinGet, WinID, List, %poename%
	if WinID<1
	{
		if FileExist(ebpath)
		{
			TrayTip, Path of Exile not running!, Starting it for you... `;),2
			run %poepath%
			WinWait, %poename%
		}
		else
		{
			TrayTip, Path of Exile not running!, Start Path of Exile first... `;),2
			Sleep, 2000
			ExitApp	
		}
	}
	else
	{
		WinGet, POEPID, PID, %poename%
		poepath := GetModuleFileNameEx(POEPID)
		IniWrite, %poepath%, config.ini, Settings, poepath
		Loop, %WinID%
		{
			WinGet, ProcModuleNamePOE, ProcessName,  % "ahk_id" WinID%A_Index%
			If(ProcModuleNamePOE!=poeexe)
				continue
			poehwnd:=WinID%A_Index%
		}
	}
}

; HotKeys	CTRL+F4	- Terminate Script
; °°°°°°°°°°	CTRL+F5	- Start botting
;		CTRL+F6	- Stop botting
;		CTRL+F7	- Pause botting
;		CTRL+F8	- Resume botting
^F5::
	TrayTip, Exiled Bot Control, Starting to bot!,2
	SendMessage, 0xB772,,,, Exiled Bot (Elite)
	DllCall("BringWindowToTop", Int, ebhwnd)
	DllCall("SwitchToThisWindow", "UInt", poehwnd, "UInt", 1)
	DllCall("SetFocus", UInt, poehwnd)
return

^F6::
	TrayTip, Exiled Bot Control, Stopping to bot!,2
	SendMessage, 0xB773,,,, Exiled Bot (Elite)
	DllCall("BringWindowToTop", Int, poehwnd)
	DllCall("SwitchToThisWindow", "UInt", ebhwnd, "UInt", 1)
	DllCall("SetFocus", UInt, ebhwnd)
return

^F7::
	TrayTip, Exiled Bot Control, Pausing the bot!,2
	SendMessage, 0xB774,,,, Exiled Bot (Elite)
	DllCall("BringWindowToTop", Int, poehwnd)
	DllCall("SwitchToThisWindow", "UInt", ebhwnd, "UInt", 1)
	DllCall("SetFocus", UInt, ebhwnd)
return

^F8::
	TrayTip, Exiled Bot Control, Resuming to bot!,2
	SendMessage, 0xB775,,,, Exiled Bot (Elite)
	DllCall("BringWindowToTop", Int, ebhwnd)
	DllCall("SwitchToThisWindow", "UInt", poehwnd, "UInt", 1)
	DllCall("SetFocus", UInt, poehwnd)
return

^F4::
	TrayTip, Exiled Bot Control, Shut Down: Terminating PoE / EB / ControlScript!,2
	sleep 2000
	Process, Close, %poeexe%
	Process, Close, %ebexe%
	ExitApp
return

; Function to retrieve the full path from an exe's PID
GetModuleFileNameEx(pid)
{
	h_process := DllCall("OpenProcess", "uint", 0x10|0x400, "int", false, "uint", pid)
	if (ErrorLevel or h_process = 0)
		return
	name_size = 255
	VarSetCapacity(name, name_size)
	result := DllCall("psapi.dll\GetModuleFileNameExW", "uint", h_process, "uint", 0, "str", name, "uint", name_size)
	DllCall("CloseHandle", h_process)
	return, name
}
  • CTRL+F4 - Terminate Script
  • CTRL+F5 - Start botting
  • CTRL+F6 - Stop botting
  • CTRL+F7 - Pause botting
  • CTRL+F8 - Resume botting

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...