CS3 Get ObjectType of pageItem

Hello,<br /><br />When getting pageitems from a page i have some problems to get their type (e.g. Group, TextFrame). I have found a solution but i do not know if i can get some trouble with using getElements():<br /><br />var curDoc = app.activeDocument;<br />var curPage = curDoc.pages[0];<br />var pageItems = curPage.pageItems;<br /><br />for(var i=0; i<pageItems.length; i++) {<br />     <br />   var curBox = pageItems[i];<br />   var element = curBox.getElements();<br />          <br />   if(element.length > 0) {<br />      var groupItems = element[0];<br />      alert(groupItems.constructor.name);<br />   }<br />}<br /><br />Is there any better solution to get the type of a pageItem? In my case <element> has only one element and i do not know if there is a case where there could be more elements in the array.<br /><br />Thank you, asci

Hello everyone!
I'm having the same problem with the rotated page's items.
If someone know enything haw to deal with it please help.
Thanks in advance.

Similar Messages

  • How can i get the selected PageItem in InDesign

    Hi
    i received the hint to post the message into this forum. so i try it...
    After implementing a floating panel and receiveing the "afterSelectionChanged"-Event i would like to get the selected PageItem, if one is selected...
    In the datastructure i can only find the activeLayer (event.target.activeLayer)  and the activePage (event.target.activeLayer), but no activePageItem or so.
    Is there a possibility to get this PageItem?
    best thanks for any hint.
    Lorenzo

    Lorenzo,
    This is the SDK forum. David sent you to the scripting forum: http://forums.adobe.com/community/indesign/indesign_scripting
    But I already answered on the CS SDK forum http://forums.adobe.com/message/3915745#3915745
    Harbs

  • How to get ObjectType of form

    Hi All,
    I am working on SAP B1 i required help on Screen Painter.
    How to get ObjectType property of inbuilt form in SAP. And also how to get Database of respected table of perticular form.
    Can anybody suggest me some solution.
    Thanks,

    In menu set Show - System information. Then when with cursor youll be over the matrix or some item, in status bar youll see the table and column in db of the field.
    The objects id are
    oChartOfAccounts 1
    oBusinessPartners 2
    oBanks 3
    oItems 4
    oVatGroups 5
    oPriceLists 6
    oSpecialPrices 7
    oItemProperties 8
    oUsers 12
    oInvoices 13
    oCreditNotes 14
    oDeliveryNotes 15
    oReturns 16
    oOrders 17
    oPurchaseInvoices 18
    oPurchaseCreditNotes 19
    oPurchaseDeliveryNotes 20
    oPurchaseReturns 21
    oPurchaseOrders 22
    oQuotations 23
    oIncomingPayments 24
    oJournalVouchers 28
    oJournalEntries 30
    oStockTakings 31
    oContacts 33
    oCreditCards 36
    oCurrencyCodes 37
    oPaymentTermsTypes 40
    oBankPages 42
    oManufacturers 43
    oVendorPayments 46
    oLandedCostsCodes 48
    oShippingTypes 49
    oLengthMeasures 50
    oWeightMeasures 51
    oItemGroups 52
    oSalesPersons 53
    oCustomsGroups 56
    oChecksforPayment 57
    oInventoryGenEntry 59
    oInventoryGenExit 60
    oWarehouses 64
    oCommissionGroups 65
    oProductTrees 66
    oStockTransfer 67
    oWorkOrders 68
    oCreditPaymentMethods 70
    oCreditCardPayments 71
    oAlternateCatNum 73
    oBudget 77
    oBudgetDistribution 78
    oMessages 81
    oBudgetScenarios 91
    oSalesOpportunities 97
    oUserDefaultGroups 93
    oSalesStages 101
    oActivityTypes 103
    oActivityLocations 104
    oDrafts 112
    oDeductionTaxHierarchies 116
    oDeductionTaxGroups 117
    oAdditionalExpenses 125
    oSalesTaxAuthorities 126
    oSalesTaxAuthoritiesTypes 127
    oSalesTaxCodes 128
    oQueryCategories 134
    oFactoringIndicators 138
    oPaymentsDrafts 140
    oAccountSegmentations 142
    oAccountSegmentationCategories 143
    oWarehouseLocations 144
    oForms1099 145
    oInventoryCycles 146
    oWizardPaymentMethods 147
    oBPPriorities 150
    oDunningLetters 151
    oUserFields 152
    oUserTables 153
    oPickLists 156
    oPaymentRunExport 158
    oUserQueries 160
    oMaterialRevaluation 162
    oCorrectionPurchaseInvoice 163
    oCorrectionPurchaseInvoiceReversal 164
    oCorrectionInvoice 165
    oCorrectionInvoiceReversal 166
    oContractTemplates 170
    oEmployeesInfo 171
    oCustomerEquipmentCards 176
    oWithholdingTaxCodes 178
    oBillOfExchangeTransactions 182
    oKnowledgeBaseSolutions 189
    oServiceContracts 190
    oServiceCalls 191
    oUserKeys 193
    oQueue 194
    oSalesForecast 198
    oTerritories 200
    oIndustries 201
    oProductionOrders 202
    oPackagesTypes 205
    oUserObjectsMD 206
    oTeams 211
    oRelationships 212
    oUserPermissionTree 214
    oActivityStatus 217
    oChooseFromList 218
    oFormattedSearches 219
    oAttachments2 221
    oUserLanguages 223
    oMultiLanguageTranslations 224
    oDynamicSystemStrings 229
    oHouseBankAccounts 231
    oBusinessPlaces 247
    oLocalEra 250
    oSalesTaxInvoice 280
    oPurchaseTaxInvoice 281
    BoRecordset 300
    BoBridge 305
    oNotaFiscalUsage 260
    oNotaFiscalCFOP 258
    oNotaFiscalCST 259
    oClosingDateProcedure 261
    oBusinessPartnerGroups 10
    oBPFiscalRegistryID 278

  • Have a new imaq apple migrated all info from old line but my cs3 gets an  error message

    The message when I tried to open CS3 is that Licensing for this product expired. Appears my version for CS3 is an upgrade from my old CS2 which I no longer have. Adobe chat,  after many hours says that without the original CS2 cd try dragging from my version to the desktop and try from there. Problem now is it gets same error BUT cannot eject cd as its says PS in use.
    Cannot seem to quit as cannot find an open PS
    What key on restart do I press.
    Message was edited by: delboy 1

    Migration assistant doesn't move all the necessary files.
    You really need to reinstall your Adobe apps on the new system to get all the support files in the right place (and with the right permissions).

  • [AS CS3] Getting fonts of placed InDd docs (imported pages, or graphics)

    I need to get the status of fonts that are in InDd documents placed inside another InDd document. I can see the fonts in the "Find Font" window, and it shows me if the font is OK or missing. How would I get that information via script?
    Opening all the child documents is not really an option.
    Thanks,
    Chris

    I got similar results when I tried with a slightly more complex document<br />than before. Assuming the count is correct, and that all you want to know is<br />whether any are missing, you could get the count, loop through asking for<br />the names by index, and then check whether all the names are unique.<br /><br />Something like this:<br /><br />tell application "Adobe InDesign CS3"<br />    set n to count of fonts of document 1 -- assume reliable<br />    set theFonts to fonts of document 1 -- assume unreliable<br />    if (count of theFonts) is not n then -- mismatch<br />        set fontNames to {}<br />        repeat with i from 1 to n<br />            set end of fontNames to name of font i of document 1<br />        end repeat<br />        -- see if font names are duplicated<br />        repeat with i from 1 to (n - 1)<br />            set oneFont to item 1 of fontNames<br />            set fontNames to rest of fontNames<br />            if fontNames contains oneFont then<br />                -- there's a duplicate<br />                set fontProblem to true<br />                exit repeat<br />            end if<br />            if i = n - 1 then<br />                -- no duplicates found<br />                set fontProblem to false<br />            end if<br />        end repeat<br />    else<br />        -- counts match, so all is well<br />        set fontProblem to true<br />    end if<br />end tell<br />return fontProblem<br /><br />-- <br />Shane Stanley <[email protected]><br />AppleScript Pro Sessions <a href=http://scriptingmatters.com/aspro>

  • [AS, CS2 / CS3] Get Fill Color When Nothing is Selected (defaults? preferences?)

    Hi,
    where can I find the active color, which is active (border and fill color), when nothing is selected.
    E.g. I can get the active styles, when nothing is selected with:
    applied character style of text defaults
    and
    applied paragraph style of text defaults.
    Where nac I find the equivalent for fill and border color?
    Thanks
    Tobias

    Thanks, that was for CS3. Where can I get that in CS2?
    I searched the dictionary of document and application, but got no glue ...
    Thanks
    Tobias

  • [AS CS3] getting the xml value?

    I'm having trouble returning the "Value" of my xml object. I can get all sorts of other attributes. I need to be able to return the value "123456". I must be missing something, or is this a real shortcoming?
    tell application "Adobe InDesign CS3"
    tell document 1
    get associated XML element of first page item
    --> XML element id 12 of XML element id 2 of document "Untitled-8"
    get XML attribute 1 of associated XML element of first page item
    --> XML attribute "TCnumber" of XML element id 12 of XML element id 2 of document "Untitled-8"
    get properties of (get XML attribute 1 of associated XML element of first page item)
    --> {value:"123456", parent:XML element id 12 of XML element id 2 of document "Untitled-8", index:1, name:"TCnumber", object reference:XML attribute "TCnumber" of XML element id 12 of XML element id 2 of document "Untitled-8"}
    get name of (get XML attribute 1 of associated XML element of first page item)
    -->TCnumber
    get index of (get XML attribute 1 of associated XML element of first page item)
    -->1
    get value of (get XML attribute 1 of associated XML element of first page item)
    --ERROR
    end tell
    end tell

    That's a nice one.
    The "get value" event takes precedence, it is probably understood by ScriptArg.
    For insiders: kGetValueScriptArgEventScriptElement
    You can use round brackets to disambiguate:
    get (value of ...)
    Dirk

  • Filters Won't Work in CS3 - Get "file system I/O error" message

    Using CS3 on Mac G5, OS 10.4, and some Photoshop filters (e.g. Liquify) won't open, getting the message: "A file system I/O error has occurred."
    Some filters do open, but others fail.
    Have tried reinstalling CS3, trashing preferences, unlocked permissions - no help.
    Any suggestions?

    Peter,
    The very instant you create a new document or open an existing image file, Photoshop creates a Scratch Disk to use as virtual memory, regardless of how much RAM you have installed. This scratch disk is created on whichever drive you have designated as your PRIMARY disk drive. If it happens to be on your boot drive, i.e. the drive where your OS (Operating System) resides, it will be competing with the OS swap file for use of the one read head on that disk. Very bad for performance.
    Ideally, it should be a dedicated, separate internal hard drive, Figure on at least 35 times or more the size of your largest file for scratch. I keep a dedicated 160GB internal drive as my primary scratch disk.
    You should not be running a G5 with less than 4GB of installed RAM. 512 MB would be ludicrous, but even 1GB is pathetic little RAM.
    I agree that your hard drive sounds like it's going south. Get two new, large hard drives, at least 250GB each.

  • CS3 - Getting Multiple Error Messages Related to Javascript/Spry/XSLT

    In the last couple of days, I have been getting endless error messages from DW CS3. Messages like:
    Javascript error while executing onLoad in PageManager.
    Spry.htm has configuration that is invalid.
    XSLT.htm has configuration that is invalid.
    Also, my Undo doesn't work anymore.
    I am NOT trying to make any fancy pages with Javascript, Spry, XSLT, or anything to that effect. Mostly, I just make basic HTML pages.
    I'm guessing that something has been accidentally turned on that is not supposed to be turned on. How do I turn it off? (And get my Undo back?)
    Thanks!

    Have you tried this KB article?
    Troubleshooting JavaScript errors in Dreamweaver

  • Premiere CS3 gets out of Ram on 4GB machine!

    Hello,
    Whenever I try to render a sequence in Premiere Pro CS3, it uses more and more Ram until it crashes.
    Is this a bug? What could be the source of this Problem?
    My PC:
    2.4GHz Quad
    4GB Ram
    Also I'm using big 5Dmkii files (h264 encoded)
    Please help me!
    Thanks, Steve

    For one, my wife is still running XP 32, but then, even though she is the Financial Director, she is limiting herself to Skype and Internet... (sigh). XP users are a race that are seriously in peril of extinction, I think. Which reminds me of:
    There is no egg in eggplant nor ham in hamburger; neither apple nor pine in pineapple. English muffins weren't invented in England nor French fries in France. Sweetmeats are candies while sweetbreads, which aren't sweet, are meat. Quicksand works slowly, boxing rings are square and a guinea pig is neither from Guinea nor is it a pig. Why is it that writers write but fingers don't fing, grocers don't groce and hammers don't ham?
    If the plural of tooth is teeth, why isn't the plural of booth beeth? One goose, 2 geese. So one moose, 2 meese? Doesn't it seem crazy that you can make amends but not one amend. If you have a bunch of odds and ends and get rid of all but one of them, what do you call the thing left? Is it an odd, or an end?
    If teachers taught, why didn't preachers praught? If a vegetarian eats vegetables, what does a humanitarian eat? In what language do people recite at a play and play at a recital? Ship by truck and send cargo by ship? Have noses that run and feet that smell?
    How can a slim chance and a fat chance be the same, while a wise man and a wise guy are opposites? You have to marvel at the unique lunacy of a language in which your house can burn up as it burns down, in which you fill in a form by filling it out and in which an alarm goes off by going on.
    English was invented by people, not computers, and it reflects the creativity of the human race, which, of course, is not a race at all. That is why, when the stars are out, they are visible, but when the lights are out, they are invisible.

  • Upgrade from CS3, Get Fireworks?

    Sorry if this is the wrong forum, I've searched for my specific question and I can't seem to find it.
    I currently have CS3 Design Premium without Fireworks. If I upgrade to CS6 Design and Web Premium will I get Fireworks?
    Thanks,
    -w

    Yes.
    http://www.adobe.com/products/creativesuite/design-web-premium.html
    Mylenium

  • [JS] [CS3] Getting references of items

    Hi
    I am working with an InDesign file that has been built with an applescript.  The page contains a mixture of text and image frames, drawn in a grid style (see attached).
    I need to somehow be able to toggle through each item, and get a reference on the order the object was drawn on the page. When I get all items:
    myDocFrames = myDoc.allPageItems;
    the order the page items are returned is NOT the order they were drawn on the page.  Is there another reference, maybe an ID number that I can use to act as my reference?
    Once I can work to some order, I can then decipher which is an image, which is a text frame, and do what I need to do.
    Thanks all,
    Roy

    Hi Roy,
    You can set and get a reference on the order the object was created by using APID Toolkit. Here is an example (I assume that APID is installed):
    1. I create a subject observer on the pasteboard.
    2. In APID panel, I set List of Subjects to "*" (all subjects)
    3. Event Filter field I set to "subjectCreated#CreationCounter" (subjectCreated is event which triggers the script, CreationCounter is the name of scripting engine)
    4. In Script field I type the following script
    if (myCounter == undefined) var myCounter = 1;
    theItem.eventSource.setDataStore("created", myCounter);
    myCounter ++;
    Then, in another script, I can retrieve the order of creation of each page item, e.g.:
    var myDoc = app.activeDocument;
    myDocFrames = myDoc.allPageItems;
    for (i = 0; i < myDocFrames.length; i++) {
          myDocFrames[i].select();
          alert("Creation order of selected item is " + myDocFrames[i].getDataStore("created"));
    Kasyan

  • [JS][CS3] Getting Page Number

    Hi.
    I need to find the page number of the page containing a frame.
    Normally I would use "myFrame.parent.name" to find the page number. However, I cannot use this method on an inline graphic.  What I get returned is the story, which has no page number.  I have used various ways, such as:
    myFrame.parent.insertionPoints[0].parent
    but nothing returns the page number.  I have looked at all the properties of the frame, and cannot find a property I can manipulate to extract the page number.
    Is this possible? Should I give up now?
    Cheers
    Roy

    Here is a function written by Dave Saunders:
    var myDoc = app.activeDocument;
    var myObj = app.selection[0];
    $.write("The selected object is on page " + findPage(myObj).name + "\n") ;
    function findPage(theObj) {
        var thePage = theObj;
        if (thePage.hasOwnProperty("baseline")) {
          thePage = thePage.parentTextFrames[0];
        while (thePage.constructor.name != "Page") {
          var whatIsIt = thePage.constructor.name;
          switch (whatIsIt) {
            case "Story" :
              thePage = thePage.textFrames[-1].parent;
              break;
            case  "Character" :
              thePage = thePage.parentTextFrames[0];
              break;
            case "Cell" :
              try {
                thePage = thePage.insertionPoints[0].parentTextFrames[0];
                break;
              } catch (e) {
                // must be overset, so ignore
                return null;
            case "Application" :
              // must be off page, so ignore
              return null;
          thePage = thePage.parent;
        return thePage

  • [CS3] Getting object style used by a page item

    If I have a UIDRef of a multi-column text frame, how can I get the object style applied to it? It looks like there was a thread on this previously but it seems to have been pruned from the list.
    Thanks.

    IID_IOBJECTSTYLEINFO
    For setting, you will need kApplyObjectStyleCmdBoss, the IID_IUIDDATA points to the style. As that command does not update the attributes, you'll also need a bunch of other commands, I'd watch out for a Facade instead.
    Dirk

  • [CS2/CS3] - Getting color of stroke

    I'm parsing graphical objects (rectangles, ...) and I want to be able to get color of stroke(fill color),
    I use this code:  
    Utils()->GetFillRenderingUID(sourceFillRenderingUID, sourceGraphicStyleDescriptor);  
    to get sourceFillRenderingUID and now I use:  
    PMString sourceStrokeColor = Utils()->GetSwatchName(sourceSplineRef.GetDataBase(), sourceStrokeRenderingUID); 
    but this method returns me name of color only in case of base color (Black,...),
    please how to get color CMYK or something similar to be able to compare 2 colors ?  Thx, marxin

    I found out, that if I create a graphic object with defined swatc (f.e. C=100, M=0, Y=0, K=50), my code:<br/>
    Utils<IGraphicAttributeUtils>()->GetStrokeRenderingUID(sourceStrokeRenderingUID, sourceGraphicStyleDescriptor);
    PMString sourceStrokeColor = Utils<ISwatchUtils>()->GetSwatchName(sourceSplineRef.GetDataBase(), sourceStrokeRenderingUID);
    my code correctlly gets "C=100, M=0, Y=0, K=50" as a name of strokeColor. But If I create user defined solid color (which is not a swatch profile), my code gets "" as a Name. I read in guide that solid color f.e. will create a local swatch profile, but I am not able to get the color from UID.
    Please could anyone help me how to get color from stroke and local swatch ?
    Thx, marxin

Maybe you are looking for

  • MAJOR toshiba-apple tv troubles!!

    I have a Toshiba TV which I connected to my new apple tv thru an HDMI lead, it worked great - no probs... then I used the same hdmi lead for something else for 1 day... when i re-connected the apple tv to my tv it doesn't work!?? All i get on the hdm

  • InDesign: Letter spacing messed up in automatic page numbering

    The numbers in my documents are smashed together when using automatic page numbering in InDesign.. They are fine when there is a single character (1-9 )but when there is two characters (10 or higher) the kerning is gone and the numbers overlap? Anyon

  • Page canvast not visible

    Hi all, I have a small problem, My page canvas is not visible on pages with a full page picture, the canvas falls behind the designs. How can i bring the page canvas up front so my page numbers which are in the canvas will be visible again.? Image: l

  • E51 w/o Camera

    It was announced today that a version of the E51 would be released in the US without a camera. This is great because I work in an industry where camera phones are usually not allowed. However, I have a question about 3G on the E51, does it support US

  • Create complex component in JSF only with Java

    Hi, now I'm developing some JSF components. My objective is that the developers who use this components only need to write something like: <%@ taglib uri="http://chain.com" prefix="d" %> <d:somecomponent atributte1="value1" attribute2="value2"/> ...T