Sign in to follow this  
Followers 0
multiloser

MsgBox Variable

3 posts in this topic

#1 ·  Posted (edited)

Sorry to ask such a stupid question...

But how can I display a message in a MsgBox which consists of text followed by a variable? and perhaps followed by more text?

Im pretty sure it is in the help file (I think I've seen it before), but I just can't find it, and the MsgBox section doesnt address it.

I've tried:

$End = $After - $Before
$s_InsertString = "You Gained  Points"
_StringInsert ( $s_InsertString, $End, -5)
MsgBox(0, "Finished", $s_InsertString)

But this just displays "You Gained Points"

(The "$End = $After - $Before" part works, don't worry)

And I've tried

MsgBox(0, "Finished", "You Gained"$End)

MsgBox(0, "Finished", "You Gained" $End)

But these result in errors.

Ermm...How?

Thanks!

Edited by multiloser

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

MsgBox(64, 'Finished', 'You Gained' & $End)

Edited by SmOke_N

[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

Share this post


Link to post
Share on other sites

MsgBox(64, 'Finished', 'You Gained' & $End)

Wow thanks!

Forgot about the ampersand ability...

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