Applescript to add multiple assets to INDL

Hi
I'm having problems writing an applescript that will take an item (or all items) on a page and add it/them to the Indesign library. I can get all graphic elements associated to an advert ID (eg: advert name 12345678, has 6 associated graphics named 12345678_*) and I can place them onto the page. I cannot then add these to the the library that has been created by the same script (12345678_library.indl).
I've tried (snippet):
set graphiclist to ""
set graphicpath to (standardgraphicpath & lastdigits & ":")
set graphicnumber to (count of files in folder graphicpath)
set graphiclist to (name of every file in folder graphicpath where name contains adCID) as list
repeat with i from 1 to number of items in graphiclist
set graphicname to item i of graphiclist
set fullgraphic to (graphicpath & graphicname)
tell application "Adobe InDesign CS3"
try
set mypage to page 1 of spread 1 of active document
tell mypage
set placedgraphic to place fullgraphic
tell document 1
set activegraphic to item 1 of mypage
set addgraphic to store graphiclib using activegraphic
end tell
end tell
on error
activate
display dialog ("Had a problem with graphic " & graphicname)
end try
end tell
--tell lib to get graphic and add to library
end repeat
I contstantly get a the error "Had a problem with graphic " & graphicname after the pictures are placed on the page
I don't mind if we can make use of "Add items of page 1 as separate objects" as I can place all images successfully.
Can someone please tell me where I'm going wrong - I think my head is about to explode!
Thanks in anticipation

Thanks for that Shane, but for some reason the script is reporting that it can't get item 1 of page 1 of spread 1.
I can't see why not, there's only one item on the page, plus the library panel that is open.
Have I moved the store line to the wrong place?
repeat with i from 1 to number of items in graphiclist
set graphicname to item i of graphiclist
set fullgraphic to (graphicpath & graphicname)
tell application "Adobe InDesign CS3"
try
set mypage to page 1 of spread 1 of active document
tell mypage
set placedgraphic to place fullgraphic
end tell
on error
activate
display dialog ("Had a problem with graphic " & graphicname)
end try
set activegraphic to item 1 of page 1 of spread 1
set addgraphic to store graphiclib using activegraphic
end tell
end repeat

