1

So I'm working on a project where I need multiple functions from the text library from the AppleScript stdlib. So I do something like this:

use script "text"

-- Do some stuff with text

do shell script "echo hello"

Compiling this, however, produces an error about how an end of line was expected.

Searching through the terminology for do, shell and script produces no result.

Is there either a way to stop using a script after some time without wrapping the entire thing inside a tell statement or to prevent this behavior altogether?

0

1 Answer 1

1

From: Question

Compiling this, however, produces an error about how an end of line was expected.

Add use scripting additions after: use script "text"

From: use (scripting additions)

Scripting addition commands are handled differently if a script has use commands. If a script has one or more use commands of any kind, scripting addition commands are not available by default. You must explicitly indicate that you wish to use scripting additions, either with a use or using terms from command

From: Question

Is there either a way to stop using a script

You can use it as using terms from script "text" ... end using terms from

Have a look at: using terms from

Syntax

  using terms from ( application  |  script  | scripting additions) 
      [ statement ]... 
  end [ using terms from ]
Sign up to request clarification or add additional context in comments.

Comments

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.