Jump to content
Sign in to follow this  


Recommended Posts


Surround them in quotes (strings are always in quotes).

Share this post

Link to post
Share on other sites

i know i dont do that on here..

My god, is this "Ask any stupid question day on the forum" And "Respond with even more stupid remarks"?

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.

Share this post

Link to post
Share on other sites

i know i dont do that on here..

Well if you did then it would make assisting you easier (I wouldn't have had to make the post, and you wouldn't have had to explain why your code has blatant errors in it).

Here you go:

$char1 = "P"
$char2 = "o"
$char3 = "s"
$char4 = "t"
$char5 = " "
$char6 = "r"
$char7 = "e"
$char8 = "a"
$char9 = "l"
$char10 = " "
$char11 = "c"
$char12 = "o"
$char13 = "d"
$char14 = "e"
$char15 = " "
$char16 = "n"
$char17 = "e"
$char18 = "x"
$char19 = "t"
$char20 = " "
$char21 = "t"
$char22 = "i"
$char23 = "m"
$char24 = "e"
$char25 = "."
$Message = $char1 & $char2 & $char3 & $char4 & $char5 & $char6 & $char7 & $char8 & $char9 & $char10 & $char11 & $char12 & _ 
$char13 & $char14 & $char15 & $char16 & $char17 & $char18 & $char19 & $char20 & $char21 & $char22 & $char23 & $char24 & $char25
MsgBox (0, "This is a message from greenmachine", $Message)

Share this post

Link to post
Share on other sites

Can you say, "concatenate"?

...but seriously, look that word up in the help file. It could use an example other than:

Some examples:

10 * 20 equals the number 200 (* is used to multiply two numbers)

10 * "20" equals the number 200

"10" * "20" equals the number 200

10 & 20 equals the string "1020" (& is used to join strings)

Edit: I know that FAQ #9 mentions how to join a string and a variable. I know that it should not be a big leap to join two variables via "&". ...but I also know that by the time I needed to do that in a script, I had forgotten the FAQ and was in the habit of searching the help file for key works - silly me, I searched for concatenate.

Don't get me wrong - it is a great help file with many man hours invested in it (...and a lot of online editors [critics]). I'm just pointing out a place in the help file where one or two more lines might help.

$var1 = "help "

$var2 = "file"

MsgBox(0, "Example", $var1 & $var2)

Edited by herewasplato


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  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.