Sign in to follow this  
Followers 0
Faleira

2 quick questions

5 posts in this topic

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]

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

1) msgbox(0,"","hello '"@username"'.")
output:
hello 'John Doe'.

for double quotes (") reverse the order

Edited by B3TA_SCR1PT3R

[right][font="Courier New"]...Run these streets all day, I can sleep when I die.[/font] [/right]

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

hmm, doesn't seem to work

here's wat i'm trying to do:

$pm = Stringinstr("$logging","<A href="javascript:pm")
Edited 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]

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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."""

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0