generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: Generating large chunks of text

Previous Thread :: Next Thread 
NXTBoy is not online. NXTBoy
Joined: 25 Aug 2008
Total Posts: 4533
18 Mar 2012 07:30 AM
I found a useful way to print out multiline text through Script.Source while in studio. Run this in command bar:

    Instance.new("BindableFunction", game.Workspace).Name = "Print"

The every time you want to test your place, run this:

     game.Workspace.Print.OnInvoke = function(n, str) local s = Instance.new("Script"); s.Name = n; s.Source = str; s.Disabled = true; s.Parent = game.Workspace end

Now, in your scripts, you can run:

    game.Workspace.Print:Invoke("Title", "Long multiline\ncontent")

And it will generate a new script with `Long multiline\ncontent` as the Source, even though `.Source` is locked!
Report Abuse
Brandonhare is not online. Brandonhare
Joined: 02 May 2007
Total Posts: 11005
18 Mar 2012 08:01 AM
Neat!
Report Abuse
Candymaniac is not online. Candymaniac
Joined: 08 Oct 2009
Total Posts: 8985
18 Mar 2012 08:24 AM
Tracking, I still don't how people could discover stuff like these...

"Knowledge talks, wisdom listens."
Report Abuse
Brandonhare is not online. Brandonhare
Joined: 02 May 2007
Total Posts: 11005
18 Mar 2012 08:32 AM
You can probably also use this to get large blocks of text too. Great for pasting lots of data without using a stringvalue.
Report Abuse
Ozzypig is not online. Ozzypig
Joined: 27 Mar 2008
Total Posts: 4906
18 Mar 2012 09:51 AM
This makes me question the security context of the thread that is calling the :Invoke() function...

...and now they'll probably fix this and everyone will be sad.
Report Abuse
Oysi is not online. Oysi
Joined: 06 Jul 2009
Total Posts: 9058
18 Mar 2012 10:23 AM
[ Content Deleted ]
Report Abuse
NXTBoy is not online. NXTBoy
Joined: 25 Aug 2008
Total Posts: 4533
18 Mar 2012 01:45 PM
> ...and now they'll probably fix this and everyone will be sad.

I don't think it's a security threat. I'm binding the `OnInvoke` handler in an elevated context, but firing it in a standard context. This only allows me to communicate between contexts. The handler doesn't persist, so there's no way of getting this elevated context when a server is running.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image