Skip to main content
Filter by
Sorted by
Tagged with
-1 votes
0 answers
12 views

How can APIs be effectively utilized to create custom tools or add-ons? [closed]

How can I effectively use APIs in online games to create custom tools or add-ons? I'm particularly interested in understanding the best practices for integrating these APIs while ensuring they enhance ...
mmonster's user avatar
0 votes
0 answers
60 views

i with the lua script in the logitech g hub program

Tell me how can I make my script run indefinitely when I hold down the left mouse button until I release the left mouse button. I tried using chatgpt, but it gave crooked answers and nothing worked. ...
tommy's user avatar
  • 1
0 votes
1 answer
188 views

Logitech G-hub lua script

Is it possible to find a workaround for this? I know that M and N are no G-Keys but I would like to to have two different key sequences depending on the last key input I have no idea where to start to ...
thpii's user avatar
  • 1
0 votes
0 answers
29 views

inverted function of the script

I want to invert the function of the script, so that 'q' and 'w' are safe in the mouse 5 function OnEvent(event, arg, family) if event == "MOUSE_BUTTON_PRESSED" and arg == 5 then -- mouse ...
Filipe Cleiton's user avatar
0 votes
0 answers
68 views

capslock on press mouse 4 logitech game software script

logitech script that when I activate caps lock keeps mouse pressed 4, and stops when I deactivate capslock ......... logitech script that when I activate caps lock keeps mouse pressed 4, and stops ...
Filipe Cleiton's user avatar
1 vote
0 answers
208 views

Lua scripting being used in mouse macro. (logitech)

I have a Lua script for Logitech G Hub that moves my mouse for me. It's set to use MB4 for that. I want to remap MB5 to press shift, mb4. But when I have the script running and press MB5, it only ...
newguy's user avatar
  • 11
0 votes
0 answers
43 views

Ghub buggy on g600?

I recently discovered the world of lua and I'm testing simple macros to improve the language. When I discovered that GHUB uses lua to make scripts, I tried to do something simple to hold recoil in any ...
Zend's user avatar
  • 1
0 votes
1 answer
157 views

How to combine two logitech scripts?

Im trying to put the following 2 scripts together so that they can run at the same exact time. function OnEvent(event, arg) if EnableRCS ~= false then if IsMouseButtonPressed(3) then -- ...
censori's user avatar
0 votes
0 answers
107 views

logitech ghub can not run old script from LGS

I been using this script for LGS ( Logitech gaming software) and it was working well all the time. but then I have to replaced my old mouse g502 to G502x which only support by G HUB. now when I run ...
Cv Manise Furindo's user avatar
0 votes
1 answer
94 views

holding shift to toggle the mouse buttons in lua?

I'm a completely noob at Lua. I've been playing around with it in g-hub for a Logitech mouse and I figured out how to make it notice if shift is held down while the script is run, but I'm pretty far ...
Orionox's user avatar
0 votes
1 answer
54 views

Check a physical state of a mouse button?

I'm currently using a workaround script for burst fire using the "p" key of the keyboard because I want to use the left mouse click to shoot in auto/burst mode, for this i call the action ...
xsaikou's user avatar
0 votes
0 answers
143 views

lghub lua script presskey

I dont really know how to code lua, i made a script, when "Numlock" is on the script clicks "a" for a random time duration, then releases "a" and it presses "s" ...
Bread's user avatar
  • 1
0 votes
0 answers
127 views

LGHUB Lua script

I dont really know how to code Lua, I made a script, when "Numlock" is on the script clicks "a" for a random time duration, then releases "a" and it presses "s" ...
Bread's user avatar
  • 1
0 votes
0 answers
63 views

Immediately break the loop when condition is not met and go to next line

EnablePrimaryMouseButtonEvents(true); function OnEvent(event, arg) if IsKeyLockOn("numlock" )then if IsMouseButtonPressed(3)then repeat if ...
net's user avatar
  • 31
0 votes
0 answers
85 views

How to make code work together ? lua script

How to make the code correctly, so that the recoil is canceled out, and the button is held down together with "q"? EnablePrimaryMouseButtonEvents(true); function OnEvent(event, arg) if ...
Сиеста Соб's user avatar
0 votes
0 answers
111 views

Lua script code doesn't work on Battlefield1

Trying to use this simple recoil reducer lua script code. But in game, cursor doesn't move in x axis. It kinda stucks in y axis. EnablePrimaryMouseButtonEvents(true); function OnEvent(event, arg) ...
Yeeeet's user avatar
  • 1
0 votes
0 answers
47 views

loop is not repeating and won't stop

EnablePrimaryMouseButtonEvents(true); function OnEvent(event, arg) if IsKeyLockOn("numlock" )then if IsMouseButtonPressed(1) then Sleep(50) ...
net's user avatar
  • 31
0 votes
0 answers
170 views

