title: Logitech scripting combining keystroke and mouse click
body: <p>I'm trying to make a script that repeatedly clicks left mouse button when I hold left control key with left mouse button at the same time</p>
  
  <p>This is what I have so far:</p>
  
  <pre><code>function OnEvent(event, arg, family)
    OutputLogMessage("clicked event = %s, arg = %s\n", event, arg);
   if event == "MOUSE_BUTTON_PRESSED" and arg == 1 and Ctrl_Down == 1 then
        repeat
        PressMouseButton(1) //repeat while the left mouse button down
        until not PressMouseButton(1)
       else ReleaseMouseButton(3) //stop the repating on left mouse button up
    end
  
  end  
  </code></pre>
  
  <p>Please note this is my first time looking over this type of coding as any help is greatly appreciated</p>