[CS4/JS] get guide position using script label

Hello Scripters,
I am trying to get the position of some specific guides of my masterspread, the following code snippet doesnt work:
     var myMasterSpread = myDocument.masterSpreads.itemByName("A-Master");
     var myX1 = myMasterSpread.guides.itemByName("Guide_left").location;
What could be wrong?
Thanks in advance for any help!
Franziska

The combination of labels and guides does not work.
It has been discussed before, somewhere on this forum (I think it was concluded with "Adobe has to fix this").

Similar Messages

  • Get field position using PHP or JavaSript

    Hello guys! How can I get current position of some fields in Pdf form. For example, I have Pdf form with signature field. I need to get current page number and x, y position of this field. Can you give me some code example on PHP or JavaScript.
    Thanks.

    There's a big difference between doing it with JS and with PHP... Doing it with JS inside a PDF is very easy. The code will look something like this:
    var f = this.getField("FieldName");
    app.alert("Field page: " + f.page):
    app.alert("Field location: " + f.rect);
    Here I'm just outputting it to an alert window... You can do something else with it, of course.

  • Using script labels

    I have a script that opens an Indesign CS4 pages, creates a rectangle and places an image in the rectangle.  This part works great.  What I would like to do is to have the image placed in an existing box that has been labeled using a scipt label.  I can't seem to figure it out.   Here is my current code.
    tell application "Adobe InDesign CS4"
          set comic4 to "Macintosh HD:users:marshall:documents:comics:bbt" & DYear & Dmonth & Dday & ".tiff"
          set comic7 to "Macintosh HD:users:marshall:documents:comics:pe09" & Dmonth & Dday & ".tif"
          set mydoc to open "Macintosh HD:users:marshall:documents:comix:GGDailyBlank.indd"
          tell mydoc
                 tell page 1
                       set myrect4 to make rectangle with properties {geometric bounds:{30.6, 2.4, 41, 32.5}}
                       set myrect7 to make rectangle with properties {geometric bounds:{43.4, 33.5, 54, 63.5}}
                       tell myrect4
                             set myGraphic to place (comic4 as string)
                             fit myrect4 given content to frame
                             tell myrect7
                                   set myGraphic to place (comic7 as string)
                                   fit myrect7 given content to frame
                             end tell
                       end tell
                 end tell
          end tell
    end tell

    Yo need something like:
    place alias pathToPic on text frame "Frame label"
    Shane Stanley <[email protected]>
    AppleScript Pro Sessions <http://scriptingmatters.com/aspro>

  • Apply "Script Labels" to Object Styles?

    Hi again,
    I think I've kind of found a solution to my previous thread. But it involves using Script Labels in order to get it to work. Problem is I've tonnes of text boxes with Object Styles applied that don't have any Script Labels applied to them. Is there a way I can apply a script label to all of my existing text frames that have a particular Object Style already applied to them?
    Thanks in advance.

    You could use essentially the same script I just posted but set the label rather than the itemLayer of each found object. However, it seems like a convoluted approach.
    Dave

  • [CS3 JS] Getting a page item by its script label

    I have a text frame on a master page with its script label set. In my script, I am trying to get a reference to the text frame with this:
    var doc = app.activeDocument;
    var spread = doc.masterSpreads[0];
    var tabFrame = spread.allPageItems.item("TabLeft");
    I get the error "spread.allPageItems.item is not a function"
    Any help will be appreciated. Thanks.
    Rick

    Hi Rick,
    spread.allPageItems returns a flattened array of all of the page items in the spread, at any level of the hierarchy (i.e., inside groups and other page items). Is that what you want? Sadly, allPageItems does not benefit from the special case where we use the label as a name, so you'll have to iterate if that's what you want.
    As Peter says (thanks, Peter!), spread.pageItems.item("label") gives you all of the page items whose label matches the string, but it does so in sort of a weird way--you'll always get a page item object. If no page items match, you get an invalid page item; if one matched, you get a single page item, and if multiple page items matched, you get a page item object that actually contains multiple page items. It can take a little testing to figure out exactly what it is that was returned.
    Thanks,
    Ole

  • How to enable the script label of a text frames in indesign using applescript

    hi all,
    am using Indesign CS2 with applescript..
    Using script I have to open a template in indesign and flow the word document into it...
    I can able to flow the word document into the template using "Place" command..but script labels of the text frames gets disabled...
    I need the script labels to be enabled...
    can anybody help me
    thanks in advance

    Script labels can't be disabled, so I'm not sure what your problem is -- perhaps seeing some code could help. Could it be that you're referencing a page item by label, but it is not responding because the item is part of a group?
    Shane Stanley <[email protected]>
    AppleScript Pro Sessions <http://scriptingmatters.com/aspro>

  • Script label: Set and get it?

    Hi
    How can I set and get the script label of a frame in my plugin?
    Thanks for the help.
    Best regards
    Hans

    Hi,<br /><br />the IScript-Interface has a GetTag() and SetTag() method. While GetTag() is fine, you'll get Asserts when using SetTag() - thus I changed that to  processing kSetScriptingTagCmdBoss.<br /><br />Example (script-label on a splineitem, stripped of nil-pointer-checks):<br /><br />InterfacePtr<IScript> script(itemRef, UseDefaultIID());               <br />PMString label = script->GetTag();<br />ScriptList scriptList.push_back(script);<br />InterfacePtr<IScriptManager>scriptMgr(Utils<IScriptUtils>()->QueryScriptManager(kScript TagMgrBoss));<br />InterfacePtr<ICommand> cmd( CmdUtils::CreateCommand(kSetScriptingTagCmdBoss));<br />InterfacePtr<IScriptTagCmdData> scriptTagData(cmd, UseDefaultIID());<br />scriptTagData->SetScriptList(scriptList, scriptMgr->GetRequestContext(), label);<br />cmd->SetItemList(UIDList(itemRef));<br />ErrorCode err = CmdUtils::ProcessCommand(cmd);<br /><br />Regards,<br /><br />Bernt

  • Use of label in script?

    what is the use of Label in sap script ?

    To create labels in SAPSCRIPT, you will have to define multiple MAIN WINDOWS in the Page Window.. try the following steps..
    Main windows in page windows allow you to format text in multiple columns. Define an area in the page window, in which to position the main windows.
    1. Create a page window and assign it to a page.
    2. Choose Edit --> Main windows.
    A dialog box appears.
    3. Enter values in the fields Area width and Area height in accordance with the input guidelines for main windows.
    4. Enter values in the fields Spacing and Number in the Horizontal group if you want to use multiple columns. You can ignore the fields in the Vertical group.
    5. Determine how many columns and line areas are required for label printing. Then enter the corresponding values in the fields in the Horizontal and Vertical groups.

  • What is the use of labels in scripts?

    What is the use of labels in scripts?
    why it is not possible to create lables in smartforms?
    How can we print different barcodes in scripts and smartfoms?
    Is it possible to create a background logo for a page in script?
    I think we can do this background logo in smartform but in script is it possible?
    Thanks in Advance.
    Regards
    Abhilash.

    1) Labels are used to get
        when u want to do same thing fro diffrent items.
      like when u want to print address for all employess to stick to hike salary envelopes.
    lke when u want price and barcode of matriels to print to metrials.
    2) it is possible to do this in smart form for this we use normal window consept.
    3) and 4) yes it is possible to create background logo in script
    Here is the blog on achieving watermark in SAPScript:
    /people/naimesh.patel/blog/2008/05/22/watermark-in-sapscript

  • How to get the position of a tag in XML,when i am using the org.xml.sax

    Hi,
    I am able to parse a xml document.I want to get the position of a tag in the document.So that by keeping that as reference, i can access other tags.Plz help me.I am using org.xml.sax API.

    Hello Friends
    After research , I could also find another way to check the existence of a node .We can even use CHOOSE to check the existence.
    <xsl:choose>
          <xsl:when test="(/mynode)">
              your action if the mynode is found
          </xsl:when>
          <xsl:otherwise>
                    action if mynode is not found
          </xsl:otherwise>
    </xsl:choose>
    Thanks.
    Wishes
    Richa

  • How to get the handle of all text fields in the subforms, using script

    Hi Friends,
    I have around 20 fields in a subform, how can i get the names of all the fields using script.
    I wish to enhance the following script where the field names are hard coded
    thereby the script itself will get the names of the field names.
    var f1 = this.parent.somExpression + ".TextField2" + ",";
    var f2 = f1 + this.parent.somExpression + ".DropDownList1" + ",";
    var f3 = f2 + this.parent.somExpression + ".NumericField1";
    xfa.host.resetData(f3);
    Any help will be greatly appreciated..
    Thanks
    JJ

    Hi Paul,
    Thanks for your comments.
    I achieved the clear contents by resetting, by taking input from your thoughts..
    form1.sub1.sub2.sub3.table_1.addDelete_Top.addDelete.deleteRow::click - (JavaScript, client)
    //Here is my code finally look like..
    //row 1, table_1 are also subforms
    for (var i=1;i<10;i++){
    var myRow = this.resolveNode("table_1.row1[" + i + "]");
    if(myRow.presence == "hidden"){
    i = i-1;
    var myRowDelete = this.resolveNode("table_1.row1[" + i + "]");
    if(i!=0){
    xfa.host.resetData(myRowDelete.somExpression);
    myRowDelete.presence = "hidden";
    break;
    if(i==9){
    xfa.host.resetData(myRow.somExpression);
    myRow.presence = "hidden";
    break;
    Thanks
    JJ

  • Why do vector lines appear different in my Photoshop document compared to the PDF that was created using "Scripts Layer Comps to PDF"? And how do I get them to look the same?

    Why do vector lines appear different in my Photoshop document compared to the PDF that was created using "Scripts > Layer Comps to PDF"? And how do I get them to look the same?

    BOILERPLATE TEXT:
    If you give complete and detailed information about your setup and the issue at hand, such as your platform (Mac or Win), exact versions of your OS, of Photoshop and of Bridge, machine specs, what troubleshooting steps you have taken so far, what error message(s) you receive, if having issues opening raw files also the exact camera make and model that generated them, etc., someone may be able to help you.
    Please read this FAQ for advice on how to ask your questions correctly for quicker and better answers:
    http://forums.adobe.com/thread/419981?tstart=0
    Thanks!

  • How to get the position of the stem in control valve using slider control in the front panel

    I have created a calibration program for a control valve. Signal (4-20mA) is generated from labview using slider contorl which is given to the valve via DAQ(module 9265) and again the feedback signal from the valve is acquired using DAQ(module 9203).. . There is an input ISO/ISC(Increasing signal to open/ Increasing signal to close) in the front panel.
    ISO would set the output to increase from (4-20)mA further opening the valve
    ISC would set the output to increase from (4-20)mA further closing the valve
    I have doubt, how can i get the position of a stem

    Ravens Fan wrote:
    If the position of the stem is being sent to the PC through a 4-20 mA signal into your DAQ 9203 module, then you just need to do an analog input read in order to get the signal.
    When reading this post, that is what came to mind...  So let's see if both RavensFan & I are trying to understand the same thing...  Are you saying that the position of the stem is linear (or scaled) to the amount of current sent to it?  Meaning a 4mA signal would move it a certain distance, and 10mA would move another given / known distance?  Or are you saying that it is calibrated so that a 20mA signal for a certain duration (ms) would move it a given distance? So the scale would be time and not current unless a lookup table is used to adjust the time duration based on the current being drawn...
    It's just that I am not familiar with solenoid / drive devices that related to current..  To voltage, yes.  To time, yes..  To current, I'm simply saying that I am not familiar with that.  Can you tell us more about this stem (mfg / model designation)?

  • How to get the kerning value and set it to back use script?

    hi,guys
    I come back again.
    I encountered a kerning problem.
    how to get the kerning value and set it to back use script?
    Thanks very much!

    For both cases, the filename can be found on the FILE.ReceivedFileName Context Property.  You can access this Property in a Pipeline Component or Orchestration and take any action you want, such as apply to a database.
    The value is accessed by: MyReceivedMessage(FILE.ReceivedFileName)
    In the case of a duplicate EDI Interchange, you would use the Failed Message Routing feature to capture the error message with either an Orchestration or Send Port.

  • Is it possible to get the data on the device driver detail property shown below, using scripts?

    I have tried to get the data using Win32_PnPSignedDriver but the InstallDate parameter always shows as empty when I try to retrieve it. Also, the Win32_PnPSignedDriver object does not contain all the values that could be seen when you access this window
    via Device Manager.

    Also it looks like you're attempting scripting using WMI scripting. Perhaps you would want to download
    WMI Code Creator v1.0 and read
    Utility Spotlight WMI Code Creator.
    WMI code creator can create code in VB Script, VB.Net and Visual C# or C#.Net I suppose.
    La vida loca

Maybe you are looking for

  • Extended notifications & placing a link to the mail

    Hi, We have extended notifications running in our system with basically the following relevant settings: -one message contains multiple items -HTML message I have configured the text of the mail to meet our requirements and it works just fine, and no

  • MIR7 error messages

    Hi, In the past, we cannot process park invoice document unless a PO has a GR. Otherwise, system will prompt "PO has no selectable items". However now, the user can just enter the amount in the appropriate field and we can proceed with parking of inv

  • FS10n Line item display issue

    Hi, When we are displaying line items in credit side of FS10N (double clic option), the result shows some line items with positive sign (It supposed to show only minus sign in all items). Is it correct? Is there a reason? Is it a bug? If someone has

  • Multiple Portlets on Same Server?

    What is the best way for 2 separate groups in an organization to have (or appear to have) their own instance of the Oracle Portal? We have 2 separate groups ready to begin development in the Portal and are trying to figure out a good way to accomplis

  • Photoshop CS5 doesn't have same printer presets as other CS5 products

    I am trying to print from Photoshop CS5 to a Konica Bizhub c451 printer that uses account tracking and user authentication.  But, when attempting to print from photoshop CS5 the printer preset doesn't have the same options (doesn't allow us to put in