Similar Messages

  • Please add the ability to add multiple folders to the assets folder in order to better organize large numbers of files.

    Please add the ability to add multiple folders to the assets folder in order to better organize large numbers of files.

    Hello KDLadage
    Thank you for your recommendation. I understand the challenges of managing large numbers of files on the My Files page. I also understand the need to preserve project files.
    Perhaps a compromise would be to create an Archive tab under My Files. Previous versions and retired project files could then be automatically moved into this holding area when a new version is published, thus preserving the files in a separate area that is still accessible to the author.
    I will submit this suggestion to our product management team to consider as a future enhancement.

  • How do I add multiple addresses/contacts in an email tread to my contact list without having to enter each at a time?

    How do I add multiple addresses/contacts in an email tread to my contact list without having to enter each at a time? I have AppleScript but don't see "add address" in any of the boxes/drop-downs. 

    Sorry, but Address Book does not allow you to select more than one email address to send to in a group. There's really no reason why people need multiple copies of a message, anyway; they have the option of forwarding email to another email address of theirs.
    Mulder

  • Howto add multiple files in mucow

    hi guys,
    so i'm very new at creating mucow files for muse, I have already created one called "YTPlayer" which is available on the muse addons site but now I want to
    create more complex ones...
    i'm working on creating a carousel mucow based off of a jquery plugin but I am stuck on how to let the user add multiple images files via the mucow and then
    have those files included in the code... for example if I wanted to let them add 3 image files to the carousel I could create 3 <text> parameters where they would
    specify the name of the images and then they could use the upload function of muse to upload the images and I could use something like this:
    <pageItemHTML>
    <![CDATA[
         <img src="assets/{param_image1}">
         <img src="assets/{param_image2}">
         <img src="assets/{param_image3}">
    ]]>
    </pageItemHTML>
    but of course this then limits them to 3 images only, how can I let them select many images and then specify that in the mucow code?... is this even possible?
    -thanks

    if all images have the same name following a number then you could add one text field only:
    <pageItemHTML> 
    <![CDATA[
         <img src="assets/{param_image}1">
         <img src="assets/{param_image}2">
         <img src="assets/{param_image}3">
    ]]> 
    </pageItemHTML> 
    It's not the best solution, but it works.

  • Creating multiple assets

    Hi,
    We are on version 4.70 and trying to create multiple assets via transaction AS01.
    How do we add fields to the pop up screen "Maintain Fields that should be different for similar assets".
    Regards.
    Pops Balram

    Hi,
    note 389370: 
    If you create more than one (similar) fixed asset using Transaction    
    AS01, after you have saved the fixed asset, the system displays a dialog
    box in which you can change fields 'Description', 'Inventory no.',     
    'BusAr', 'Cost center' and the evaluation groups individually for each 
    particular fixed asset.                                                
    You cannot insert any additional fields in this dialog box. Moreover,  
    after you have made the change, the system does not carry out a        
    substitution and, up to Release 4.70, no validation either.            
    Solution                                                               
    If you want to maintain additional fields individually, use Transaction
    AS02 for further maintenance.        
    I'm sorry, at the moment there ino othere solution available or planned.                                                                               
    regards Bernhard

  • Changing status for multiple assets

    Hi,
    After a quick search I cant find anything that relates to my question.
    I want to be able to quickly assign a status to multiple assets while in list view.
    Is this possible ?
    The only way I can see to do it at the moment is to individually open each asset and then navigate to the 'review and approve' tab and then change the stauts ---much too slow and tedious.
    Thanks,
    Dan

    It's not possible with any single built-in command.
    But one way to do it is set up a Response that is triggered by a Subscription:
    + Create a Response to Set Asset Metadata to the status you want.
    + Then create a Subscription to an Asset, triggered on Analyzed and Modified, calling your Response--but don't create any Asset Filter.
    Now you can select a group of assets, Analyze them, and they will get their metadata reset to what you have configured in the Response.
    Some considerations:
    + Make sure other people aren't analyzing assets at the same time, since you didn't put in any restrictions. For the same reason, you will probably want to disable the Subscription after you are done, or else in the future some people might get confused why their status is changing unexpectedly when they analyze an asset.
    + If you have multiple pages of assets you want to change, you may have to do it several times or enter a search term to make it easier to find them. If you're talking about changing hundreds or thousands of assets, you might want to consider doing it with an external script instead.
    + You could add an extra measure of safety by adding an Asset Filter if you know in advance what some of the metadata will have to be. (But don't set Trigger if changed.)
    + Don't analyze assets in the List view--it will lock up your FCSvr session.

  • How do I add multiple apple id's to one account

    How do I add multiple Apple id's to one account for billing and Icloud use?

    You don't. You can't combine Apple IDs.

  • How do i add multiple lines in a cell (like a list) in Excel for MAC?

    I'm trying to add multiple lines (in the form of a list) in a individual cell in Excel for MAC.  I used ALT Enter on my PC but that doesn't work on the iMac.  Does anyone know how to do this?
    Thanks!

    It's been a while but I think you hold SHIFT while typing a page break (RETURN) to make a new line without shifting to another cell.
    However, as Excel isn't an Apple product, I am sure you will get a faster and more current answer by using Microsoft's Office:Mac forums here:
    Office for Mac forums
    They are very good.

  • How do I add multiple contacts to a group?

    How do I add multiple contacts to a group on my Ipad?

    See if this thread helps.
    https://discussions.apple.com/thread/4114588
    Matt

  • How do i add multiple email addresses to my calendar

    How do I add multiple email addresses to my calendar on my iphone

    You can create an email alias at the mail feature at iCloud.com

  • HT201317 how can I add multiple photos to camera roll

    how can I add multiple photos to camera roll

    If you mean from photo stream, open your photo stream album on your phone in the thumbnail view, tap Edit, tap all the photos to select them, tap Share, then tap Save to Camera Roll.

  • Add Multiple records to G/L account group.

    Dear ABAP Experts,
    i have requirement that is using  BDC recording file  the Functional People wants to add records to the G/L Account group. The FI consultant gave the recording file, based on the recording file i developed a BDC program. This BDC program will work for single record. After creating single record system will ask for transport request .
    REPORT  ZDP_ACC_GRP.
    TYPES: BEGIN OF TY_TAB,
            KTOPL TYPE KTOPL,
            KTOKS TYPE KTOKS,
            TXT30 TYPE TXT30,
            VONNR TYPE VONNR,
            BISNR TYPE BISNR,
           TRKORR TYPE TRKORR,
       END OF TY_TAB.
    data: lt_tab type table of ty_tab,
           wa_tab type ty_tab.
    data: begin of record,
    * data element: KTOPL
             KTOPL_01_001(004),
    * data element: KTOKS
             KTOKS_01_002(004),
    * data element: TXT30_077T
             TXT30_01_003(030),
    * data element: VONNR_077S
             VONNR_01_004(010),
    * data element: BISNR_077S
             BISNR_01_005(010),
    * data element: TRKORR
             TRKORR_006(020),
           end of record.
    *       Batchinputdata of single transaction
    DATA:   BDCDATA type table of BDCDATA  WITH HEADER LINE.
    *       messages of call transaction
    DATA:   MESSTAB type table of BDCMSGCOLL  WITH HEADER LINE.
    *       error session opened (' ' or 'X')
    DATA:   E_GROUP_OPENED.
    *       message texts
    TABLES: T100.
    data:lv_file type string.
    parameters: p_fname type IBIPPARMS-PATH.
    at selection-screen on value-request for p_fname.
    CALL FUNCTION 'F4_FILENAME'
      EXPORTING
        PROGRAM_NAME        = SYST-CPROG
        DYNPRO_NUMBER       = SYST-DYNNR
        FIELD_NAME          = 'P_FNAME'
      IMPORTING
        FILE_NAME           = p_fname .
    start-of-selection.
    lv_file = p_fname.
    CALL FUNCTION 'GUI_UPLOAD'
       EXPORTING
         FILENAME                      = LV_FILE
    *   FILETYPE                      = 'ASC'
        HAS_FIELD_SEPARATOR           = 'X'
       TABLES
         DATA_TAB                      = LT_TAB
      EXCEPTIONS
        FILE_OPEN_ERROR               = 1
        FILE_READ_ERROR               = 2
        NO_BATCH                      = 3
        GUI_REFUSE_FILETRANSFER       = 4
        INVALID_TYPE                  = 5
        NO_AUTHORITY                  = 6
        UNKNOWN_ERROR                 = 7
        BAD_DATA_FORMAT               = 8
        HEADER_NOT_ALLOWED            = 9
        SEPARATOR_NOT_ALLOWED         = 10
        HEADER_TOO_LONG               = 11
        UNKNOWN_DP_ERROR              = 12
        ACCESS_DENIED                 = 13
        DP_OUT_OF_MEMORY              = 14
        DISK_FULL                     = 15
        DP_TIMEOUT                    = 16
        OTHERS                        = 17  .
    LOop at  lt_tab into wa_tab.
    perform bdc_dynpro      using 'SAPL0F09' '0020'.
    perform bdc_field       using 'BDC_CURSOR'
                                   'V_T077S-TXT30(01)'.
    perform bdc_field       using 'BDC_OKCODE'
                                   '=NEWL'.
    perform bdc_dynpro      using 'SAPL0F09' '0020'.
    perform bdc_field       using 'BDC_CURSOR'
                                   'V_T077S-BISNR(01)'.
    perform bdc_field       using 'BDC_OKCODE'
                                   '=SAVE'.
    perform bdc_field       using 'V_T077S-KTOPL(01)'
                                   WA_TAB-KTOPL."record-KTOPL_01_001.
    perform bdc_field       using 'V_T077S-KTOKS(01)'
                                   WA_TAB-KTOKS."record-KTOKS_01_002.
    perform bdc_field       using 'V_T077S-TXT30(01)'
                                   WA_TAB-TXT30."record-TXT30_01_003.
    perform bdc_field       using 'V_T077S-VONNR(01)'
                                   WA_TAB-VONNR."record-VONNR_01_004.
    perform bdc_field       using 'V_T077S-BISNR(01)'
                                   WA_TAB-BISNR."record-BISNR_01_005.
    perform bdc_dynpro      using 'SAPLSTRD' '0300'.
    perform bdc_field       using 'BDC_CURSOR'
                                   'KO008-TRKORR'.
    perform bdc_field       using 'BDC_OKCODE'
                                   '=LOCK'.
    perform bdc_field       using 'KO008-TRKORR'
                                   WA_TAB-TRKORR."record-TRKORR_006.
    perform bdc_dynpro      using 'SAPL0F09' '0020'.
    perform bdc_field       using 'BDC_CURSOR'
                                   'V_T077S-KTOPL(02)'.
    perform bdc_field       using 'BDC_OKCODE'
                                   '=BACK'.
    perform bdc_dynpro      using 'SAPL0F09' '0020'.
    perform bdc_field       using 'BDC_CURSOR'
                                   'V_T077S-KTOPL(02)'.
    perform bdc_field       using 'BDC_OKCODE'
                                   '=BACK'.
    perform bdc_transaction using 'OBD4'.
    ENDLOOP.
    FORM BDC_TRANSACTION USING TCODE.
       DATA: L_MSTRING(480).
       DATA: L_SUBRC LIKE SY-SUBRC.
    * batch input session
    * call transaction using
         REFRESH MESSTAB.
         CALL TRANSACTION 'OBD4' USING BDCDATA
                          MODE  'A'" CTUMODE
                          UPDATE 'S'"CUPDATE
                          MESSAGES INTO MESSTAB.
         L_SUBRC = SY-SUBRC.
           LOOP AT MESSTAB.
             SELECT SINGLE * FROM T100 WHERE SPRSL = MESSTAB-MSGSPRA
                                       AND   ARBGB = MESSTAB-MSGID
                                       AND   MSGNR = MESSTAB-MSGNR.
             IF SY-SUBRC = 0.
               L_MSTRING = T100-TEXT.
               IF L_MSTRING CS '&1'.
                 REPLACE '&1' WITH MESSTAB-MSGV1 INTO L_MSTRING.
                 REPLACE '&2' WITH MESSTAB-MSGV2 INTO L_MSTRING.
                 REPLACE '&3' WITH MESSTAB-MSGV3 INTO L_MSTRING.
                 REPLACE '&4' WITH MESSTAB-MSGV4 INTO L_MSTRING.
               ELSE.
                 REPLACE '&' WITH MESSTAB-MSGV1 INTO L_MSTRING.
                 REPLACE '&' WITH MESSTAB-MSGV2 INTO L_MSTRING.
                 REPLACE '&' WITH MESSTAB-MSGV3 INTO L_MSTRING.
                 REPLACE '&' WITH MESSTAB-MSGV4 INTO L_MSTRING.
               ENDIF.
               CONDENSE L_MSTRING.
               WRITE: / MESSTAB-MSGTYP, L_MSTRING(250).
             ELSE.
               WRITE: / MESSTAB.
             ENDIF.
           ENDLOOP.
       REFRESH BDCDATA.
    ENDFORM.
    FORM BDC_DYNPRO USING PROGRAM DYNPRO.
       CLEAR BDCDATA.
       BDCDATA-PROGRAM  = PROGRAM.
       BDCDATA-DYNPRO   = DYNPRO.
       BDCDATA-DYNBEGIN = 'X'.
       APPEND BDCDATA.
    ENDFORM.
    FORM BDC_FIELD USING FNAM FVAL.
         CLEAR BDCDATA.
         BDCDATA-FNAM = FNAM.
         BDCDATA-FVAL = FVAL.
         APPEND BDCDATA.
    ENDFORM.
    But the FI consultant wants to add multiple records to 'G/L account group'.After adding records before saving the system need to ask transport request at the last.
    How can I write code ...??
    Please help me.

    Hi Srikanth,
    Thanks for reply,
    You  are right we need to load hierarchy for G/L then we can see all the G/L's for all G/L groups.
    I have one more question when I check in RSA3 for the G/L account numbers, I could not find them.
    I am using the datasource fi_gl_4 and in rsa3 I can see 1000 records data and when I put filter on G/L account and search for the G/L number I needed I cant see it, but it is there in the functional transaction(f.01)?
    How to check for the required G/L's in rsa3 ?
    Thx

  • Is there some way to add multiple addresses to an email I am sending that doesn't close the contact list after I click on an address?  This necessitates constantly going back to click the + sign to add each address separately.

    Is there some way to add multiple addresses to an email I am sending that doesn't close the contact list after I click on an address?  This necessitates constantly going back to click the + sign to add each address separately.  Is there some way I can open the contact list, click on all of the individual addresses to which I want to send the email without the list closing between each address entry, and have all of my address entries be listed to the email at one time?  Something like it works in Gmail.  I do not want to use set lists, I want to enter different addresses each time I send an email.  And I am a very slow typist, so I don't want to type the first few letters of each recipient's name.  It is much faster for me to just click on the e-mail addresses in the list as a group.  It doesn't make any sense to me to have to reopen the contact list for each address, when it should be so easy to click on all of the addresses I want at one time and then click once to add them all to the email as a group.  If there is a solution to this, please tell me.  Thanks.

    Vatlily,
    Try this:
    1. Select Mail>File>New Message.
    2. Select Mail>Window>Address Panel.
    3. Use (command+click) on the desired addressees in the Address Panel to create the list.
    4. Click "To:" on the top left of the Address Panel.
    The group that you selected will be added to the "To" field in your New Message.

  • How do I add multiple apple ids to my computer iTunes

    How do I add multiple apple ids to my computer iTunes account

    You can authorize more than one account.
    iTunes Store: Authorize or deauthorize your Mac or PC

  • How do i add multiple hp 8600 printers to one account

    how do i add multiple hp 8600 printers to one account

    Hi rexdalehub,
    If you are referring to the ePrint Center, you can simply choose "Add a printer" to the right of your current printers tab.
    I was an HP employee.
    Reminder: Please select the "Accept as Solution" button on the post that best answers your question. Also, you may select the "Kudos" button on any helpful post to give that person a quick thanks.

Maybe you are looking for

  • Error in Translation

    Hi, I am converting Lables in English to Arabic. I am using the following cmd to translation java oracle.jrad.tools.trans.imp.XLIFFImporter $JAVA_TOP/grpepm/oracle/apps/per/selfservice/webui/AR/CustomReviewPG.xlf -username apps -password appsuat -dbc

  • PDF Printing in BI 7.0 - Updates

    Hi All, I have a requirement where I need to print the text elements and pictures on web templates to PDF in BI 7.0. I know that this is not supported as of SPS 9. I came to know that SAP might implement this feature in SPS 11 but I am not sure if th

  • K8N Diamond SLI...no more than 2070MHz?

    Can anyone here shed light on why my new K8N Diamond will only run with a BUS Speed of 230 MHZ with my Venice (0517) 3000+? 230x9=2070Mhz...pretty poor. I have 2.75v VDIMM 1.45v +3.3% Vcore 3x HT (16 up 16 down) Spread spectrum is off Cool & quiet is

  • I want to purchase some games in the App Store but I forget the answers. But I haven't received any email from Apple. Why is it so?

    I want to purchase some games in the App Store for my I-pad air but I forget the answers to my security questions.  Apple said that email has been sent to my account but I haven't received any email and I realized that the email below my security que

  • W540: BSOD during CD boot

    I just received a new W540 and I am unable to boot from CD/DVD.  Any attempts result in a BSOD indicating the BIOS is not APCI compatible Link to picture There is no UEFI/BIOS options to set the 'SATA Controller Mode' accordingly, nor does the [F7] t