Touching up my LUA with my first big problem!

function OnEvent(event, arg, mouse)
if (event == "MOUSE_BUTTON_PRESSED" and arg == 6) then
repeat
--x, y = GetMousePosition()
--OutputLogMessage("Mouse is at %d, %d\n", x, y)
PressKey ("escape")
ReleaseKey ("escape")
PressKey ("up")
ReleaseKey ("up")
PressKey ("enter")
ReleaseKey ("enter")
until IsMouseButtonPressed(6)
end
end
function OnEvent(event, arg, mouse)
if (event == "MOUSE_BUTTON_PRESSED" and arg == 9) then
repeat
--x, y = GetMousePosition()
--OutputLogMessage("Mouse is at %d, %d\n", x, y)
PressKey ("escape")
ReleaseKey ("escape")
PressKey ("up")
ReleaseKey ("up")
PressKey ("enter")
ReleaseKey ("enter")
until IsMouseButtonPressed(9)
end
end
--Currently not working
--event == "G_PRESSED" and arg == 9
--until IsGPressed(9)

--

--

--

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

JWT: Symmetic and Asymmetic Key Authentication In ASP.NET Core

How We Set up a Private Beta Funnel Using Typeform (and increased our conversion rate tenfold!)

Terraform K8s provider auth issue

Engineered from the ground up

Salesforce Lightning Scheduler

Graphical view of coronavirus live update — Using python

git — Rebase vs Merge

The Pyramid of Goodness for Research and Development Organizations

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Parker Williamson

Parker Williamson

More from Medium

Big Man. Bigger Heart. Living Legend.

Today’s ‘Millennials Generation’ believes in living happily — Telescopes

I just spent the last several hours thinking and praying for the families that have lost loved ones…

Has Social Media Turned Us Into Idiots?