Sign in to follow this  
Followers 0
GiulioM

I cannot insert variables in texts

6 posts in this topic

I've problems with inserting variables in text, like so: MsgBox (1, "", You've winned "$sum" dollars.")

Why? if i control w/ Syntax check prod, it says only "syntax control".

I want to obtain, for example, a window that says me: "You've winned $ 40 betting $ 10 on the horse 'Speed'."

Share this post


Link to post
Share on other sites



Missing the &:

MsgBox (1, "", You've winned " & $sum & " dollars.")
Posted Image

#fgpkerw4kcmnq2mns1ax7ilndopen (Q, $0); while ($l = <Q>){if ($l =~ m/^#.*/){$l =~ tr/a-z1-9#/Huh, Junketeer's Alternate Pro Ace /; print $l;}}close (Q);[code] tag ninja!

Share this post


Link to post
Share on other sites

Missing the &:

MsgBox (1, "", You've winned " & $sum & " dollars.")
Posted Image

Thanks. With your help i've comleted my 110-lines code for 3 coin toss in Italiano =)

Lancio della moneta.au3

Share this post


Link to post
Share on other sites

Opt("ExpandVarStrings", 1)
$sum = 20

; 3 different versions ;)
MsgBox (1, "", "You've winned " & $sum & " dollars.")
MsgBox (1, "", "You've winned $sum$ dollars.")
MsgBox (1, "", StringFormat("You've winned %s dollars.", $sum))


Programming today is a race between software engineers striving to
build bigger and better idiot-proof programs, and the Universe
trying to produce bigger and better idiots.
So far, the Universe is winning.

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

MsgBox(1, "", "You've won " & $sum & " dollars.")

Fixed up a little.

Edited by darkjohn20

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

Congratulazioni! (Translation courtesy of google :()

Edited by Fulano

#fgpkerw4kcmnq2mns1ax7ilndopen (Q, $0); while ($l = <Q>){if ($l =~ m/^#.*/){$l =~ tr/a-z1-9#/Huh, Junketeer's Alternate Pro Ace /; print $l;}}close (Q);[code] tag ninja!

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