• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
How do I run a javascript/script within an applescript?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How do I run a javascript/script within an applescript?


  • Subject: How do I run a javascript/script within an applescript?
  • From: "Patrik B." <email@hidden>
  • Date: Mon, 15 Jan 2007 12:54:14 -0800

Hi Stan

I tried your variation below but it does not compile for some reason. It
gives me an error "Expected end of line but found "." What does that mean?

I am using Script editor 2.0 (v43) Applescript 1.9.3

I remember vaguely that this used to run on my machine. Does this require a
specific scripting addition?

Best, Patrik

> tell application "InDesign CS"        do script file "G5:Cleanup.js"
> language javascript    end tell
>
> You may also replace the file reference with quoted javascript code:
>     tell application "InDesign CS"
>         do script "// this is a comment
>     var thisString = \"Hello, World.\"" language javascript
>     end tell
>
> That should get you going down the correct path, so to speak.
>
> Stan C.
>
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/mailman//archives/applescript-users

This email sent to email@hidden

  • Follow-Ups:
    • Re: How do I run a javascript/script within an applescript?
      • From: Stan Cleveland <email@hidden>
  • Prev by Date: Re: Return PDF default reader
  • Next by Date: Re: How do I run a javascript/script within an applescript?
  • Previous by thread: Re: How do I run a javascript/script within an applescript?
  • Next by thread: Re: How do I run a javascript/script within an applescript?
  • Index(es):
    • Date
    • Thread