Is there a way to achieve Ruby-style, string interpolation in AppleScript? I need a flexible way of creating string patterns.
Ruby:
fn = "john"
=> "john"
ln = "doe"
=> "doe"
addresses = []
=> []
addresses << "#{fn[0]}#{ln}@company.com"
=> ["[email protected]"]
addresses << "#{fn}.#{ln}@company.com"
=> ["[email protected]", "[email protected]"]
AppleScript:
set fn to "john"
set ln to "doe"
set theAddresses to {}
# [email protected]
copy [something here] & "@company.com" to the end of theAddresses