Jump to content

How to Extract Forum Code Examples which are Placed Horizontally


Chimera Firecaster
 Share

You are about to reply to a thread that has been inactive for 477 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

I'm sure there is an easy solution to this, but I've searched and searched and can't find it.  In this Scripting forum, individuals will post samples of code in a horizontal format.  To move through the code, you click on the scroll arrows.  Here's an example: https://gyazo.com/019c3f006bc6806810470c07aed9838f.

I find it really difficult to read and understand code in this way.  What I typically do is to highlight the code from start to finish, copy it, paste it in notepad or a SL script.  Then I'll slowly parse it into separate lines as it would appear in a normal script.  But it's really a time consuming process.  

Is there some trick when dealing with horizontal code?  Any easy way to get formatted correctly?

HorizontalCode.png

Link to comment
Share on other sites

That's odd.  I agree, it would be difficult to read. The only time I've ever seen code posted like that in this forum was when Linden Lab changed from the old version of forum software to the new Invision software, about 5 (?) years ago. Some archived scripts that we had posted earlier were messed up like that.  I haven't seen any for quite a while now.

  • Thanks 1
Link to comment
Share on other sites

Yeah, those archived scripts that were messed up in the conversion are a real nuisance to work with. I've had to untangle a few of them, though not recently.  As time goes on, we'll have fewer reasons to pull up those older scripts. In the meantime, though, all we can do is be patient and reformat them manually as we need them.

  • Like 1
Link to comment
Share on other sites

1 hour ago, Love Zhaoying said:

1) Place your cursor in that "horizontal" field

2) Press "ctrl-A" to select all the text in the field, then "ctrl-C" to copy the selected text

3) Paste it into a script by pressing "ctrl-V'

It still ends up one-line on the new script, which is fine if you just want it to run, not so fine if you're trying to understand why it runs.

search replace "{" with "{\n" usually gets you a good start. I dunno if the inworld editor can do newlines, but some external ones can.

Edited by Quistess Alpha
  • Like 1
Link to comment
Share on other sites

11 minutes ago, Quistess Alpha said:

It still ends up one-line on the new script, which is fine if you just want it to run, not so fine if you're trying to understand why it runs.

search replace "{" with "{\n" usually gets you a good start. I dunno if the inworld editor can do newlines, but some external ones can.

Yeah, I've been using Notepad++ to remove and insert newlines (see a recent post about my JSON workflow).

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 477 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...