Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

JS: Using CS2 Scripts with CS3

New Here ,
Jan 07, 2009 Jan 07, 2009
So, we're a little behind...we're just moving from CS2 to CS3. So please bear with me. (We're using Javascipt)

Until I'm able to convert all of our scripts to CS3 compatibility, I created a "Version 4.0" folder in the scripts panel, hoping I can use our CS2 scripts as-is.

One of my CS2 scripts places a snippet on the master pages. Before, it would place by itself with no questions asked. In CS3, the snippet is a loaded cursor wanting me to click to place it. What do I need to change? This is the section of the script

//Place Master Page items
myDocument.masterSpreads.item("A-Master").place(
mcmMasterPage, //the document
[0,0], //top-left coordinate of text frame
undefined, //layer
false, //show options
false ) //autoflow
TOPICS
Scripting
863
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Jan 07, 2009 Jan 07, 2009
That folder name should be "Version 4.0 Scripts" without the quotes.

I can't see what's wrong with your code, although that first parameter ought to be the snippet file. But given your description of your problem, I'm guessing that it is.

Dave
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jan 08, 2009 Jan 08, 2009
My folder is named Version 4.0 Scripts. And, yes..."mcmMasterPage" is the snippet (there is a variable at the top of the script).
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jan 12, 2009 Jan 12, 2009
If anyone has suggestions for this, I'd really appreciate it. I'm at a loss.

Basically, I have a "document setup" script that does several things for all of our InDesign users when they start on a document. One of the things it does is place several objects in specific locations on the master pages. I used a snippet so that all of the objects can be placed at once, in the proper place. With CS3, the CS2 script works fine except that the snippet doesn't place without the user having to click.

If there is a better way to accomplish what I want to do, that's fine. But I don't know what that is. (Do I have to have the script place each object individually? Yuck.)

Lisa
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Jan 12, 2009 Jan 12, 2009
Lisa,

Have you tried just using the first two parameters in your call to place? The rest don't seem to do much the way you have them.

Dave
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jan 12, 2009 Jan 12, 2009
Hi Dave,

Just tried, it didn't make any difference.

I also just tried placing a snippet (using ctrl+D rather than running a script) in both CS2 and CS3. And that behavior alone is different. In CS2, it just places in its original location. In CS3, it's a loaded cursor I have to click. I even changed the preference under file handling to place snippets in original location. But that didn't work. Maybe there is another new preference setting in CS3 that I'm missing? If so, I can't find it.

I'm beginning to think it isn't a script issue, but a difference between CS2 and CS3 in how snippets are handled.

Lisa
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Jan 12, 2009 Jan 12, 2009
Lisa,

I'm confident that I have placed snippets using CS3, so don't give up. I'm in the middle of a crisis at the moment with two of my four machines failing, so I'm not able to dig out any sample code right now. As soon as I can, I'll post an example, if you haven't sorted it out yourself by then.

Dave
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jan 12, 2009 Jan 12, 2009
The search field in ESTK CS4 is great! I just typed in snippet, and this
is what I got:

DocumentPreference.snippetImportUsesOriginalLocation
Data Type: Boolean
Adobe InDesign CS4 (CS4) Object Model
If true, causes UI-based snippet import to use original location for
page items.

Sounds like that's what you need...

--
Harbs
http://www.in-tools.com
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jan 13, 2009 Jan 13, 2009
Dave--No worries. I appreciate your help, and good luck with your crisis.

Harbs--I'll try your suggestion, but I'm technically writing a CS2 script, and I don't think that preference existed then. Plus, I've set that preference as a default in the application (CS3), and even placing a snippet without the script wants me to click.

For now, users will just have to click on the master page to place the snippet and move on. I'm going to keep trying to figure it out though.

Lisa
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jan 13, 2009 Jan 13, 2009
LATEST
Hi Lisa,

Sorry. I just checked, and this preference is new to CS4 (whatever it
does...)

Two suggestions:

1) Try pacing the snippet into a page item instead of directly on the
page. There should be no need to click then.
2) Why not just reconstruct the snippet programmatically (if you're
doing it with a script anyway).

--
Harbs
http://www.in-tools.com
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines