438
« on: August 20, 2016, 11:17:57 AM »
Heres a different kind of plugin for you using an X360 controller that populates registry values so you can write your own scripts for it, if you have the registry plugin loaded you can see the values.
I will try and get some video`s on usage as soon as possible but is straight forward, create a lua panel from the screen editor and make sure you select that its hidden and in the code add as an example
local inst = mc.mcGetInstance()
local X360_PNL = mcLuaPanelParent;
function GetXin(xinput)
local hreg = mc.mcRegGetHandle(inst, string.format("mcX360_LUA/%s", xinput))
return mc.mcRegGetValueString(hreg)
end
X360_timer = wx.wxTimer(X360_PNL)
X360_PNL:Connect(wx.wxEVT_TIMER, function (event)
if GetXin("Btn_A") == "1" then
-- do something after button A is pressed
end
if GetXin("Btn_B") == "1" then
-- do something after button B is pressed
end
end)
X360_timer:Start(100)
You should get the gist ;-)
DazTheGas