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

How do you script guidelines onto a document

New Here ,
Mar 12, 2008 Mar 12, 2008
I'm new to this, but I've gone through the reference manual and scripting guide and cannot find the method that places guidelines. The description of the guideline properties is there, but I can't find the method.

Thanks in Advance.
TOPICS
Actions and scripting
676
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
Adobe
Guru ,
Mar 13, 2008 Mar 13, 2008
You wlll need scriptlistner to place guidelines. The scripting guide explains how to install and use scriptlistner.

Mike
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 ,
Mar 13, 2008 Mar 13, 2008
I tried to use scriptlistner. Looking at the log file, there does not seem to be any coherent way to see where the guides will be placed. I need to compute the location of the guide based upon the size of the document. In fact, it appears that scriptlistner generates code to execute the actions rather than generating code to reproduce the function of the action.

Is this true?

Would this not require anyone using this script to install the "listened" action sets?

Can a parameter be passed to the Action W/O interruption to set the location and direction of the guide?

What is the purpose of the "GuidelineStyleType"?
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
Guru ,
Mar 13, 2008 Mar 13, 2008
Here is a function you can use to place guides. It can be used like any function and does not need to be loaded as a action.

function setGuide(pxOffest, orientation){
var desc = new ActionDescriptor();
var desc1 = new ActionDescriptor();
desc1.putUnitDouble( charIDToTypeID( "Pstn" ), charIDToTypeID( "#Pxl" ), pxOffest );
desc1.putEnumerated( charIDToTypeID( "Ornt" ), charIDToTypeID( "Ornt" ), charIDToTypeID( orientation ) );// "Vrtc" or "Hrzn"
desc.putObject( charIDToTypeID( "Nw " ), charIDToTypeID( "Gd " ), desc1 );
executeAction( charIDToTypeID( "Mk " ), desc, DialogModes.NO );
};

setGuide(150, "Vrtc");
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 ,
Mar 14, 2008 Mar 14, 2008
After much trepidation, I got it to work. After converting it to VB script, I kept getting "Illegal arguement" exceptions. I don't know if there is a difference in syntax between it and Javascript, but there must be two spaces in the "Mk ", "Nw " & "Gd " strings for VB to work.

Thanks,

Mike Sosnoski
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 ,
Mar 14, 2008 Mar 14, 2008
Whatever software manages this forum uses, removes the necessary extra space in the quoted strings. When I posted my last message, I definitely had two spaces in the suject strings. When I copied and pasted the post, only one space is in the message. Perhaps Adobe could do something about this to keep other people from wasting a lot of time.
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 ,
Jun 28, 2008 Jun 28, 2008
LATEST
Good answer. You need to remove the necessary extra space in the quoted strings.

-------------------------------------
Mike Conrad,
Carolina Panthers Blog
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