Sign in to follow this  
Followers 0
primus

msg box question

5 posts in this topic

got another dumb question

msgbox("title", "stuff here with $variable but variables don't display")

whats the syntax for that so it gives the value of $variable?

tyty

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

$var = "Hello"

MsgBox(0,"I'm Saying", "This Is me saying" & $var)

Hi... :lmao:

Edited by smashly

Share this post


Link to post
Share on other sites

hi and woohoo, tyty

Share this post


Link to post
Share on other sites

In short, vars can't be in the string itself that way and still be expected to execute.


[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

Expanding variables in strings is an alternative method that can be used when needed.

Opt('ExpandVarStrings', 1)

$variable = "VARIABLE"
MsgBox(0, "title", "stuff here with $variable$ but variables don't display")

:lmao:

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