Created
June 13, 2021 01:49
-
-
Save znepb/9be39282ecc84549be341f957d3ce315 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--[[ | |
------------------------- READ ME ------------------------- | |
WARNING: THIS IS INTENDED TO BE USED AS A TOOL TO RUN LOTS | |
OF COMMANDS ON A COMPUTER QUICKLY WITH EASE. DO NOT PUT | |
THIS ON ANOTHER PERSON'S COMPUTER WITHOUT THEIR PERMISSION. | |
IF YOU GET BANNED OR SCREW UP SOMETHING REALLY BAD, | |
I AM NOT RESPONSIBLE. I WARNED YOU. | |
Warning out of the way, this is meant to be a tool. You | |
can also use this as a virus if you wish, but this was | |
made to be a tool. Basicly, use it however you'd like. | |
Just don't get yourself into trouble. | |
AGAIN: PLEASE DO NOT RUN THIS ON ANOTHER PERSONS COMPUTER | |
WITHOUT THEIR PERMISSION! THIS WILL MOST LIKELY GET YOU | |
BANNED ON THE SERVER YOU'RE PLAYING ON! | |
------------------------- READ ME ------------------------- | |
]] | |
local lines = { | |
"edit file.txt", | |
"This an example of what this program code can do.", | |
"Please read the read me at the top of the file.", | |
"Seriously.", | |
"^s" | |
} | |
local keyWaitTime = 0.1 | |
parallel.waitForAll(function() | |
shell.run("shell") | |
end, function() | |
for i, v in pairs(lines) do | |
local ignoreNext = false | |
for i = 1, #v do | |
local c = v:sub(i, i) | |
if ignoreNext == false then | |
if c == "^" then | |
os.queueEvent("key", 341, false) | |
sleep(keyWaitTime) | |
os.queueEvent("key_up", 341) | |
os.queueEvent("char", v:sub(i + 1, i + 1)) | |
ignoreNext = true | |
else | |
os.queueEvent("char", c) | |
end | |
end | |
ignoreNext = false | |
sleep(keyWaitTime) | |
end | |
os.queueEvent("key", keys.enter) | |
end | |
end) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment