Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How to retrieve script outputs? [closed]

Asked by
SanityMan 239 Moderation Voter
10 years ago

I am making a script where players can execute certain other scripts and retrieve the output from each.

--executable script example:
print("Hi")

I want to make it so that when the player runs a script, a new GUI pops up and displays the output (like "Hi"). I already have the GUI set up, I just need to know how to retrieve the data from the output in order to put it into the Text of a TextLabel. Is there a function of some sort that allows you to access the string value of a certain output line?

Thanks!

0
I know kohl's admin has this, but I have no idea how to do it. Perci1 4988 — 10y

Locked by SanityMan, Perci1, Shawnyg, and BlueTaslem

This question has been locked to preserve its current state and prevent spam and unwanted comments and answers.

Why was this question closed?

2 answers

Log in to vote
2
Answered by
BlueTaslem 18071 Moderation Voter Administrator Community Moderator Super Administrator
10 years ago

I have not used this before, but I think the LogService MessageOut event will let you read output from any script.


What may be simpler, if, for example, you can completely control the script that you are watching for output, would be to redefine the print function, with a simplistic example being

function print(...)
    workspace.Message.Text = table.join(unpack(...), " \t ");
end
Ad
Log in to vote
-3
Answered by 10 years ago

You need to use something like this http://wiki.roblox.com/index.php?title=RBX.lua.BindableFunction_(Object)

0
BindableFunctions have nothing to do with getting Lua output... Usering 135 — 10y
0
You can pass the output to another function to set the text label User#5423 17 — 10y