DX's Client starter
Posted: Fri Feb 13, 2015 1:36 am
Attached is my "start the client" function as a Lua plugin to Micromacro. It will start client directly with arguments (NoCheckVersion) or through a link and return the PID and HWND of the client which can be used directly for attaching Micromacro to the client.
This enables Micromacro to start client without reserving the window/mouse.
Usage:
To compile you compile as a Lua 5.2 extension and link as a .dll to
micromacro /lua52.dll, then put mmext.dll into micromacro/lib/mods directory.
I'm using MinGW for compilation, my makefile is as below.
Best regards
DX
Changes:
- Added a mmext.KillClient(pid) function
This enables Micromacro to start client without reserving the window/mouse.
Usage:
Code: Select all
mmext = require("mmext")
--local pid, win = mmext.Client("C:\\Games\\rom\\ClientRun.lnk")
local pid, win = mmext.Client("C:\\Games\\rom\\Client.exe", "NoCheckVersion", "C:\\Games\\rom")
-- Open client memory space
proc = openProcess(pid)
-- Attach keyboard/mouse to client
attach(win)
micromacro /lua52.dll, then put mmext.dll into micromacro/lib/mods directory.
I'm using MinGW for compilation, my makefile is as below.
Best regards
DX
Changes:
- Added a mmext.KillClient(pid) function