❗ Need help with Logitech G series coding
Im Currently trying to script in my Logitech Gaming Software and coming across this message
event = PROFILE_ACTIVATED, arg = 0
[string "LuaVM"]:8: attempt to call global 'EnablePrimaryMouseButtonEvents' (a nil value)
Here is the Script
function OnEvent(event, arg)
--OutputLogMessage("event = %s, arg = %s\n", event, arg);
end
function OnEvent(event, arg)
OutputLogMessage("event = %s, arg = %d\n", event, arg)
if (event == "PROFILE_ACTIVATED") then
EnablePrimaryMouseButtonEvents(true)
elseif event == "PROFILE_DEACTIVATED" then
ReleaseMouseButton(2) -- to prevent it from being stuck on
end
if (event == "MOUSE_BUTTON_PRESSED" and arg == 9) then
recoil = not recoil
spot = not spot
end
if (event == "MOUSE_BUTTON_PRESSED" and arg == 1 and recoil) then
if recoil then
repeat
--Sleep(35)
Sleep(8)
MoveMouseRelative(0, 3)
until not IsMouseButtonPressed(1)
end
end
end
Side Notes: friend is on a mac trying to do this, dont know if that makes a difference. Im not big into coding and trying to help him. It works fine on my PC but for some reason his mac isnt letting him do this, any help would be greatly appreciated.
event = PROFILE_ACTIVATED, arg = 0
[string "LuaVM"]:8: attempt to call global 'EnablePrimaryMouseButtonEvents' (a nil value)
Here is the Script
function OnEvent(event, arg)
--OutputLogMessage("event = %s, arg = %s\n", event, arg);
end
function OnEvent(event, arg)
OutputLogMessage("event = %s, arg = %d\n", event, arg)
if (event == "PROFILE_ACTIVATED") then
EnablePrimaryMouseButtonEvents(true)
elseif event == "PROFILE_DEACTIVATED" then
ReleaseMouseButton(2) -- to prevent it from being stuck on
end
if (event == "MOUSE_BUTTON_PRESSED" and arg == 9) then
recoil = not recoil
spot = not spot
end
if (event == "MOUSE_BUTTON_PRESSED" and arg == 1 and recoil) then
if recoil then
repeat
--Sleep(35)
Sleep(8)
MoveMouseRelative(0, 3)
until not IsMouseButtonPressed(1)
end
end
end
Side Notes: friend is on a mac trying to do this, dont know if that makes a difference. Im not big into coding and trying to help him. It works fine on my PC but for some reason his mac isnt letting him do this, any help would be greatly appreciated.