1

I’ve always used this LUA script on Logitech Gaming software by using a G502 mouse, I had to change my old mouse and I bought a new version “G502x” which is not recognized by LGS so I had to install GHub to make the mouse useful, but the script is not working with GHub, any changes I can apply to the code so it works properly now? Or… is there a configuration I have to add to the GHub to get it worked? thanks.

TIMEOUT = 900
function OnEvent(event, arg, family)
if event == "MOUSE_BUTTON_PRESSED" and arg == 5 then
if GetRunningTime() - (timestamp or 0) >= TIMEOUT then index = 0 end
index = (index or 0) + 1
if index > 3 then index = 1 end
if index == 1 then
PressKey("e")
elseif index == 2 then
PressKey("w")
elseif index == 3 then
PressKey("Num1")
end
timestamp = GetRunningTime()
elseif event == "MOUSE_BUTTON_RELEASED" and arg == 5 then
if index == 1 then
ReleaseKey("e")
elseif index == 2 then
ReleaseKey("w")
elseif index == 3 then
ReleaseKey("Num1")
end
end
end
  • Your Lua script is OK. The latest GHub 2023.7 has problems, so try to uninstall it and choose older version (see https://stackoverflow.com/q/76990420/20468470 comments for details) – ESkri Aug 29 '23 at 07:39

1 Answers1

0

uninstall the app, and download this: https://drive.google.com/file/d/1tFdL871-qiftfWEzV7Yl_KvcZiG_-ekc/view?usp=sharing, you wellcome

Burlon23
  • 97
  • 1
  • 6
  • Old versions of GHub are available from the official website, so there is no need to trust someone else's .exe file. – ESkri Aug 29 '23 at 13:35
  • "I SPENT 4 HOURS IN THE EARLY MORNING TRYING TO SOLVE THE ISSUE, BELIEVE ME, NONE OF THE AVAILABLE OPTIONS YOU HAVE WILL WORK. THE ONES THAT WORK ARE NO LONGER PROVIDED BY THE WEBSITE, UNLESS IT'S VERY, VERY OLD, WHICH THE SUPERLIGHT MOUSE WON'T RECOGNIZE AS, IN MY CASE." – Burlon23 Aug 29 '23 at 16:18
  • "The recent old versions don't work because when you download the rest of the software, it automatically updates you to 2023.7." – Burlon23 Aug 29 '23 at 16:20
  • How can I update to 2023.7? The latest version available on the website is 2023.6, and it does not update into something newer when I click "CHECK FOR UPDATE" button. And there were no problems with 2023.6 reported on SO. BTW, you can temporarily turn internet connection off and unset the "Automatic updates" options in GHub when installing it - this way you can freeze, for example, 2021 version if you want. – ESkri Aug 30 '23 at 11:08