Faleira Posted October 16, 2005 Posted October 16, 2005 allright, should be relatively simple, 1 is, how do i include quotations within something? for example, i'm doing a stringinstr or msgbox and i want to put quotations inbetween the text area/substring and it screws with the line of code when i do... how do i fix that? 2, is there a way to make 2 functions run at the same time? [quote]If whenever you feel small, useless, offended, depressed, and just generally upset always remember......you were once the fastest and most vicious sperm out of hundreds of millions![/quote]
B3TA_SCR1PT3R Posted October 16, 2005 Posted October 16, 2005 (edited) 1) msgbox(0,"","hello '"@username"'.") output: hello 'John Doe'. for double quotes (") reverse the order Edited October 16, 2005 by B3TA_SCR1PT3R [right][font="Courier New"]...Run these streets all day, I can sleep when I die.[/font] [/right]
Faleira Posted October 16, 2005 Author Posted October 16, 2005 (edited) hmm, doesn't seem to work here's wat i'm trying to do: $pm = Stringinstr("$logging","<A href="javascript:pm") Edited October 16, 2005 by Faleira [quote]If whenever you feel small, useless, offended, depressed, and just generally upset always remember......you were once the fastest and most vicious sperm out of hundreds of millions![/quote]
Sokko Posted October 17, 2005 Posted October 17, 2005 Two possible methods here: MsgBox(0,"","This is a message with ""quotes"" using the doubled-up method.") MsgBox(0,"",'And this message with "quotes" uses the double-quotes-within-single-quotes method.') For more detailed info, look in the help files under Language Reference > Datatypes, and scroll down to the "Strings" section.
LxP Posted October 17, 2005 Posted October 17, 2005 B3TA is close:MsgBox(0, "", "Hello '" & @Username & "'.")Remember that you can surround strings in either single or double quotes, so when you need to assign something like this to a variable (perhaps for later printing -- note the use of both quotes):And I said to him, "I'll be back."You could do it this way (as well as many others):$Var = 'And I said to him, "I' ; $Var => And I said to him, "I $Var = $Var & "'ll be back." ; $Var => And I said to him, "I'll be back. $Var = $Var & '"' ; $Var => And I said to him, "I'll be back." ; Putting them all together: $Var = 'And I said to him, "I' & "'ll be back." & '"' ; Another way (note the double-ups when we want to use the surrounding quote type within the string): $Var = 'And I said to him, "I''ll be back."' $Var = "And I said to him, ""I'll be back."""
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now