Did some LUA work this week just for a small personal project!

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)
end
end
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 == "G_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 IsGPressed(9)
end
end
function OnEvent(event, arg, mouse)
if (event == "G_PRESSED" and arg == 1) then
repeat
OutputLogMessage("Mouse button 1")
until IsGPressed(1)
if (event == "G_PRESSED" and arg == 2) then
repeat
OutputLogMessage("Mouse button 2")
until IsGPressed(2)
end
end

--

--

--

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

Recommended from Medium

Introducing YSQL: A PostgreSQL Compatible Distributed SQL API for YugaByte DB

7 Reasons Why Your Staging Environment Sucks

Small Talk Episode 4: Our Favorite Tech

4 Steps to properly start a software project

You don’t need a Google Cloud Platform account to learn how their products work

Phase 5 of Flatiron School — Project

The Biggest Unsolved Problems in Computer Science

Web Development with Dart is Super Easy

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

Spotify playlists for every mood of 2020

4 Reasons Why DHA Is the Dominate Omega-3

The Golden Rules of Negotiation Every Car Salesperson Should Obey

Conservation of Momentum: When a Fly Goes Fast

Speed of Light