i am trying to make a script for logitech mouse that : when i aim on a game mouse 3 and press fire the mouse goes fast down for about 0.5 secs and the rest of the time until i release the firebutton 1 it goes slower down. code:
error in line 8(sleep(1))
function OnEvent(event, arg)
if IsMouseButtonPressed(3)then
repeat
if IsMouseButtonPressed(1) then
i=1
repeat
i= i + 1
MoveMouseRelative(0,1)
Sleep(1)
until i=1000000000 or (not IsMouseButtonPressed(1))
if IsMouseButtonPressed(3)then
repeat
MoveMouseRelative(0,1)
Sleep(33)
until not IsMouseButtonPressed(1)
end
end
until not IsMouseButtonPressed(3)
end
end
This works but not with the extra 0.5s faster responce in the start
function OnEvent(event, arg)
if IsMouseButtonPressed(3)then
repeat
if IsMouseButtonPressed(1) then
repeat
MoveMouseRelative(0,1)
Sleep(33)
until not IsMouseButtonPressed(1)
end
until not IsMouseButtonPressed(3)
end
end