How can I detect if my GHUB profile is in G-Shift mode within a LUA script?

I have a LUA script on my profile, but I only want it to execute when the profile is G-shifted. Is there some GHUB Lua api for detecting that? I don't see anything in the G_series_Lua_API.pdf i.e. if (...
Levi Star's user avatar
0 votes
0 answers
255 views

Rapid fire script in lua language

I just want rapid fire script. I want to fire with left click, but I only want it to work while holding down the right click button. I want 125ms between each left click (firing) It also requires some ...
NoName UÇAR's user avatar
0 votes
1 answer
102 views

How do I make a script that can run through a list of functions that I can stop at will? Lua 5.1 LGS

So I am using LGS to write macro scripts and I am trying to make a script that I can stop without having to run through then entire script. Assume a very, very long script. Normally, the script would ...
Silver_Wolf's user avatar
-1 votes
1 answer
448 views

Lua script for g502 hero , loop until key press again

I need Lua script start when I press M4 button on mouse press keys but I need this in loop until I press M4 again. -- NOT HOLD - PRESS AGAIN -- here is my code; local M4_pressed = false function ...
Mert Malaves's user avatar
-1 votes
1 answer
94 views

What can I do to stop running the script when I release the left button?

EnablePrimaryMouseButtonEvents(true); function OnEvent(event, arg) if IsKeyLockOn("capslock") and IsMouseButtonPressed(1) and IsMouseButtonPressed(3) then repeat ...
Yingg's user avatar
  • 1
-2 votes
1 answer
95 views

need help changing logitech script

