Registering InDesign Script ID/name pair

Hello

I try to record some InDesign Script ID/name pair, but it doesn't seem to work.

These are my pairs:

TFSS, Suite TabFlow
TFob, object of the object TabFlow
TFut, event table update
TFuj, event do update of jobs
TFop, object from the TabFlow property
TFts, model for the table Propetry slug
Patiaudrey, updateJob-ID parameter

If I submit that I return to the site. There are 4 confused red symbols showing, but not a message of error or something like that. You can see in the attached priontscreen.

I want to see the pairs already registered, the site is empty.

What coud be wrong?

Thank you

Hans

My first guess would be the "-" in udateJob-ID.

So please revisit the naming conventions.

-Have a look at docs/references/scripting-dom-applescript-idr60.html for examples, AS linking is closer to the natural formatting.

-capitalization is generally left for the engine, with the exception of acronyms, for example 'suite of XML '.

-for identifiers JS, caps indicate spaces in the original name

-your starting names with generic types such as 'Suite', 'Object' will lead to confusion. Omit those who, with the exception of the suite where you make a suffix (put behind the name). for example 'suite of interactive elements '.

-This TabFlow object looks like a singleton or a preference. I would call it "option TabFlow" or "TabFlow preferably" instead, depends on the question of whether it is persistent.

-the name of the corresponding property is the plural form. See, for example

This AppleScript DOM Qouting: (I hate this wysiwyg forum editor!)

script preferences (property kScriptPrefsPropertyScriptElement)

ScriptID= 'DCPDH', name = 'script preferences '.<--- the="" property="">

Description = preferences. Script, Plugin = Scripting.InDesignPlugin
Data type = "script of preference"<---- the="" class="">


Finally, what makes you choose the "do" in "do update... "for the unique event, then omit it for each other?

Have fun

Dirk

Tags: InDesign

Similar Questions

  • Edit an Indesign script for me?

    Hi all!

    I'm fairly new to Indesign scripting and I have a script here that I would have changed.

    This script puts a several page pdf in an Indesign file and add pages as needed. From now this script appears in a dialog box that asks you what document I want than the PDF to be placed in, and I would like to have this dialog box eleminated and have the script automatically place the pdf file in the document I have active. This script also asked which page to start to put the pdf file on and I would if it would simply just start automatically on the first page of the Indesign document active without even asking me. Someone would be willing to make these changes for the script below and zip code on this thread? Let me know if I did something clear.

    var myDocument = app.activeDocument;
    //Get the current page.
    main();
    function main(){
      //Display a standard Open File dialog box.
      var myPDFFile = File.openDialog("Choose a PDF File");
      if((myPDFFile != "")&&(myPDFFile != null)){
      var myDocument, myPage;
      if(app.documents.length != 0){
      var myTemp = myChooseDocument();
      myDocument = myTemp[0];
      myNewDocument = myTemp[1];
      }
      else{
      myDocument = app.documents.add();
      myNewDocument = false;
      }
      if(myNewDocument == false){
      myPage = myChoosePage(myDocument);
      }
      else{
      myPage = myDocument.pages.item(0);
      }
      myPlacePDF(myDocument, myPage, myPDFFile);
      }
    }
    function myChooseDocument(){
        var myDocumentNames = new Array;
        myDocumentNames.push("New Document");
        //Get the names of the documents
        for(var myDocumentCounter = 0;myDocumentCounter < app.documents.length; myDocumentCounter++){
            myDocumentNames.push(app.documents.item(myDocumentCounter).name);
        }
        var myChooseDocumentDialog = app.dialogs.add({name:"Choose a Document", canCancel:false});
        with(myChooseDocumentDialog.dialogColumns.add()){
            with(dialogRows.add()){
                with(dialogColumns.add()){
                    staticTexts.add({staticLabel:"Place PDF in:"});
                }
                with(dialogColumns.add()){
                    var myChooseDocumentDropdown = dropdowns.add({stringList:myDocumentNames, selectedIndex:0});
                }
            }
        }
      var myResult = myChooseDocumentDialog.show();
      if(myResult == true){
      if(myChooseDocumentDropdown.selectedIndex == 0){
      myDocument = app.documents.add();
      myNewDocument = true;
      }
      else{
      myDocument = app.documents.item(myChooseDocumentDropdown.selectedIndex-1);
      myNewDocument = false;
      }
      myChooseDocumentDialog.destroy();
      }
      else{
      myDocument = "";
      myNewDocument = "";
      myChooseDocumentDialog.destroy();
      }
        return [myDocument, myNewDocument];
    }
    function myChoosePage(myDocument){
        var myPageNames = new Array;
        //Get the names of the pages in the document
        for(var myCounter = 0; myCounter < myDocument.pages.length;myCounter++){
            myPageNames.push(myDocument.pages.item(myCounter).name);
        }
        var myChoosePageDialog = app.dialogs.add({name:"Choose a Page", canCancel:false});
        with(myChoosePageDialog.dialogColumns.add()){
            with(dialogRows.add()){
                with(dialogColumns.add()){
                    staticTexts.add({staticLabel:"Place PDF on:"});
                }
                with(dialogColumns.add()){
                    var myChoosePageDropdown = dropdowns.add({stringList:myPageNames, selectedIndex:0});
                }
            }
        }
        myChoosePageDialog.show();
        var myPage = myDocument.pages.item(myChoosePageDropdown.selectedIndex);
        myChoosePageDialog.destroy();
        return myPage;
    }
    function myPlacePDF(myDocument, myPage, myPDFFile){
      var myPDFPage;
      app.pdfPlacePreferences.pdfCrop = PDFCrop.cropMedia;
      var myCounter = 1;
      var myBreak = false;
      while(myBreak == false){
      if(myCounter > 1){
      myPage = myDocument.pages.add(LocationOptions.after, myPage);
      }
      app.pdfPlacePreferences.pageNumber = myCounter;
    
         myPDFPage = myPage.place(File(myPDFFile), [0,0])[0];
      if(myCounter == 1){
      var myFirstPage = myPDFPage.pdfAttributes.pageNumber;
      }
      else{
      if(myPDFPage.pdfAttributes.pageNumber == myFirstPage){
      myPage.remove();
      myBreak = true;
      }
      }
      myCounter = myCounter + 1;
      }
    }
    var myPDFFrame =  myPlacePDF.parent;
    

    Thank you very much in advance for your help! I greatly appreciate it!

    This is a rewrite for you. I also added some code to remove empty pages in the document.

    /*

    PlaceMulitpagePDF condensed by Skemicle Script

    */

    If (parseFloat (app.version)<>

    main();

    on the other

    app.doScript (principal, ScriptLanguage.JAVASCRIPT, undefined, UndoModes.ENTIRE_SCRIPT, "Place Multipage PDF");

    main() {} function

    var myPDFFile is File.openDialog ("choose a PDF file");.

    If ((myPDFFile! = "") & (myPDFFile!) (= null)) {}

    var = app.activeDocument myDocument,

    myPage = myDocument.pages.item (0);

    var myPDFPage;

    app.pdfPlacePreferences.pdfCrop = PDFCrop.cropMedia;

    var myCounter = 1;

    var myBreak = false;

    while(myBreak == false) {}

    If (myCounter > 1) {}

    my page = myDocument.pages.add (LocationOptions.after, myPage);

    }

    app.pdfPlacePreferences.pageNumber = myCounter;

    myPDFPage = myPage.place (File (myPDFFile), [0,0]) [0];

    if(MyCounter == 1) {}

    New var features = myPDFPage.pdfAttributes.pageNumber;

    } else {}

    if(myPDFPage.pdfAttributes.PageNumber == myFirstPage) {}

    myPage.remove ();

    myBreak = true;

    }

    } myCounter = myCounter + 1;

    }

    } var pages = app.activeDocument.pages;

    for (c = 0; c<>

    If (pages.pageItems.length [c] == 0) {}

    pages [c]. Remove();

    }

    }

    }

  • How to change type of police using InDesign scripting (Javascript)?

    Hello

    I need to change the font type of a document, InDesign using InDesign script (javascript). I found a few online references in the InDesign scripting guide and running extract next, gives me errors.

    Delete existing preferences

    app.changeTextPreferences = NothingEnum.nothing;

    app.findTextPreferences = NothingEnum.nothing;

    app.findChangeTextOptions.caseSensitive = false;

    app.changeTextPreferences.appliedFont = app.fonts.item ("DEVANAGARI MT");

    App.Documents.Item (0) .changeText ();

    Download the msg of InDesign server.

    Error code: 1

    Error description: changeText

    The indesign file that is used to change the font is certainly not corrupt, cause the following script to export the file in .png works very well. Any help appreciated.

    app.pngExportPreferences.exportResolution = 100.0;

    App.Documents.Item (0) .exportFile (ExportFormat.PNG_FORMAT, PreviewDocument don't);

    Hello

    Try this 1-liner:

    app.documents.item(0).stories.everyItem().appliedFont = app.fonts.item("DEVANAGARI MT");
    

    Guess above specified police is available. Some disorders may begin with the name of the font, cause not always WYSIWYG.

    To be sure how to refer to a specific font by its name - a console text and notice of runing ESTK select this option:

    app.selection[0].appliedFont.name
    

    Jarek

  • I created a custom and registered with a specific name date format. However, when I open a new worksheet, my saved format does not display in the menu drop-down? Am hoping that I don't need to create the same format for each new sheet?

    I created a custom and registered with a specific name date format. However, when I open a new worksheet, my saved format does not appear in the menu drop-down? Am hoping that I don't need to create the same format for each new sheet?

    You must save the spreadsheet containing the new date as a model format and use this custom template for each new spreadsheet where you want that this date format personalized at your disposal.

  • I bought a laptop from a friend. I want to register windows in my name. How do I do that?

    I bought a laptop from a friend. I want to register windows in my name. How do I do that? I donot have a disc of origin for the removal or reinstallation of Windows XP. Pro

    Sunday, December 23, 2012 23:38:53 + 0000, G T N says:

    I bought a laptop from a friend. I want to register windows in my name. How do I do that? I donot have a disc of origin for the removal or reinstallation of Windows XP. Pro

    If I bought a used computer, no matter who that belonged
    -a friend or not - the first thing I would do with it would be to
    Reinstall the operating system itself. You do not know how the
    computer has been maintained, which has been installed incorrectly.
    What is missing, what viruses and spyware, there may be, etc. I have
    don't want to live with someone of another errors and problems,
    possibility of kiddy p0rn, etc., and I would not recommend that anyone
    otherwise do.

    Your choice of course, but in my opinion, you're playing with fire if you
    do not reinstall Windows properly.

    If you do not have an installation disc, you have probably one
    installation partition. Contact the manufacturer of the computer for
    instructions on the use of it, or buy an installation disc if you do not have
    have the partition.

    And another point: it is never necessary to 'register' of Windows,.
    regardless of the name. Registration gets you right on the list of Microsoft for
    the advertising. No registration, activation, is what is needed, and
    Activation is not made by name.

    Ken Blake, Microsoft MVP

  • If I buy a person's computer and windows is registered in their name can I have register it in my name with the OEM for windows

    If I buy a person's computer and windows is registered in their name can I have register it in my name with the OEM for windows

    If I read your question correctly, this article should solve your problem for you:

    "How to change name and company information after you install Windows XP"
      <>http://support.Microsoft.com/kb/310441 >

    HTH,
    JW

  • InDesign Scripting - increase of height of 1 mm

    Hello

    I'm still new to indesign scripting and have struggled to find an answer.

    I have an empty rectangle frames page, all different sizes.

    Is there a way I could select all images, run a script 'enlarge' via a keyboard shortcut, and all the boxes will increase by 2mm X + Y in the center of the frame.

    Example - Frame w: 63mm frame h: 87.3 mm

    < run Script - width = width + 2mm, height is height + 2mm >

    < result >

    Frame w: 65mm h frame: 89.3 mm (from the Center)

    < image >

    Repeat the <>

    I'd appreciate any help I can get on this issue

    Thank you!

    Indiscripts: Equalizer 3 BETA new features

  • How to pass the content of an xml element in the text frame in inDesign Script

    var XMLFile = File.openDialog ("select XML Files... ») ;

    var doc = app.activeDocument;

    If (!) App.Documents.Length)

    {alert ("ERROR: Document not opened");}

    return;

    }

    doc.importXML (XMLFile);

    var firstFigureNode = doc.xmlElements [0] .xmlElements [1] .xmlElements [0];

    var lableNode = firstFigureNode.xmlElements [0];

    var lableNodeText = lableNode.contents;

    myFrame var = doc.textFrames.add ({geometricBounds: [-13, 13, 3, -3]});

    lableNodeText.move (LocationOptions.AFTER, myFrame.texts [0]);

    ========================================================

    My requirement is: == > > move the content of an xml element in the text by inDesign Script block, but XML InDesign file Structure should not be change & data in the XML Structure should remain as it was before...

    I tried to code above, but it does not work...

    Please can someone help me in solving this problem...

    It does not work correctly...

    It moves firstFigureNode in myFrame...

    firstFigureNode.placeXML (myFrame);

    ===>> For Apple Script try below Code ===>>

    myFrame markup using firstFigureNode

  • I'm new in indesign scripting, please tell me how to write a script to get the contents of an XML element and then sort all the content

    I'm new in indesign scripting, please tell me how to write a script to get the contents of an XML element and then sort all the content

    Hello

    Can the code below is useful for you, but I do not know how to sort.

    Change the tag based on your employment application.

  • InDesign script to run on the action?

    Hi, can someone help - is it possible to set up an indesign script to be triggered to perform an action, for example when you export to PDF (instead of manually running the script)? To explain, I have a script that creates a text box to display the size of the indesign document, but if the size of the page change the text box does not update unless you manually run the script again. so I was wondering if it was possible to put the script to run when the document is exported to PDF, so in theory be PDFd with the size of the pages always display up-to-date!

    I approach this issue perspective, as altogether new to the am scripts.

    Thanks in advance for any suggestions.

    Hi Trevor - thank you very much for this - (after a bit of trial and error with changes!) managed to make it work.

    Work of great stuff.

    Thanks again

  • Canvas support in Indesign scripts?

    Hello

    short version:

    I was wondering if it is possible in any way to include automatically generated content (Using canvas api for example) raster design using JavaScript?

    Long version:

    I noticed that the In-design supports a very old version of JavaScript, and since I'm pretty new to InDesign scripting, I thought, it's best to inquire about its capabilities / limitations before planing on what to do with it! I wrote a Javascript (not in in-design script) code which generates unique random patterns of patterns, now, I'm interested if I can integrate it into scripts in design so she would put one of these raster images in each page of a design document (IE: left and right of each face relatively pages);

    also since my first guess after reviewing documentation of object a little design model has been that it is very limited to what is possible via the user interface software (and not everything/something new/more), so I was wondering (in this case), how is it possible to connect a script for an external script and send and receive the data/vars between them; like putting the two scripts in the same folder, one calls the other is giving some info (size of the document, etc.), the second script runs (outside of ID), put the images on the disk and return to the main script when's done it! :/

    I have a few other sketches of solution as well in my mind, but wanted to get your opinion before doing anything ridiculous! :-)))

    I really appreciate your in - put on this point.

    THX, mim,

    And Yes! It seems that I can run an external file of any type!

    After reading and looking for some time, finally:

    In the page 52nd documentation, it says:

    Execute()
    fileObj.execute)
    Open this file using the appropriate application, as if she had been double-clicked in a file Explorer. You can use this method to run scripts, launch applications and so on

    Voila! Exactly what I need (if what I think I need is actually what I need! indeed!)

    I'll try to see if it works later (actually impatient!) and thx again!

    mim

  • InDesign script to put the excel file

    Hi all, I'm new to Indesign Scripting, and I hope someone can help me with the following code:

    All I want to do is:

    1. Open the indesign file
    2. Open excel file
    3. ExcelFile place as a table (with active flow)
    4. export as PDF & save document

    Thank you!

    //Define file to open
    var myDocumentFile = new File("/d/Projecten/Indesign Server/document.indd");
    //Define file to save
    //var mySaveFile = new File("/d/Projecten/Indesign Server/document_save.indd");
    //Define file to export
    var exportPDF = new File("/d/Projecten/Indesign Server/document_save.pdf");
    //Open xls-file to place as table
    var myExcelFile = new File ("/d/Projecten/Indesign Server/products.xls");
    
    var result = "";
    if(!myDocumentFile.exists) {
        result = "Unable to find DOCUMENT:  " + myDocumentFile.path;
        $.writeln(result);
        exit();
    } else if(!myExcelFile.exists) {
        result = "Unable to find EXCEL:  " + myDocumentFile.path;
        $.writeln(result);
        exit();
    } else {
        // Open file
        var myDocument = app.open(myDocumentFile);
        with(app.documents.item(0).pages.item(0)){
            myTarget = textFrames.item("tabel");
        }
        var myPage = myDocument.pages.item(0);
    
        //Set excel placement properties
        setXLimportPrefs();
    
        // Place Excel file
           try {
                 $.writeln("Place Excel file");
                //HELP!! HOW TO PLACE EXCEL FILE?
                //myTextFrame.place(myFile);
            }
            catch (e) {
                 $.writeln("Place Excel file "  + e + " " + app.excelImportPreferences.errorCode);
                myDocument.close();
                exit();
            } 
        if(!exportPDF.parent.exists && !exportPDF.parent.create()) {
            result = "Not exported.  Unable to create the folder:  " + exportPDF.parent.fullName;
            $.writeln(result);
        } else {
            app.documents.item(0).exportFile(ExportFormat.pdfType, exportPDF, app.pdfExportPresets.item("[Press Quality]"));
        }
        myDocument.exportFile(ExportFormat.PDF_TYPE,exportPDF);
        myDocument.close();
    }
    
    function setXLimportPrefs(){    $.writeln("setXLimportPrefs()");
            with(app.excelImportPreferences){
                //alignmentStyle property can be:
                //AlignmentStyleOptions.centerAlign
                //AlignmentStyleOptions.leftAlign
                //AlignmentStyleOptions.rightAlign
                //AlignmentStyleOptions.spreadsheet
                alignmentStyle = AlignmentStyleOptions.spreadsheet;
                decimalPlaces = 4;
                preserveGraphics = true;
                //Enter the range you want to import as "start cell:end cell".
                rangeName = "A1:B16";
                sheetIndex = 1;
                sheetName = "Appetizers";
                showHiddenCells = false;
                //tableFormatting property can be:
                //TableFormattingOptions.excelFormattedTable
                //TableFormattingOptions.excelUnformattedTabbedText
                //TableFormattingOptions.excelUnformattedTable
                tableFormatting = TableFormattingOptions.excelFormattedTable;
                useTypographersQuotes = true;
                viewName = "";
            }
    }
    result;
    
    

    myTextFrame is not defined in your script.

    It works for me:

    myTextFrame = app.selection[0];
    var myExcelFile = new File ("~/Documents/idml/some file.xlsx");
    myTextFrame.place (myExcelFile);
    

    -When I select a text block, of course.

    To debug this, you can remove the try... catch statements because they're actually hiding the error now: InDesign can place the file, but the variable does not exist.

    Thankfully, I fell it many times before.

  • InDesign script to accept changes in the stories?

    Hi Chaps,

    I work for an agency, which manages the customer to translate InDesign documents.

    From time to time, we must accept all the 'track changes', as 'InsertedText' has been left by the customer.

    Is there an automated process, or a script that can loop through all stories in a document and validate every change?

    Thanks in advance

    Close.

    App.documents [0]. Stories.everyItem ().changes.everyItem (). Accept();

  • passage OEM "SQL Script" job name in lowercase as proxy database

    Hello

    I have a SQL script that requires the name of the database in lower case to be passed when running - she uses it as a substitution variable to create database directories that point to the UNIX file system (which is why they are case sensitive). I want to be able to configure this script as work in OEM (12 c version 3) so that I can run on several databases (11.2.0.3), but at the creation of employment, the % DBName parameter returns only the name of the database uppercase. I tried to change the % DBName parameter and run the script in a PL/SQL block, but the variable I spend it is interpreted as a literal string. I also tried to run in a shell script, but because of the way the user operating system is set up that I can't get that to work either.

    Does anyone have any ideas how this can be done? Ideally, I wish I could just run @script lower (%DBName%) or something similar.

    Thanks in advance,

    Robin

    In case anyone else has trouble with this, I worked on that I was able to use a PL/SQL block to convert the variable substitution for lower case, then create the directory with the variable:

    DECLARE

    v_lowerSID varchar2;

    BEGIN

    Select lower ('& 1') in the double v_lowerSID;

    run immediately ' create the db_dir as directory "/ [path] /' | v_lowerSID | '/' || v_lowerSID | ' _directory1 "';

    END;

    /

  • Photoshop Script add name of Image file as text, but remove '-' character

    I found a script that will take the name of my image file and place it on the image, less file extension. I added this to an action, which works exactly how I want, but my filenames have '-' characters in them.

    Is it possible to remove the '-' characters of the script? I was not able to get the function replace to work. (that I need).

    This is the code that works right now:

    // Now create a text layer at the front
      
    var myLayerRef = docRef.artLayers.add();
      myLayerRef
    .kind = LayerKind.TEXT;
      myLayerRef
    .name = "Filename";

      
    var myTextRef = myLayerRef.textItem;

      
    // strip the extension off
      
    var fileNameNoExtension = docRef.name;
      fileNameNoExtension
    = fileNameNoExtension.split( "." );
      
    if ( fileNameNoExtension.length > 1 ) {
      fileNameNoExtension
    .length--;
      
    }
      fileNameNoExtension
    = fileNameNoExtension.join(".");  
      myTextRef
    .contents = fileNameNoExtension.substring(2);


      
    // myTextRef.contents = fileNameNoExtension.replace(/^-/i, '');


      
    // off set the text to be in the middle
      myTextRef
    .position = new Array( docRef.width / 2, docRef.height / 2 );
      myTextRef
    .size = 28;
    }

    myTextRef.contents = fileNameNoExtension.replace (/-/ g, ");

Maybe you are looking for

  • Problem flashing with live viewing with IMAQ Image display

    Hello world I am writing a program for live imaging with camera Andor. I use some examples from Andor. The images are acquired in sequence and send in Image IMAQ and also graphical intensity display. There is minimal flicker issue in the graph of the

  • Analog voltage trigger

    I'm using LabVIEW 7 on windows 2000 with the PXI-4461 I'm trying to have the labview read arriving through the analog input voltage but start recording data when the voltage passes a certain threshold value. I tried an example 'acquisition & graph co

  • How can I change a variant of time 2D a 2D string?

    Hi, I'm new to LabVIEW.  Can someone help me with this issue? How can I change a variant of time 2D a 2D string? Please see attached. mrgudwrnch

  • Homegroup does not connect to internet

    original title: homegrouphelp me with the conncut enternet plese

  • Unable to download updates or add new programs on my computer

    When I try to load updates and/or new programs on my computer, that they begin to load, but always stop and that's what I get. Install the Windows service could not be accessed. This can happen if your running windows in safe mode or if windows insta