title: Issue with Logitech Gaming Software macro scripting
body: <p>I tried to write a script that's just drag your mouse down when right and left mouse button is clicked. Basically it's like norecoil script for shooting game.</p>
  <pre><code>function OnEvent(event, arg)
  if event == &quot;PROFILE_ACTIVATED&quot; then
      EnablePrimaryMouseButtonEvents(true);
  elseif event == &quot;MOUSE_BUTTON_PRESSED&quot; and arg == 2 and IsKeyLockOn&quot;capslock&quot; then
      OutputLogMessage(&quot;RMB Pressed&quot;)
      repeat
          if IsMouseButtonPressed(1) then
              OutputLogMessage(&quot;LMB Pressed&quot;)
              repeat
                  Sleep(16)
                  MoveMouseRelative(0, 1)
                  Sleep(16)
                  MoveMouseRelative(0, 1)
                  Sleep(16)
                  MoveMouseRelative(0, 2)
                  Sleep(16)
                  MoveMouseRelative(1, 1)
                  Sleep(16)
                  MoveMouseRelative(0, -1)
                  Sleep(16)
                  MoveMouseRelative(0, 1)
                  Sleep(16)
                  MoveMouseRelative(-2, 2)
              until not IsMouseButtonPressed(1)
                  OutputLogMessage(&quot;LMB Released&quot;)
          end
      until not IsMouseButtonPressed(3)
          OutputLogMessage(&quot;RMB Released&quot;)
  end
  </code></pre>
  <p>With this code i'm getting OutputLogMessage in script editor but there is no mouse movement at all. I'm kind confused where i could make a mistake?</p>