Posted 12 November 2015 - 06:13 PM
Hey! I'm kind of a newbie to programming in ComputerCraft/Lua, this is my first ever API I am actually publishing!
PositionAPI
————-
Making many things quite easier ;)/>
What the Position API does is return X and Y coordinates of different areas on the screen.
For example:
The function middle() returns the middle coordinates of your screen.
All the functions are "dynamic", as they can adapt to any computer screen.
Monitor support is coming in the near future.
Examples of some functions:
function middle() — This function returns X and Y coordinates of the middle of your screen
function bottomMid() — This function returns X and Y coordinates for the bottom middle of your screen
function topRight() — This function returns X and Y coordinates for the top right of your screen.
I could list all of them, but that'd take way too long.
I would do screenshots… but there wouldn't really be much point.
Link to the Pastebin code: vg7WTZWx
OR:
Type this in on your Computer:
To install and setup the API, run the program. It will make a directory, put itself inside of it and then reboot your computer.
To load the API within a program, type this:
I hope you enjoy! PLEASE give me feedback! I would greatly appreciate it! :lol:/>
PositionAPI
————-
Making many things quite easier ;)/>
What the Position API does is return X and Y coordinates of different areas on the screen.
For example:
The function middle() returns the middle coordinates of your screen.
All the functions are "dynamic", as they can adapt to any computer screen.
Monitor support is coming in the near future.
Examples of some functions:
function middle() — This function returns X and Y coordinates of the middle of your screen
function bottomMid() — This function returns X and Y coordinates for the bottom middle of your screen
function topRight() — This function returns X and Y coordinates for the top right of your screen.
I could list all of them, but that'd take way too long.
I would do screenshots… but there wouldn't really be much point.
Link to the Pastebin code: vg7WTZWx
OR:
Type this in on your Computer:
pastebin get vg7WTZWx position
To install and setup the API, run the program. It will make a directory, put itself inside of it and then reboot your computer.
To load the API within a program, type this:
os.loadAPI("positionAPI/position")
I hope you enjoy! PLEASE give me feedback! I would greatly appreciate it! :lol:/>
Edited on 12 November 2015 - 11:05 PM