This content has been marked as final. Show 3 replies
str = QUOTE & "line 1" & QUOTE
if str.char [str.length] = QUOTE then
put empty into str.char [str.length]
if str.char  = QUOTE then
put empty into str.char 
I added the conditional statements to insure the quotes are there and the
code won't get rid of necessary characters
Word of Mouth Productions
phone 212 928 9581
fax 212 928 9582
159-00 Riverside Drive West #5H-70
NY, NY 10032
"otterman" <firstname.lastname@example.org> wrote in message
> Ive done this before n cant remember how.
> When retreiving a line from a text doc it returns- "lineone'
> I wanna use this as a command, ie - lineone
> I put my question to you, how does one remove the " "
OK here it is,- value
example - sprite(5).member.model.shaderList = value (member("import list").line)
For future reference, here's a handler which you can use to substitute/remove any characters from any string. (put it in a moviescript).
For your purpose, you would use it like this:
newString = sub( originalString, QUOTE, "" )
Which will replace all quotes with nothing (because of the empty string in the 3rd parameter).
However - when setting an item in a model's shaderlist, you will need to set it to a value which is a reference to an actual shader in the scene (not just the name of a shader). So perhaps to make your code work, you might need something like this: (I have broken it apart into separate lines and variables, for clarity)
scene = sprite(5).member
myModel = scene.model
shaderName = member("import list").line
shaderName = sub(shaderName, QUOTE, "")
shaderRef = scene.shader(shaderName)
myModel.shaderList = shaderRef
hope this helps!