Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

What happens if you attach scripts as text?

Escort DeFarge
Together
Join date: 18 Nov 2004
Posts: 681
08-11-2007 05:33
This is just a test to see if attaching a script as a text attachment is any better than pasting it while php tag is off.
_____________________
http://slurl.com/secondlife/Together
Escort DeFarge
Together
Join date: 18 Nov 2004
Posts: 681
08-11-2007 05:33
...and it is.
_____________________
http://slurl.com/secondlife/Together
Day Oh
Registered User
Join date: 3 Feb 2007
Posts: 1,257
08-11-2007 05:48
My version of Notepad really didn't like that file... didn't interpret the newlines
Escort DeFarge
Together
Join date: 18 Nov 2004
Posts: 681
08-11-2007 06:21
Notepad sucks - try wordpad or something that is a proper text editor
If it's a pain and "not good enough" for you, then I'll just not post scripts or bother to answer questions until they fix this forum.
_____________________
http://slurl.com/secondlife/Together
Katryna Jie
Registered User
Join date: 24 Jun 2007
Posts: 187
08-11-2007 06:22
Ditto... doesn't read the new lines~
Chaz Longstaff
Registered User
Join date: 11 Oct 2006
Posts: 685
08-11-2007 06:47
easy enough to deal with....

on a Microsoft machine:

click on attachment above, it opens in notepad. click into the text. CTRL-A, CTRL-C to copy it.

Click start (or whatever we call that new bottom left clicky thing in vista), run, type in wordpad, it launches, click into it, paste.

formatting all comes through.

took 3 times longer to type than do :}
RJ Source
Green Sky Labs
Join date: 10 Jan 2007
Posts: 272
08-11-2007 06:49
FYI, works fine on the Mac using TextEdit.
Escort DeFarge
Together
Join date: 18 Nov 2004
Posts: 681
08-11-2007 07:48
Use Save to disk... and open with your fav text editor - or just change the editor that opens text files from IE/Mozilla. Don't use Notepad for ANYTHING. That file is bytecode correct. Notepad just sucks.
_____________________
http://slurl.com/secondlife/Together
Espresso Saarinen
old geek
Join date: 22 Jan 2006
Posts: 93
08-11-2007 08:47
looks ok in emacs, except 8 char tabs make it too wide. but that may be a matter of personal taste.
Debbie Trilling
Our Lady of Peenemünde
Join date: 17 Oct 2006
Posts: 434
08-11-2007 10:38
had to copy/paste to WordPad but nevertheless a good workable & simple solution..and much better than trying to read code while the php tag is off :)
Ravanne Sullivan
Pole Dancer Extraordinair
Join date: 10 Dec 2005
Posts: 674
08-11-2007 10:44
To set wordpad as your default text file editor browse to a text file on your computer. Right click and select "open with". Select "Choose Program..." and then select wordpad from the list presented, check the box that says "Always use selected program to open" and click OK. From now on Windows will use wordpad as its default for text files.
_____________________
Ravanne's Dance Poles and Animations

Available at my Superstore and Showroom on Insula de Somni
http://slurl.com/secondlife/Insula de Somni/94/194/27/
Very Keynes
LSL is a Virus
Join date: 6 May 2006
Posts: 484
08-11-2007 11:15
It opened fine in LSLEditor too, complete with formatting and colours.
And if it is saved with a .lsl extension there is no need to redefine text associations.
Escort DeFarge
Together
Join date: 18 Nov 2004
Posts: 681
08-11-2007 11:27
From: Espresso Saarinen
looks ok in emacs, except 8 char tabs make it too wide. but that may be a matter of personal taste.

It contains tab characters. Whether this renders as 8 spaces or 4 or 2 depends on YOU. An ascii tab is always 0x09. So it's not the file, it's your reader.

<RANT> This tab thing really annoy me. This is a deep IT issue and I have seen it over all sorts of IT systems. The only sensible setting for a tab is 4 spaces. The information theory perspective is that you can set a tab character to render as you wish/need, but most people like 4 spaces, and 90% of the BS is people using systems/renderers that do something other than they expect or want blame the original delivery not the fact that their system renders tabs in a stupid way. </RANT>
_____________________
http://slurl.com/secondlife/Together
Espresso Saarinen
old geek
Join date: 22 Jan 2006
Posts: 93
08-11-2007 12:24
agree with tab rant. which is why i always try to remember to change tabs to spaces before export.
Osgeld Barmy
Registered User
Join date: 22 Mar 2005
Posts: 3,336
08-11-2007 12:37
good thing to use a real program editor

like i use jedit for almost everything, php html lua lsl blah blah blah

tabs by default in that program are set to 8 spaces .... but since its designed for programing use its a simple matter of changing it to whatever you want

but again who the *$&#K needs an 8 space tab? and why is THAT default

the world may never know

ps: ive been attaching txt files for my script for quite a while now, the forums ALWAYS botches up your formatting even if you do have php or code tags, the width is never right (no matter how narrow your source is) and if you dont use spaces every x charaters it will just plop one in the most inconvenient place

so its always blown for full releases of source, but its terribly inconvenient not having it around when you just want to post a snippet or 2 to help someone out

ps ps: also the above attachment works just fine in my notepad ... weird, but i never deal with notepad becuase of that exact issue
Espresso Saarinen
old geek
Join date: 22 Jan 2006
Posts: 93
08-11-2007 12:46
From: Osgeld Barmy
but again who the *$&#K needs an 8 space tab? and why is THAT default
there used to be these things called typewriters. they had eight char tabs.
Osgeld Barmy
Registered User
Join date: 22 Mar 2005
Posts: 3,336
08-11-2007 13:24
From: Espresso Saarinen
there used to be these things called typewriters. they had eight char tabs.



ah that sorta explains it, see im 28 and have never had to use a typewriter ;)
Farallon Greyskin
Cranky Seal
Join date: 22 Jan 2006
Posts: 491
08-13-2007 00:27
There is nothing to rant about.

It's not just a typewriter, 8 spaces is THE tab size for ALL printed material and has been for like what, 150 years at least?

8 space tabs on a normal variable pitched font (used for all NON code printing) is only SLIGHTY larger than 4 spaces on a monospaced font (required for proper code reading).

So the problem isn't in the file OR the program but in the head of the user. There is no "code" tag in text files that tells a text editor that you are looking at LSL or Moby Dick. It's YOUR responsibility to open code or text in the appropriate editor, Not windows, NOT SLs, yours.

Finally, you have to understand that 99% of comptuer users edit TEXT not CODE. So the 8 space tabs are exactly what the default standard for any non code specific editor should be. And it's the way it is. Everything is the way it should be. (Except notepad not handling different line endings, that really is cheap).

We coders are supposed to be smart enough to set our machines up and use the proper editors where necessary for our funky, 4 space tabbed mono-space fonted code files. :)