View unanswered posts | View active topics It is currently Sat May 25, 2013 7:38 pm



Reply to topic  [ 3 posts ] 
 How to concatenate variable value? 
Author Message

Joined: Nov 01, 2003
Posts: 117
Post How to concatenate variable value?
I suspect this is super easy and I am just missing the obvious. I have a variable called currentConditions that I would like to take its value and prepend "nt_" to it and save that result to a variable called currentConditionsArt. I hacked this Applescript below. It compiles but won't run. Error in Log says, "currentConditionsArt not defined."

Code: Select all
set a to "nt_"
set b to value of variable "currentConditions"
set value of variable currentConditionsArt to a & b


Thanks in advance for the help!


Tue Dec 20, 2011 8:10 pm
Profile
Site Admin
User avatar

Joined: Jan 27, 2003
Posts: 11698
Location: Texas
Post Re: How to concatenate variable value?
Put currentConditionsArt in quotes and it will probably work. If it doesn't then add parenthesis around (a & b).

_________________
Image


Tue Dec 20, 2011 8:55 pm
Profile WWW

Joined: Nov 01, 2003
Posts: 117
Post Re: How to concatenate variable value?
Yup, quotes did it. I really thought I had tried that... Thanks as always, Matt.


Wed Dec 21, 2011 6:03 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 3 posts ] 

Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.   Template designed by STSoftware.