Hello
How can i use the " in my scripts for eample i want to use " in my message text![]()
thanks![]()
Professional Software Development Tools
Hello
How can i use the " in my scripts for eample i want to use " in my message text![]()
thanks![]()
Preceed it with a slash \"
Or,
Code:'They said, "hello all!", can you believe that?'
Intrigued
or:
Code:strText = [[And I said, "Hello"!]];
or...
Code:Dialog.Message("", "''Hey you! STOP!''")
Intrigued
Also...Originally Posted by Brett
This brings up a "bug"?
The bracks are all colored red, save for one. (second to last one)
That was a bug a ways back wasn't it?
Intrigued
yeah, the last one is black...![]()
-- \### represents the ASCII character
strText = "Worm says, \034Hello\034";
Last edited by Worm; 03-18-2006 at 03:55 AM.
Code:function quoteText(strText) return (String.Replace(strText, "'", "\"", false)); end Dialog.Message("A message for you:", quoteText("Corey says 'Hello!'"));![]()
Thanks a lot![]()
![]()
![]()
![]()
what caracter can i use instead of "\\" ?
thanks![]()
All showing off aside, the best way to use a quote is to simply escape it with a slash. so anywhere you want a quotation mark in the string just proceed it with a backslash, the backslash will not show up in your string when you use it...![]()
oh no but i want to use a file address in the listbox (in ItemData) for example i get the address with the Dialog.FileBrowse and save the address in a LUA file for example i get this address :
C:\Track1.mp3
but this address is showed in ams:
C:Track1.mp3
what can i do for this?
C:\\Track1.mp3
aplly for all subdirectories
like
C:\\my folder\\my folder 2\\my file.bin
One thing you could do is use the String.SplitPath action to separate the path returned by your Dialog.FileBrowse() into it's components and then include the extra "\" in a concat before display to the user.Originally Posted by Khattat
Something like this:
Code:-- Collect the list of files from the user t_ReturnedFiles = {}; t_ReturnedFiles = Dialog.FileBrowse(true, "Open File", _ProgramFilesFolder, "Text File (*.txt)|*.txt|All Files(*.*)|*.*|", "", "", false, false); -- Step through the list of returned files splitting each into its path parts -- i.e. "C:\My Document\pic.jpg" --> "C:\", "My Documents\", "pic.jpg" for index_ReturnedFiles, string_ReturnedFiles in t_Files do t_PathParts = {}; t_PathParts = String.SplitPath(string_ReturnedFiles); -- Now reassemble the separate parts adding the extra slashes -- i.e. "C:\\My Documents\\pic.jpg\" (AMS should ignore the last slash) for index_PathParts, string_PathParts in t_PathParts do string_ReturnedFiles = ""; String.Concat(string_ReturnedFiles, string_PathParts.."\"); end end -- This should leave you with a t_ReturnedFiles table that contains -- file path strings with doubled slashes
Yeah right. Who's the only one here who knows the illegal ninja moves from the government?
()))))))))o)))))))==============================================