View unanswered posts | View active topics It is currently Wed May 22, 2013 2:33 am



Reply to topic  [ 5 posts ] 
 Edit/Combine Text Variables? 
Author Message

Joined: Nov 26, 2009
Posts: 924
Location: Kalispell, MT
Post Edit/Combine Text Variables?
Hey,

I have 3 variables that I'd like to combine to populate a 4th variable.
e.g. Variable1 "Snow showers", Variable2 "35", Variable3 "25"
to Variable4 "Snow showers 35/25"

Could anyone point me to a script to get me in the right direction?

Thanks,

Carl


Sat Mar 05, 2011 12:43 pm
Profile

Joined: Mar 09, 2008
Posts: 183
Post Re: Edit/Combine Text Variables?
Code: Select all
set variable1 to "Snow showers"
set variable2 to "35"
set variable3 to "25"
set variable4 to variable1 & " " & variable2 & "/" & variable3


Sat Mar 05, 2011 1:19 pm
Profile

Joined: Nov 26, 2009
Posts: 924
Location: Kalispell, MT
Post Re: Edit/Combine Text Variables?
Thanks Bill. Not sure if I'm getting this.

I have 4 variables:
Yahoo_tomorrow_forecast Snow showers
Yahoo_tomorrow_max_temp 35
Yahoo_tomorrow_min_temp 25
Forecast_Short (hopefully combined text)

and am running this:

set Forecast_Short to Yahoo_tomorrow_forecast & " " & Yahoo_tomorrow_max_temp & "/" & Yahoo_tomorrow_min_temp

which is not working.

Tried this as well:

tell application "IndigoServer"
    set Forecast_Short to (value of variable "Yahoo_tomorrow_forecast") & " " & (value of variable "Yahoo_tomorrow_max_temp") & "/" & (value of variable "Yahoo_tomorrow_min_temp")
end tell


Any help?

Thanks,

Carl


Sat Mar 05, 2011 5:04 pm
Profile
User avatar

Joined: Nov 18, 2008
Posts: 1721
Location: Berkeley, CA
Post Re: Edit/Combine Text Variables?
ckeyes888 wrote:tell application "IndigoServer"
    set Forecast_Short to (value of variable "Yahoo_tomorrow_forecast") & " " & (value of variable "Yahoo_tomorrow_max_temp") & "/" & (value of variable "Yahoo_tomorrow_min_temp")
end tell
try this...
tell application "IndigoServer"
    set the value of variable "Forecast_Short" to (value of variable "Yahoo_tomorrow_forecast") & " " & (value of variable "Yahoo_tomorrow_max_temp") & "/" & (value of variable "Yahoo_tomorrow_min_temp")
end tell


Sat Mar 05, 2011 6:14 pm
Profile

Joined: Nov 26, 2009
Posts: 924
Location: Kalispell, MT
Post Re: Edit/Combine Text Variables?
Perfect. Many thanks!

Carl


Sat Mar 05, 2011 11:21 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 5 posts ] 

Who is online

Users browsing this forum: No registered users and 0 guests


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.