Jump to content


qwerty

Member Since 28 Feb 2017
Offline Last Active Jul 26 2019 04:19 AM
-----

Topics I've Started

passing parameters to running program with read()

24 July 2019 - 07:29 AM

As the title implies I'm having trouble passing certain parameters to a running program.
The program is a simple button toggled door contriller and imo holding Ctrl-T is not a very elegant solution.
I currently don't have access to my pc so no code :( , but what i do have is the jist of it:

Declare variables
While not ex do
Write button
os.pullEvent("mouse_click")
Function exit()
If read == "exit" then
ex = true
end
If ex then break
End

As you can see by this pseudo code it is very simple, but the issue I'm having is that i can't read and detect mouse clicks at the same time. I have indeed tried coroutines and parallels but the former allways errors and the latter naver runs both.
Either way I'm willing to rewrite the read command so long as it works, and i can not stress this enough, it is extremely necessary for my intentions to be able to read while pulling events.

P.S. does anyone have the sauce for the read command? I have probed Dan's code like an Ayy in his LMAO and this tomf**kerry has me all tomf**kered out, and as anyone who works with code can tell you; getting pushed down the interdimentional soulstairs of code is exhausting!

Great thanks in advance,
-qwerty