CS3 Scripting Guide AppleScript

Shane Stanley wrote:
> No, I have no financial link with Script Debugger, but I do think that
> trying to script without it is a bit like having one hand tied behind your
> back.
>
> We've talked of doing AppleScript Pro Sessions in Amsterdam, but alas
> nothing has come of it so far. Ray did do a session for Apple over there a
> couple of years back.
Okay, I'll download the Script Debugger demo at some point and give it
a run, but I'd better stick to one thing at a time at this point considering
how long it's taking me just to get through the ID Scripting Guide. I have,
however, managed to get beyond Chapter 2, and have renamed this topic
accordingly.
Thanks,
Roy

Shane Stanley wrote:
> BOMs tend to matter only when you're moving stuff between systems
> using
> different endian processors, eg Intel vs PPC. It's a pity in a way
> that BOMs
> aren't used more widely, but much of the industry seems stuck in
> good-enough
> mode with ASCII variants. if you're not seeing text get garbled,
> you're
> fine.
I did get some garbled text the other day, but I don't think it was a
BOM issue. Setting the TextWrangler encoding preferences for Little-
Endian seems to occasion some problems, mainly undesired alerts, so I
changed them back to Western (Mac OS Roman). As far as I can remember,
I needed Little-Endian only for doing something with ID tagged text
that I'm now done with for the time being.
Hey, here's one I managed to do on my own:
tell application "Adobe InDesign CS4"
activate
set myDocument to make document
set myMarginPreferences to margin preferences of myDocument
set bottomMargin to bottom of myMarginPreferences
set bottomYPoint to (page height of document preferences of
myDocument) - bottomMargin
set rightMargin to right of myMarginPreferences
set rightXPoint to (page width of document preferences of myDocument)
- rightMargin
tell page 1 of myDocument
set myTextFrame to make text frame with properties {geometric bounds:
{top of myMarginPreferences, left of myMarginPreferences,
bottomYPoint, rightXPoint}}
select insertion point -1 of myTextFrame
end tell
end tell
I suppose that's what you'd call trivial, but I didn't have it before
and now I do - assigned to cmd-n, understandably.
It wasn't easy for me and I blew too much time on it. I think the main
problem was that I kept hitting this point:
tell application "Adobe InDesign CS4"
activate
set myDocument to make document
set myMarginPreferences to margin preferences of myDocument
tell page 1 of myDocument
set myTextFrame to make text frame with properties {geometric bounds:
{top of myMarginPreferences, left of myMarginPreferences, (page height
of document preferences of myDocument) - (bottom of
myMarginPreferences), [...]}}
at which it would keep telling me:
Canât make «class marb» of «class impp» of document "Untitled-
[n]" of application "Adobe InDesign CS4" into type number.
I couldn't figure out what was going on there, and still can't. There
wasn't any problem with top of myMarginPreferences. bottom of
myMarginPreferences had to be a number, in order to work with top of
myMarginPreferences which evidently was text, and, uh... confused again!
Oh... top of myMarginPreferences is text, while
page height of document preferences of myDocument is a number, right?
If so, that doesn't seem to be intuitively evident, exactly.
Thanks,
Roy

Similar Messages

  • Scripting Guide referenced scripts

    All over the CS3 scripting guide there are parts of scripts and it says
    in parentheses (for the complete script, see ...). Where do I find these
    scripts that are being referenced to?

    Hi Fred,
    You can download the scripts from here:
    http://wwwimages.adobe.com/www.adobe.com/products/indesign/scripting/downloads/indesign_cs 3_guide_scripts.zip
    Kasyan

  • Obtaining permission to print Scripting Guide

    Hello,
    My (soft) copy of the Photoshop CS3 Scripting Guide says on the copyright page that:
    >NOTICE: All information contained herein is the property of Adobe Systems Incorporated. No part of this publication (whether in hardcopy or
    electronic form) may be reproduced or transmitted, in any form or by any means, electronic, mechanical, photocopying, recording, or
    otherwise, without the prior written consent of Adobe Systems Incorporated.
    I would like to have this manual printed in hard copy form (a single copy, for my own personal use), which means I must obtain written permission to do so. Does anyone have any information about whom I should contact to get permission to print the manual?

    Hello,
    My (soft) copy of the Photoshop CS3 Scripting Guide says on the copyright page that:
    >NOTICE: All information contained herein is the property of Adobe Systems Incorporated. No part of this publication (whether in hardcopy or
    electronic form) may be reproduced or transmitted, in any form or by any means, electronic, mechanical, photocopying, recording, or
    otherwise, without the prior written consent of Adobe Systems Incorporated.
    I would like to have this manual printed in hard copy form (a single copy, for my own personal use), which means I must obtain written permission to do so. Does anyone have any information about whom I should contact to get permission to print the manual?

  • [AS] Versioning to preserve CS3 scripts in CS5

    Hi everyone,
    I've been reading through the thread about what has changed for scripting InDesign CS5. I have been writing scripts for CS3 for about a year and we are upgrading in the new year. I have the demo of CS5 loaded so I can test how the scripts i've written will or won't run.
    Someone indicated in that "what's different" thread that you can "version" the scripts so that they will run in newer versions without having to rewrite the parts of the syntax that have  changed.
    Can someone elaborate on how to do this with AppleScript?
    I put
    tell application "Adobe InDesign CS5"
    set version of script preferences to "5.0"
    at the beginning of the script (and changed all instances of CS3 to CS5 in the script as well) but the script is still not working as with CS3.
    Is there something else I need to do to get CS5 to recognize the syntax of CS3 and understand the commands?
    Thanks

    You will want to set the version back at the end of the script too.
    To deal with the syntax issues, you can wrap the relevant code in:
    using terms from application "Adobe InDesign CS3"
    end using terms from
    You can use the "publish terminology" command to make a dummy dictionary-only version of CS3 so you don't need both versions running; how to do it is documented in the InDesign CS5 Scripting Guide.
    For scripts you run from the Scripts panel, you don't need to make any changes -- just enclose them in a folder called "Version 5.0 Scripts".

  • AME-specific scripting guide

    Hi, I see plenty of references in this forum to people scripting AME, but I can't find the promised doc for the AME-specific subset of Extend Script anywhere.
    In the "Adobe Introduction to Scripting" pdf, in the section "More information about scripting", we are told:
    "Each scripting language contains many more devices and techniques for adding power and complexity to
    your scripts. To continue learning how to script your Adobe applications, please refer to the Adobe
    scripting guide for your application."
    Is there any such documentation? 
    If not, how do folk on this list work this out?
    Many thanks
    Peter

    @Jeff – don't know if there is a specific scripting guide for InDesign CC.
    For news of new methods, properties and objects in the DOM (Document Object Model) in ExtendScript (Adobe's implementation of JavaScript) with InDesign see:
    Marc Autret:
    So What's New in InDesign CC Scripting DOM
    http://www.indiscripts.com/post/2013/06/so-what-s-new-in-indesign-cc-scripting-dom
    Another valuable reference (not covering CC but also InDesign CS6) is:
    http://www.jongware.com/idjshelp.html
    For learning ExtendScript you will find useful:
    1. Learn about "core" JavaScript (there are plenty of useful courses floating around in the web)
    2. Buy yourself a book like Grant Gamble's "InDesign CS5 – Automation Using XML & JavaScript"
    and experiment with your own InDesign files and code snippets from that base on…
    3. Find a collegue or some friends who also want to learn about it and do some learning sessions together
    4. Visit this forum a lot and browse through older threads. Most threads are about ExtendScript.
    Where did you hear that Adobe wants to phase out AppleScript on its products?
    Flash based extensions and related to that "ActionScript" will be phased out next year for building Extensions for CC applications. It will be replaced with [HTML5, CSS and JavaScript] for building widgets. PhotoShop CC will be the first product where we will see this (maybe around mid 2014); others will follow.
    Maybe you read about the abbreviation "AS" in this regard; which for some people is "AppleScript" and for some people it is "ActionScript". Don't confuse the two scripting languages.
    Uwe

  • [ID CC] Is there a specific scripting guide for CC?

    Hi,
    I was looking for the scripting guide (both applescript and Javascript) for ID CC, but all I see is the CS6 version. Is that normal? I know there isn't that much new between the two version, but it would be nice to have the updated guides.
    Also, I had heard that the Applescript language was going to be fased out. Meaning, no new feature would be supported and things that changed would break current code in future version of the software. Is there any thruth in this? I'm a fairly novice applescripter and I can't even read Javascript, so I was wondering if I need to try to learn Javascript ASAP or if I'll be able to go by with my applescript.
    Thanks for any input.
    Jeff

    @Jeff – don't know if there is a specific scripting guide for InDesign CC.
    For news of new methods, properties and objects in the DOM (Document Object Model) in ExtendScript (Adobe's implementation of JavaScript) with InDesign see:
    Marc Autret:
    So What's New in InDesign CC Scripting DOM
    http://www.indiscripts.com/post/2013/06/so-what-s-new-in-indesign-cc-scripting-dom
    Another valuable reference (not covering CC but also InDesign CS6) is:
    http://www.jongware.com/idjshelp.html
    For learning ExtendScript you will find useful:
    1. Learn about "core" JavaScript (there are plenty of useful courses floating around in the web)
    2. Buy yourself a book like Grant Gamble's "InDesign CS5 – Automation Using XML & JavaScript"
    and experiment with your own InDesign files and code snippets from that base on…
    3. Find a collegue or some friends who also want to learn about it and do some learning sessions together
    4. Visit this forum a lot and browse through older threads. Most threads are about ExtendScript.
    Where did you hear that Adobe wants to phase out AppleScript on its products?
    Flash based extensions and related to that "ActionScript" will be phased out next year for building Extensions for CC applications. It will be replaced with [HTML5, CSS and JavaScript] for building widgets. PhotoShop CC will be the first product where we will see this (maybe around mid 2014); others will follow.
    Maybe you read about the abbreviation "AS" in this regard; which for some people is "AppleScript" and for some people it is "ActionScript". Don't confuse the two scripting languages.
    Uwe

  • Photoshop Scripting GuideのP139.EPSのパラメータ

    Photoshop Scripting GuideのP139でEPSOpenOptionsオブジェクトのプロパティと設定できる値の一覧がありますが、
    OpenDocumentMode.GRAYSC
    OpenDocumentMode.ALE
    となっているのは
    OpenDocumentMode.GRAYSCALE
    の間違い?

    再インストールしても結果は同様でしょうか。
    場合によってはCreaner Toolを実行してみることも有効です。
    CC Cleaner Tool を使用してインストールに関する問題を解決 | CC、CS3-CS6

  • How to retrive ip address of connected device in shell script or applescript

    Hi all,
    From Mac PC, how to get ip address of connected device in shell script or applescript.
    there is any way to launch an app on ipad in shell script or applescript.
    thank you in advance for your help
    Mickael

    Hi all,
    From Mac PC, how to get ip address of connected device in shell script or applescript.
    there is any way to launch an app on ipad in shell script or applescript.
    thank you in advance for your help
    Mickael

  • How to do multiple shell scripts in AppleScript

    I got some solutions from previous posts on how to run sudo in Applescript, but there is still some minor syntax issues when I try to get to the destination directory. Usually in shell script I just type
    cd directory-destination
    in several lines to batch process those commands, but when I work with applescript, if I do do shell script for every "cd" command, instead of getting an overall result, I would get intermediate results individually.
    I read doc and learned that there might be a way to put commands together by using the & sign?
    Message was edited by: ttback

    An individual do shell script command runs in its own shell, so to perform multiple commands within that shell you need to combine them into a single statement. You can use the ampersand '&' operator to concatenate text strings, and the semicolon ';' to separate the commands, for example:set theFolder to "/Applications"
    do shell script "cd " & theFolder & "; ls -l ."See the technical note do shell script in AppleScript.

  • InDesign Scripting Guide/Apple Script

    The command
    set myTop to top of margin preferences of myPage
    described in the InDesign Scripting Guide doesn't work with Indesign CS2. Does anyone can help?
    Thanks

    Hi Morenga 65,
    Try:
    tell margin preferences of myPage
    set myTop to top
    end tell
    But, as Dave says, do come to the Scripting Forum--there's lots of good stuff there!
    Thanks,
    Ole

  • HT2488 How do I create a workflow in Automator or a script in AppleScripts to download an excel file from a specific webpage?

    I would like to create a workflow in Automator or a script in AppleScript (or a combination of the two), that opens Safari to a specified page and downloads an excel file from this page and saves the downloaded document to my desktop.
    Is this something that be done? If so, how?
    I have so far been able to build a workflow in Automator to open Safari and added an AppleScript that takes Safari to a specific page that has an Excel document.
    I can't figure out where to go from here... Any help would be apprecitated.
    Thanks!

    Would you have the web address the excel sheet is on?
    Is there a simular web page you could point to if not?
    Would there be a copy of the file on an FTP page.  This would be easier. 
    curl
    http://www.cyberciti.biz/faq/mac-os-x-terminal-download-file/
    http://www.thegeekstuff.com/2012/04/curl-examples/
    http://curl.haxx.se/docs/manpage.html
    Macintosh-HD -> Applications -> Utilities -> Terminal
    # Press return to run a command.
    the curl is a terminal command ( Unix ).  It allows you to read a file off of the web.
    man curl
    provides cryptic information on the commnad curl.
    press the space bar to advance  a page.
    press letter to q to quit.
    What you may have to is to read in the web page as a text file.  Go "fishing" through the page to find the excel file you need.  Once you find the file, you can use curl to read the file.
    curl is a very full featured command.  (read complex to figure out ).
    It is easier to diagnose problems with debug information. I suggest adding log statements to your script to see what is going on.  Here is an example.
        Author: rccharles
        For testing, run in the Script Editor.
          1) Click on the Event Log tab to see the output from the log statement
          2) Click on Run
        For running shell commands see:
        http://developer.apple.com/mac/library/technotes/tn2002/tn2065.html
    on run
        -- Write a message into the event log.
        log "  --- Starting on " & ((current date) as string) & " --- "
        --  debug lines
        set desktopPath to (path to desktop) as string
        log "desktopPath = " & desktopPath
        set unixDesktopPath to POSIX path of desktopPath
        log "unixDesktopPath = " & unixDesktopPath
        set quotedUnixDesktopPath to quoted form of unixDesktopPath
        log "quoted form is " & quotedUnixDesktopPath
        try
            set fromUnix to do shell script "ls -l  " & quotedUnixDesktopPath
            display dialog "ls -l of " & quotedUnixDesktopPath & return & fromUnix
        on error errMsg
            log "ls -l error..." & errMsg
        end try
    end run

  • Scripts for CS6 Scripting Guide

    The link in the PDF document "Adobe InDesign CS6 Scripting Guide:Javascript" is broken and I can't find the file with the example javascripts. 
    Can you help?
    /f

    http://www.adobe.com/devnet/indesign/documentation.html

  • I created an email script in AppleScript, but it is not working.(Read below as well)

    I created an email script in AppleScript.
    Here is the code:
    set recipentNamePrompt to display dialog "What is the name of the recipient?" default answer "Cookie Monster"
    set recipientAddressPrompt to display dialog "What is the email of the recipient?" default answer "[email protected]"
    set subjectPrompt to display dialog "What is the subject of the email?" default answer "Change Cookie Recipe"
    set contentPrompt to display dialog "What would you like to put in your message?" default answer "Cookie Monster want MORE chocolate chips in cookies!"
    set recipientName to recipentNamePrompt
    set recipientAddress to recipientAddressPrompt
    set theSubject to subjectPrompt
    set theContent to contentPrompt
    --Mail Tell Block
    tell application "Mail"
      --Create the message
              set theMessage to make new outgoing message with properties {subject:theSubject, content:theContent, visible:true}
      --Set a recipient
              tell theMessage
      make new to recipient with properties {name:recipientName, address:recipientAddress}
      --Send the Message
      send
              end tell
    end tell
    But when I type in my info, the created message is written in Chinese. Someone please help me!

    The result of a display dialog is a record that contains the properties button returned, text returned (if default answer is used), and gave up (if giving up after is used).  Since you are passing the entire record to the Mail fields, it looks like it is getting interpreted as some Unicode text.  The solution is to get rid of your intermediate prompt variables and just get the desired property (the text returned), for example:
    set recipientName to text returned of (display dialog "What is the name of the recipient?" default answer "Cookie Monster")
    set recipientAddress to text returned of (display dialog "What is the email of the recipient?" default answer "[email protected]")
    set theSubject to text returned of (display dialog "What is the subject of the email?" default answer "Change Cookie Recipe")
    set theContent to text returned of (display dialog "What would you like to put in your message?" default answer "Cookie Monster want MORE chocolate chips in cookies!")

  • Adobe Premiere Scripting Guide

    Hello, I have to write some scripts for Premiere. It will import, cut and set rendering. I can do it in after effects, because there is Adobe After Effects Scripting Guide for CS6.pdf , but I cant find anything similar for Premiere But scripting in premiere is possible. I can find some commands in Data Browser in ExtendScript Toolkit editor, but I dont know how can I use it. (Import, edit etc.) Is for Premiere any scripting manual ? If not, why? Scripting in Premiere is not official supported? Thanks.

    yeah it took me half a day to find out that all the stuff is in the data browser
    so that's what i found out yesterday:
    you can add an array of files like this:
    var myFiles = ["C:\\'theFilePath'\\File.mov", "C:\\'theFilePath'\\File2.mov", ...];
    app.project.importFiles(myFiles);
    and all files will be added to the project browser.
    also you can add a sequence to the project like this:
    app.project.createNewSequence("nameOfTheSequence","xxx");
    I don't know which param I had to choose for the "xxx", but it works if you set it empty.
    I'm currently looking for adding the files to the sequence, but I have to try some stuff till i find it out.
    Let me know if you find out something new

  • Trouble porting CS3 script to CS5

    Hi:
    I'm having difficulty porting some of my CS3 scripts over to CS5. It seems I'm having problems placing graphics in rectangles.
    On the following script:
    tell application "Adobe InDesign CS5"
    activate
    set newDoc to make document
    tell newDoc
    tell document preferences
    set page width to 8.5
    set page height to 11
    end tell
    make rectangle with properties {geometric bounds:{1.75, 1.5, 3.5, 4.375}, fill color:swatch "Black", fill tint:0, stroke weight:0.5, stroke color:swatch "Black", stroke tint:0, label:"ImageBox"}
    set tempPDF to "Macintosh HD:Users:someuser:Desktop:temp.pdf"
    tell rectangle "ImageBox"
    place tempPDF
    end tell
    end tell
    end tell
    it draws the rectangle but I get an error saying it doesn't understand the "place" message.
    Has something changed in how you load a graphic into a rectangle?
    Thanks.
    --jon

    Hi jon,
    Instead of setting the label property, set the name property. Then your script should work.
    Thanks,
    Ole

Maybe you are looking for

  • Data collection failing

    LMS 4.1 W2k8 R2 I recently installed 17 stacks of 3560V2 switches at a site and added them to LMS4.1.  What I have found is that data collection is failing for all but the top switch in the stack.  In other workds, in some cabinets I may have 4 switc

  • Success with iCloud!

    Hello, I've finally cracked the code with iCloud and word processing.  The answer, at least for now, is that the problem is not iCloud.  The problem is in Pages, which requires a manual update to iCloud.com at every session.  Now that I've changed to

  • How to clear two dimension array and content in JTextArea

    hi all.... i have a problem to clear the counter in JTextArea..currently i design a program to store all the student details in two dimensian array...when i click "RESET"button..it will only reset the textarea..but can not clear the actual content in

  • Raid Drives on SATA shows BADMBR

    I configured my two Seagates on the Promise SATA connectors as "stripe" and even "mirror" and it was fine within the Promise Bios. When I get into Windows XP Professional and start my Partition Magic 8, it shows the drives as "yellow" color and "BADM

  • How can i get list for FORMID against Form name

    Hi, I need list of Forms and its form id against it . Regards , Ganesh