Sunday, November 19, 2017

#1 2015-03-08 01:43:52 pm

Registered: 2014-01-20
Posts: 1

Applescript Code changed after downloading

I wrote a script at work and posted it to our PC-based server. I am trying to get it from a remote login and when I open it, the code has changed. It's mostly in my "tell Indesign" statement... things like the prefs assigned to make a doc read like this:

tell application "Adobe InDesign CS6"
    --makes new doc with set properties
    set myDoc to make new document with properties {«class dcpp»:{«class pwdt»:docWidth, «class phgt»:docHeight}}
    --sets measurements to inches, just in case they're on metric
    tell «class vwpp» of myDoc
        set «class vunt» to «class zinc»
        set «class hunt» to «class zinc»
    end tell

I've downloaded scripts before and never had this problem. I recently installed Norton Antivirus on my computer and thought that might have something to do with it. I've disabled everything possible in the software and tried re-downloading my script but it does the same goofed-up script when I download it.

I was going to just re-write the portions of the script that were changed but it turns out to be a lot more than I expected.

Any ideas?

I appreciate any feedback!




#2 2015-03-08 02:04:06 pm

From:: St. Gallen, Switzerland
Registered: 2006-10-21
Posts: 11482

Re: Applescript Code changed after downloading


Script Editor displays the raw (chevron) syntax, if the target application is not available.
I'd try to recompile the script by changing the source for example insert a new line and press ⌘K (Compile).

On a PC-based system I'd save compiled AppleScripts compressed (.zip) or uncompiled as plain text

Personal note: Get rid of Norton Antivirus for Mac as soon as possible!

Last edited by StefanK (2015-03-08 02:04:36 pm)





#3 2017-11-05 08:14:55 pm

From:: Sydney
Registered: 2014-08-20
Posts: 60

Re: Applescript Code changed after downloading

Thanks Stefan,

I just updated Indesign to 2018 and had the same problem A script I wrote using Indesign 2017 now had all the Indesign terms set in chevrons. There was no way I could remember what each of them actually referred to. I tried recompiling it and opening the 2018 AppleScript dictionary in Script Debugger and reopening the script to no avail.

The simple solution turned out to be adding one line of code and recompiling. Amazing!


Last edited by davidhmorgan (2017-11-05 08:15:57 pm)



Board footer

Powered by FluxBB

RSS (new topics) RSS (active topics)