i have this script that want to change capslock button to on/off without holding lctrl to activate. Who can help me? Thank you everyone function OnEvent(event, arg) if IsModifierPressed("...
2XuActive's user avatar
-1 votes
1 answer
268 views

Logitech Lua detect double click or hold

I'm attempting to make a Lua script with Logitechs API that will detect when I hold the dpi shift button on my mouse and then simulate a keypress. However, I cant find the right function to tell if ...
Caden's user avatar
  • 1
0 votes
1 answer
166 views

GHUB Lua - Slow Mouse Movement Function

I am trying to create a local function in Lua (GHUB) to move the mouse to a specific coordiinates on the screen. However the pointer moves suddenly at the end of the function call ... and does not ...
Nidark Nidark's user avatar
1 vote
1 answer
478 views

Teachers, I have a question about Logitech g-hub

The problem with the script that's out now is that I hope it will continue to be pressed randomly while I'm pressing the button. But if I keep pressing this button "8," it will only be ...
전주뽀짝's user avatar
0 votes
1 answer
672 views

How do I make an Auto Clicker Macro in Lua script inside Logitech ghub? please

The code works completely, but I need it to work on button 1?. I changed the buttons for place 5 to 1, it doesn’t work. EnablePrimaryMouseButtonEvents(true) function OnEvent(event, arg) if event ==...
Сиеста Соб's user avatar
0 votes
1 answer
485 views

Sequences of two button presses. Logitech G Hub lua script

The script is activated only when the right and then the left mouse button is clicked first. I need to be able to activate the script by any sequence of pressing these two buttons. I tried putting (...
Danil Kravchenko's user avatar
-1 votes
1 answer
252 views

Lua script to execute commands after pressing a few keys

Today I bought a logitek g502x mouse started writing scripts (I had never written them before) I looked in different places and saw an interesting option The script that i make, does not return errors,...
Сергей Соломатин's user avatar
0 votes
1 answer
223 views

Clicker script only clicking once (Logitech Lua Scripting)

Wrote this in Lua for my Logitech mouse. It's an autoclicker script that should autoclick with intervals between clicks following a normal distribution while holding the back button. local currentTime ...
thelxix's user avatar
0 votes
1 answer
494 views

What does the error "bad argument to 'OutputLogMessage' (number expected, got nil)" mean?

I get an error stating: [string "LuaVM"]:163: bad argument #3 to 'OutputLogMessage' (number expected, got nil) Line Number:1 LOADED [string "LuaVM"]:163: bad argument #3 to '...
Hasan Raqib's user avatar
0 votes
1 answer
759 views

Using a Lua G-hub mouse click script

I want to click a mouse5 button and let a script do a loop that press a keyboard Y key with a random delay time. Until I click a mouse button5 again it must stop a loop. I have tried for a while and ...
prophetz2021's user avatar
1 vote
1 answer
3k views

Logitech Gaming Software LUA script not working on GHub

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 ...
Loriner De Syrtis's user avatar
0 votes
0 answers
768 views

Logitech G502 script changed how to activate the Lua script

PROFILE_ACTIVATED EnablePrimaryMouseButtonEvents work perfectly before Logitech Driver Update and after that Script is work but it change how to active the script, i changed to mouse 2 to 5 it still ...
zen's user avatar
  • 1
0 votes
1 answer
309 views

Inconsistent .lua script Logitech MoveMouseRelative

I am trying to create a script in .lua on GHub for my mouse. I have to make a lot of movements really quickly, inputting 10 MoveMouseRelative every second and a half. But I have found that the ...
LePomba's user avatar
0 votes
0 answers
775 views

Logitech software script

I have a script for a Logitech mouse. EnablePrimaryMouseButtonEvents(true); function OnEvent(event, arg) if IsKeyLockOn("capslock")then if IsMouseButtonPressed(3)then repeat if ...
Caleb Montalvo's user avatar
-1 votes
1 answer
1k views

- Logitech macros ! the command doesn't stop while I'm holding down the right mouse button

https://docs.google.com/document/d/1pX81q-AEn2o7n0rlpvD-GOoKCakMxqO0v8-JXPjtEnA/edit?usp=sharing ----- - here are all my LUA files here are all my Lua files! they are used in LOGitech Ghud . when the ...
Jim Raynor's user avatar
0 votes
0 answers
861 views

How to create a Logitech script to simulate rapid key presses when a specific key is held down?

I am working on a Logitech scripting project in Lua, where I need to achieve the following behavior: When I hold down the left arrow, right arrow, up arrow, or down arrow key on a non-Logitech ...
Manta Mahlknecht's user avatar
0 votes
1 answer
119 views

How could I recreate this script using only WinAPI functions?

Like the title states, I'm attempting to recreate a script I made using only standard WinAPI functions such as IsMouseButtonPressed() PressMouseButton() ReleaseMouseButton() in hopes of making it work ...
user avatar
1 vote
1 answer
726 views

Why does the 'IsKeyLockOn' function allow certain scripts to work on non-logitech mice?

Just for the sake of clarity, here's a short script that just clicks fast as long as the 2 requirements are met (is numlock on and is mouse button 5 pressed). EnablePrimaryMouseButtonEvents(true); ...
user avatar
0 votes
1 answer
418 views

How to G-ALT on Script? Logitech G213

Friend Egor Skriptunoff UPDATE local function interruptable_sleep(delay) local tm = GetRunningTime() + delay local t repeat if IsKeyLockOn("scrolllock") then return true ...
Cipri 's user avatar
0 votes
1 answer
760 views

Logitech Help Hotkey active or Disable Script

I'm new to the community and I'm a little lost as to how to resolve this issue. The idea is the following, there are 2 commands. I wanted to know how I can activate each of them separately using mouse ...
André Storch's user avatar
-1 votes
1 answer
149 views

logitech hold press lua

The loop in LGS, if I release M4, it will execute the entire process before stopping. Can someone provide me with a Lua? When I press and hold M4: key P is pressed → 100ms delay → M1 is clicked → 25ms ...
kql778's user avatar
  • 1
0 votes
1 answer
411 views

Lua (g hub api) mouse not moving

I have a problem with Lua mouse script using G hub api. Everything works except for mouse-move functions, for example MoveMouseTo or MoveMouseRelative. Even MoveMouseWheel works fine. Here is my code. ...
German's user avatar
  • 1
0 votes
1 answer
139 views

Activation key change

How do I change the activation key from scroll wheel to scrolllock? local Macro_Activation_Key = 3 local function OutputLogs(s) OutputLogMessage(s.."\n") OutputDebugMessage(s.."\n&...
Scott Smith's user avatar
0 votes
1 answer
805 views

Lua scripting for repeating mouse movements

I am trying to write a script and I am brand new to Lua and scripting as well. This will be used to click and drag (moving an item), return, click and drag again. Then press left mouse button and ...
RTL's user avatar
  • 1
1 vote
1 answer
305 views

How to move the cursor sequentially?

The problem can be divided into 2 smaller ones: ReleaseMouseButton(3) is called before the corresponding bullet is fired in the game (thus now I have coded 30 bullets, and it completes execution in ...
John House's user avatar
-1 votes
1 answer
832 views

How to get Logitech loop to work on other mouse buttons?

Having an issue with this simple loop showing up an error. For reference im using a Logitech g502 lightspeed. 1. function OnEvent(event, arg) 2. 3. if (event == "MOUSE_BUTTON_PRESSED" ...
L.Kent's user avatar
  • 1
0 votes
1 answer
90 views

LG Hub Script Non-Functional

local Macro_Start = 3 function OnEvent(event, arg) if event == IsKeyLockOn("numlock")and arg == Macro_Start then EnablePrimaryMouseButtonEvents(true); PressMouseButton(1) repeat ...
RebelTroll's user avatar
0 votes
1 answer
253 views

GHUB two functions in one lua

guys im very newbee in lua scriptings, and i hate ghub i have to say, so in short.. i want this two luas in one (1st is very simple recoil script and the 2nd is (should have been) a simple bind, like ...
cassame's user avatar

1
2 3 4 5 6