1

Lets say I have a variable Q set to {"a", "b", "c"} how can I make it so that AppleScript takes the items of Q and turns it into a single item so that Q is now set to {"abc"}?

  • 1
    @calum_b AppleScript questions are perfectly on-topic, no need to bounce them to StackOverflow. – nohillside Jun 14 at 17:59
1

If you have: set Q to {"a", "b", "c"}

You can then do:

set Q to (Q as string) as list
  • (Q as string) coerces the Q list {"a", "b", "c"} into a string, "abc", and as list turns the string into a list item assigned to Q.

Not necessary, but if you also add:

return Q

Just to see what it returns, it will return:

{"abc"}

Which is what you wanted.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .