This content has been marked as final. Show 5 replies
> In a string in lingo say word = "hello", i wanted word = "He said
> "hello" ", im not sure how to make it disregard the " " inside the
> string. In c++ you would use word = "He said \"hello\"" however in
> lingo this does not seem to work. Please help.
word="He said " & quote & "hello" & quote & " "
put "He said:" && QUOTE &"Hello" & QUOTE &"."
lol damn, ive got quite a lot of strings with quotes in them, this will take a while...
Where are your strings? In an external text file or something? If you
really have a lot, it might be worth trying to write a script able to
automate the job.
> lol damn, ive got quite a lot of strings with quotes in them, this will take a while...
> Thanks, EdwardST
Here is an example of what I mean. It may not be exactly what you need,
but perhaps gives you ideas. It is a director movie I made that has just
a single field sprite on the stage. It is editable so you can type into
it. If you right click on a word, it will become surrounded by quotes.
If you right click on a quoted word, the quotes will be removed.
The useful part of it is, that it also copies a string into your
clipboard with the quotes converted in the manner that the other posters
suggested. In other word, you won't have to manually build the strings.
So the idea is that you run this little projector along with Director.
In the utility you type the string and add the quotes. Switch back over
to the Director script you are editing and paste in the string!
I really didn't do a whole lot of testing, so there may be some quirks.
Also it may not do everything you need, for example it won't enclose 2
adjacent words in the same pair of quotes. But you could always modify
the script to support that or other useful features.
Here is the utility already published as a projector.
Here is the source dir file
Let me know if it helps. Good luck.