1

In applescript can you use a list from another script eg have in one script

set example to {"A","B"}

And in another have

choose from list example 

Can this be used in the editor or does it need to be a app?

1 Answer 1

3

/tmp/a.scpt:

property example : {"A", "B"}

Another script:

set s to (load script "/tmp/a.scpt")
example of s -- {"A", "B"}
Sign up to request clarification or add additional context in comments.

2 Comments

getting error "Can’t make \"/Documents/applescript/tests/lists.scpt\" into type file." number -1700
You have to specify the path like "/Users/username/Documents/applescript/tests/lists.scpt".

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.