running personalized script called just a function?

Work on fixing someone else Adobe forms.  "On the validation tab, they have (run a custom script val) checked, but then it just says" YesNoV (event); "in the editor.   This call to a function from somewhere's else?  I googled adobe thought YesNoV (event) has its own library of JavaScript we can use, but can not find any library.  A fact the creator of this form do not create this form accurately?  I understand it if there were some conditional code in the editor, but don't know what the event is trying to do.  We guess just capture if the user says y or N?

Guess I'm trying to find out what is supposed to happen if the user selects N or, if something is supposed to happen.   otherwise I can disable the validation, because it does not work properly anyway.

I know little of JavaScript, but new for use with the Adobe forms.  (just enough to be dangerous, but not enough to accomplish whatever it is) lol.

Thanks in advance,

Jim

Adobe Acrobat Pro DC, Windows.

Is not in fact a function provided Adobe but a custom function added to the document JavaScripts section. May be easier to edit here.

You say that you don't see any code for what he does, but you have published, in its entirety:

function YesNoV (event) {if (event.value! = null) event.value = event.value.toUpperCase (); if (event.value! = "Y" & event.change! = "N") event.rc = false ;};}

We will write with the best layout

function YesNoV (event)

{

If (event.value! = null) event.value = event.value.toUpperCase ();

If (event.value! = "Y" & event.change! = "N") event.rc = false;

};

Tags: Acrobat

Similar Questions

  • Can run us an idoc to personalized script?

    Is it possible to run a script idoc when executing a custom service?

    -Pratap

    Hello!
    Yes, it is possible.

    First, create a pagemerger of your execution context object:

    PageMerger pagemerger = (PageMerger) cxt.getCachedObject ("PageMerger");

    Then, run a script idoc with

    pagemerger.evaluateScript ("<$foo$>");

    Good luck!

    / Sam

  • Run a script by clicking on a button panel

    Hello

    I am very new scripting in after effects and in general.
    Several months ago I write several small scripts to speed my work flow. I have run it through the "Launching pad" script Panel.
    Now, I have my scripts in my own panel but miss me properties to bind the part "script" and the "part of the group.

    For the Panel, I have (just one button for now):

    ---------------

    win = new window ('window', 'new project', [0,0,500,500], {Center:true,});})

    but_1 is Win.Add ("Button", [33,16,103,36], "Sharpen3Way");.

    Win.Center ();

    Win.Show ();

    ------------------

    and my previous script that operate independently.

    ----------------

    myComp = app.project.activeItem;Select the composition active

    app.beginUndoGroup ("sharpness 3 Way");Starting group Undo

    mySolid01 = myComp.layers.addSolid ([100,100,100], "Whet", myComp.width, myComp.height, 1);   Layer of United Nations Adds solid

    mySolid01.adjustmentLayer = true;En transforms the solid layer of setting
    mySolid01.label = 5;Sets the color of a layer of setting
    mySolid01.opacity.setValue (40);Change the opacity of the layer

    myEffect = mySolid01.property("Effects").addProperty ("Unsharp Mask") .name = "Unsharp Mask wide";Adds an effect on this layer

    myEffect = mySolid01.Effects.property ("Unsharp Mask Large") (1) .setValue (10);

    myEffect = mySolid01.Effects.property ("Unsharp Mask Large") (2) .setValue (40);

    myEffect = mySolid01.property("Effects").addProperty ("Unsharp Mask") .name = "Unsharp Mask Medium";Adds an effect on this layer

    myEffect = mySolid01.Effects.property ("Unsharp Mask Medium") (1) .setValue (65);

    myEffect = mySolid01.Effects.property ("Unsharp Mask Medium") (2) .setValue (1);

    myEffect = mySolid01.property("Effects").addProperty ("Unsharp Mask") .name = "Unsharp Mask Fine";Adds an effect on this layer

    myEffect = mySolid01.Effects.property ('Unsharp Mask Fine') (1) .setValue (95);

    myEffect = mySolid01.Effects.property ('Unsharp Mask Fine') (2) .setValue (0.5);

    app.endUndoGroup ();Dispose of end group

    ---------------------------

    How the relationship to run the script, when I click on the but_1 ("Sharpen3Way")

    Thank you.

    Hello

    If you have a lot of paperwork and they are short like that, you can turn them into functions and in, click events, the function is called.

    A little off topic but I think it is important, to (1) avoid type windows showcase, pallets are better, (2) you must use the keyword "var" in the declaration of new variables,

    (3) to make attachable take a look at the tutorials from David Torno ([tutorial] after effects ExtendScript written Script).

    Edit: And also (4), you must use matchNames (or index) return to properties, not English name. If you give this script to someone who doesn't have an AE I English, this probably will not work

    For example myEffect should be instead: myEffect = mySolid01.property("ADBE_Effect_Parade").addProperty ("ADBE blur Mask2");

    Xavier.

    (function(){
    
        var win, but_1, but_2;
    
        win = new Window("palette","new project",[0,0,500,500],{resizeable:true,});
        but_1=win.add("button",[33,16,103,36],"Sharpen3Ways");
        but_2=win.add("button",[33+100,16,103+100,36],"Sharpen0Way");
        but_1.onClick = sharpen3Ways;
        but_2.onClick = sharpen0Way;
        win.center();
        win.show();
    
        function sharpen3Ways(){
    
            var myComp, mySolid, myEffect;
    
            // Selectionne la composition active
            myComp = app.project.activeItem;
    
            if (myComp instanceof CompItem){
                app.beginUndoGroup("Sharpen 3 Way");                  // Start Undo Group
    
                // Ajoute un layer Solid
                mySolid01 = myComp.layers.addSolid([100,100,100], "Sharpen", myComp.width, myComp.height,1);
                mySolid01.adjustmentLayer = true;                                                                                                      // Transforme le Solid en Adjustement Layer
                mySolid01.label = 5;                                                                                                                            // Attribue la couleur d'un Adjustement Layer
                mySolid01.transform.opacity.setValue(40);                                                                                                          //  Change l'opacité du Layer
    
                // Ajoute un effet  sur ce calque (unsharp mask)
                myEffect = mySolid01.property("Effects").addProperty("Unsharp Mask");
                myEffect.name = "Unsharp Mask Large";
                myEffect(1).setValue(10);
                myEffect(2).setValue(40);
    
                // Ajoute un effet  sur ce calque (unsharp mask)
                myEffect = mySolid01.property("Effects").addProperty("Unsharp Mask");
                myEffect.name = "Unsharp Mask Medium";
                myEffect(1).setValue(65);
                myEffect(2).setValue(1);
    
                // Ajoute un effet  sur ce calque (unsharp mask)
                myEffect = mySolid01.property("Effects").addProperty("Unsharp Mask");
                myEffect.name = "Unsharp Mask Fine";
                myEffect(1).setValue(95);
                myEffect(2).setValue(0.5);
    
                app.endUndoGroup();                // End Undo Group
                }
            else{
                // ignore or send some alert
                };
            return;
            };
    
        function sharpen0Way(){
            alert("About to do something, ... dont know yet what.");
            };
    
        return;
        })();
    
  • Call a Javascript function in a Captivate 7 Web page

    Hello

    I try to call a javascript function in a web page to Captivate 7. The call is an output of blade event. When I saw the (F4) project, I have a prompt that displays a javascript function is called and told me to display in a web page. Of course, which is perfectly logical. However, when I go to the same project in the hml with the necessary Javascript function in page, I get nothing. The script is a simple that displays an alert.

    I made sure the SWF in question is defined in the global security settings. I know that the javascript function is correctly formatted.

    Can someone please give me an example of how to "execute Javascript" call of Captivate to a function residing in the html page please.

    Any help is appreciated.

    Don't just add the SWF file to the Flash security locations overall of confidence.  Add the entire folder containing all the files published, or better still, a level that contains all your published Captivate projects so that you never have to worry about Flash security issues again.

    Also, if it still does not work, I would try the same running JavaScript with a different event than the event output slide.  It can be a little bit reliable.

  • Run the script FDM Essbase, no .bat files

    I want to run a script directly from FDM Essbase without needing to use a .bat file.
    I went to hollow post where calls MaxL scripts are discussed, but I have not found anywhere, there is a solution for sending a script to essbase.

    I have problems connecting to essbase using already existing and subsequently adapter configurations send an essbase script to the server. This is done for example in the Load event - where the essbase data are disabled. I would need assistance on how to implement this kind of soluition in the event script for example BefImport.

    Hi Nicklas,

    A couple of things to note.

    You must pass a 1 as the first parameter to use a file as a calculation script. Note that a calculation .csc script example files that are in your database and it's called AggMonth.csc you would spend in:
    Set objHWRerurn = API. IntBlockMgr.IntegrationMgr.PobjIntegrate.varCon.DataManipulation.fCalculate(1,"AggMonth")

    If you use 2 as the parameter to the fCaculate function, which means that the calculation script is a string, you can search for 'Essbase calculation chain' in the adapter to see how it works.

    If you really want to use a .maxl script and not an Essbase calc script you do not use the fCaculate function and will shout to essmsh.exe with parameters that does not use FDM adapter functions.

    PS You can also configure features of validation in FDM and assign scripts to those and then tell FDM you use 'file '. For the planning/essbase, it makes more sense to have just a script probably the method you follow.

    Kind regards

    John A. Booth
    http://www.metavero.com

    Published by: Jbooth on March 18, 2011 09:25

  • A script can run another script?

    Ladies and gentlemen,

    I don't know of a function call to another file for which I used the #include directive. I want to run a .jsx I don't know until run time.

    So far, I found this: If a script file contains

    #target framemaker

    It is possible to use line (lvFilename) () .execute (without the target instruction that would just open the script in ESTK).

    But: The execute() method triggers a warning that I need to run only scripts that are from reliable sources (or so...).

    Is there another method to run other scripts? Or y at - it a way to make my trusted scripts?

    -Michael

    Michael, here's another idea of eval():

    scriptFile var = File('/c/Projects/ExtendScript/Alert.jsx');
    var script = "#include" + scriptFile.fullName;

    eval (script);

    I tried this and it handles nested #includes and $. Filename. I can't be sure it would work in any case however. I think there must be a more elegant way...

    Ian

  • Running MatLab script

    Hi guys!

    I use TestStand to connect a bunch of data and save them as binary files. When the test is finished, I would like to start a matlab script. For the moment I do it manually, just open MatLab and change the path used by the script to find the particular set of binaries to test.

    What I understand you can use MathScript with the basic package.

    I requires nothing more of Matlab open / running a script in the background at a time given in the test. Could it be done by using a system call and just passing the path as a parameter to a LabView VI?

    Any IDE for what is the best approach?

    Thank you for your time!

    Ah, I understand now. Yes, the basic edition doesn't have the Matlab script node. In this case, you can use Exec System to simply call the Matlab command line. Matlab documentation contains various switches to it.

  • Two parallel executions, calling a DLL function

    Hello

    Since this test takes about 6 hours to test my USE, I plan to use the parallel model to test 2 UUT at the same time in parallel.

    I implement the test code as a DLL of CVI.

    However, to my surprise, it seems that the steps that call a DLL function actually traveled in one series, not in parallel:

    Test 2 power outlets if one enters and executes a DLL works, the other waits for the first to complete its operation and return. While the other runs on the same copy of the DLL, so that the DLL global variables are actually shared between executions.

    So if a DLL will take 5 minutes to complete, two executions in the running at the same time take 10 minutes. This isn't a running in parallel in every way.

    What I want and expect also TestStand, was to completely isolate the copies of these two executions DLL such as test two casings could run at the same time the same DLL function by arbitrary executiong their copy of the function, completely isolated from one another.

    So they separated globals, discussions, etc., and two parallel jacks take 5 minutes to run a step, instead of 10.

    Such a scenario is possible?

    If not, how can I use my test in parallel (in truly parallel) when the use of 2-socket test?

    (1) Yes, he'll call the multiple executions in TestStand calling into the same dll in memory the same copy of this DLL. Thus dll called in this way must be thread-safe (that is written in a way that is safe for multiple threads running the code at the same time). This means usually avoiding the use of global variables among other things. Instead, you can store the thread shows in local variables within your sequence and pass it in the dll as a parameter as needed. Keep in mind all the DLLs your dll calls must also be thread-safe or you need to synchronize calls in other DLLs with locks or other synchronization primitives.

    1 (b) even if your dll are not thread-safe, you might still be able to get some benefits from parallel execution using the type of automatic planning step and split your sequence in independent sections, which can be performed in an order any. What it will do is allow you to run Test a socket A and B Test to another socket in parallel, and then once they are then perhaps test B will take place on one and test one run on the other. In this way, as long as each test is independent of the other you can safely run them in parallel at the same time even if it is not possible to run the same test in parallel at the same time (that is, if you can not run test on two Sockets at the same time, you might still be able to get an advantage of parallelism by running the Test B in one take during the tests in the other. See the online help for the type of step in autoscheduling for more details).

    (2) taken executions (and all executions of TestStand really) are threads separated within the same process. Since they are in the same process, the global variables in the dll are essentially shared between them. TestStand Station globals are also shared between them. TestStand Globals file, however, are not shared between runs (each run gets its own copy) unless you enable the setting in the movie file properties dialog box.

    (3) course, using index as a way to distinguish data access are perfectly valid. Just be careful that what each thread does not affect data that other threads have access. For example, if you have a global network with 2 elements, one for each grip test, you can use safely the decision-making of index in the table and in this way are not sharing data between threads even if you use a global variable, but the table should be made from the outset before start running threads , or it must be synchronized in some way, otherwise it is possible to have a thread tries to access the data, while the other thread is created. Basically, you need to make sure that if you use global data which the creation/deletion, modification and access in a thread does not affect the global data that the other thread use anyway in or we must protect these creation/deletion, modification and access to global data with locks, mutex or critical sections.

    Hope this helps,

    -Doug

  • How to run the script with parameters such as alarm action .ps1

    Hello

    I know not how to configure alarms, I know that I can point to monitor cluster for changes (via the GUI), but... I have different groups and I would like to set an alarm by vCenter which monitors cluster for changes. Let's call it "RefreshCapacityInfoOnExternalDB".

    So, lets just say. I would like to run my script whenever a virtual computer is added, Reconfigured or ESX host are removed, added in a Cluster. The alarm would launch the .ps1 script written in turn the ability to update external db cluster info.

    Shortly said: ability to cluster values are changed

    What I need is this: run the script-> CapacityInfoRefresher.ps1 < Cluster_name_where_ReconfigEventsTookPlace >

    I guess that, first I need an environment variable (if it exists) that can be used as a parameter for the < Cluster_name_where_ReconfigEventsTookPlace > placeholder script. Right?

    Chapter 16 of the book of LucD & Friends "PowerCli reference" mentions some environment vars but I'm stuck. Anyone using these options?

    THX

    A.S.

    You can set your alarm on the node above in your vCenter tree, this way it will be active for all collections in the vCenter.

    These alarm environment variables are automatically available for your alarm script when it is triggered.

    These environment variables, you will be able to determine to which cluster the alarm was pulled.

    So I don't think that you need to pass this information as a parameter to the script.

    Perrhaps you could share what exactly alarm you want to set and what looks like the script which should trigger alarm.

    And Yes, I use these environment variables in scripts of alarm

  • External applications of the script call

    Hello

    Wish to be able to run an external application via the script, just like the way we do in node.js via the module 'child_process '. The reason is I want my epub converted to mobi automatically after exporting. The app that I will call is kindlegen.exe. Is it possible to extend script? I tried the tutorials on ExternalObject but have not implemented the chance.

    The file object has an execute() method. In this way, you can run any script shell application or generated.

    InDesign, unlike other environments ExtendScript also has the doScript method to invoke the platform specific languages.

    Then, these languages have their way to call the shell without a separate file commands.

    For example the following excerpts show files in the Finder/Explorer.

    app.doScript(
    "tell application \"Finder\"\r"
    + "reveal {"+list.join(", ")+"}\r"
    + "activate\r"
    + "end tell\r" ,
    ScriptLanguage.applescriptLanguage);
    

    or

    app.doScript(
    "CreateObject(\"WScript.Shell\").Run \"explorer /n,/e,/select,"+f.fsName+"\"",
    ScriptLanguage.visualBasic);
    
  • Run the Script on the Open Document event

    OK so I know about the spectacle of afterOpen and I think I understand how to use it, however, I do not understand how to open to a specific document.

    I don't want this script runs on all the documents that I opened, I would like to incorporate into a document and then run it whenever I open this document. Is this possible?

    Maybe run the script in the script label?

    Or I just put a script in the start Panel, and then create a session script that checks the name of each document open and then runs the script, if I have a match?

    Thank you

    As you chart put it in the startup scripts folder

    //startup script
    #targetengine "session"
    main();
    function main(){
        var myEventListener = app.eventListeners.add("afterOpen", excuteScriptLabel);
    }
    
    function excuteScriptLabel(myEvent){
              //The parent of the event is the document.
              var myDocument = myEvent.parent;
        if (myDocument.constructor.name == "Document") {
            if (myDocument.label != "")
                app.doScript(myDocument.label, ScriptLanguage.javascript);
        }
    }
    

    Then try this line on a document and save it, and then open the same file and a few others, you will notice that this code only run on this document:

    app.activeDocument.label = "alert (\"Yes\");";
    
  • ScriptUI run the script in the button of the dialog box

    Here's what I have right now.  It's a little awkward in the way it works, and I just have a little smoother.

    I have a script at startup which creates a Menu item with a submenu of the menu item drop-down. When you click the submenu item, it runs a script.

    The first thing the script is pop up a message box that tells them that two dialog boxes go to the pop-up window. One by asking them to choose the location of an xml file and the second dialog box that ask them to choose the location of their folder of images.  After you finish choose their folder in the second dialog box, the script takes these two values, makes variable and continues to run the rest of the script.

    Here's what I would...

    1. open a window for dialogue with two input fields, both 'Browse' buttons and OK and CANCEL buttons

    2. When you click Browse next to the first input box for the first button, it will open a file dialog window.  You select your file and the file string will populate the input field

    3. When you click on the second button next to the second entry field, it opens a file dialog window.  You select the file and the string fills the second input field.

    4. When you click OK, it nurtures values in the input to a script fields.

    I already have scripts which opens the dialog for file and folder boxes, but what I can't understand how the is to start and run a script to a button press, in this case, when you press the OK button.  It's probably an onClick, but I was not able to find examples of what would be the syntax.

    Is the closest I found in the beginning ScriptUI document that was on the site of Jongware, in the section on Communication between the windows.  But each window opens with a different scenario and is not using a button to call a script.

    As always, any point in the right direction is much appreciated. Thank you.

    ScriptUI windows and JS file dialog boxes are not communucate. To get a return value in a file dialog box, you would do something like this:

    myFile = file (myFolder) .openDlg ("select files");

    If (myFile = null)

    back, do nothing

    The JavaScript Tools Guide CSx (see the Help menu on the ESTK) documents several dialogues selection of files and folders.

    Peter

  • Call to undefined function getsqlvaluestring() with PHP mysql Dreamweaver

    Hey guys, I'm new to the forum and it seems very useful. I think I have a unique problem well.

    Although this script worked for a year or two, all of a sudden, during the holidays, he went to hay

    Front end is always get all the information, it must be the Database.But when I try to connect through the side admin I created with php and database of dreamweaver extensions normal I get this error.

    I do not know many php - then I'll hide the chain at the moment - if I need to paste the code that I'll - thank you in advance


    Fatal error
    : Call to undefined function getsqlvaluestring() in /xxxxx/xxxx/xxxxxxx/xxxxxxx/newsletters/xxxxxxx/xxxxxxx/admin/login.php on line 22

    Vicinity of line 22 looks like this

    @mysql_select_db ($database_promocenter, $promocenter);

    $LoginRS__query = sprintf ("SELECT username, password, destination_page FROM users WHERE username = %s AND password is %s",

    GetSQLValueString ($loginUsername, "text"), GetSQLValueString ($password, "int"));

    $LoginRS = mysql_query ($LoginRS__query, $promocenter) or die (mysql_error ());

    $loginFoundUser = mysql_num_rows ($LoginRS);

    If {($loginFoundUser)

    First part looks like this

    < form id = "form1" name = "form1" method = "POST" action = "<?" PHP echo $loginFormAction;? > ">"
    < b >
    < td bgcolor = "#dedede" >
    < table width = "400" border = "0" align = "center" cellpadding = '3' cellspacing = "0" bgcolor = "#ffffff" >
    < b >
    < td height = "35" align = "right" valign = "middle" id = "description" > user name: < table >
    < height td = "35" > < label >
    < input style = "height: 20px;" border: 1px solid #999999 "name ="username"type ="text"id ="username"size ="35"/ >"
    < / label > < table >
    < /tr >
    < b >
    < td height = "35" align = "right" valign = "middle" id = "description" > password: < table >
    < height td = "35" > < label >
    < input style = "height: 20px;" border: 1px solid #999999 "name ="password"type ="password"id ="password"size ="35"/ >"
    < / label > < table >
    < /tr >

    Anton

    Could also show you it could never work.  Why?  Because the call to the function is made before the function is defined.  He would always stop execution with an undefined function error.

    Now - it seems that you have added the users authentication that was placed before the code block in which the function is defined.  So I would say that you move it-

    If (! function_exists ("GetSQLValueString")) {}

    function GetSQLValueString ($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")

    {

    If (via PHP_VERSION< 6)="" {="" 6)="">

    $theValue = get_magic_quotes_gpc()? stripslashes ($TheValue): $theValue;

    }

    $theValue = function_exists ("mysql_real_escape_string")? mysql_real_escape_string ($TheValue): mysql_escape_string ($theValue);

    Switch ($theType) {}

    case 'text ':

    $theValue = ($theValue! = "")? « " ». $theValue. "" "": "NULL";

    break;

    case "long":

    case "int":

    $theValue = ($theValue! = "")? intval ($TheValue): 'NULL ';

    break;

    case "double":

    $theValue = ($theValue! = "")? doubleVal ($TheValue): 'NULL ';

    break;

    case "date":

    $theValue = ($theValue! = "")? « " ». $theValue. "" "": "NULL";

    break;

    case "set":

    $theValue = ($theValue! = "")? $theDefinedValue: $theNotDefinedValue;

    break;

    }

    Return $theValue;

    }

    }

    from its current location to a new block just under the connection with the directive, i.e.,.

    MOVE HERE ? >

    <>

    Validate request to connect to this site.

    so that the final code looks like this-

    <>

    If (! function_exists ("GetSQLValueString")) {}

    function GetSQLValueString ($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")

    {

    If (via PHP_VERSION< 6)="">

    $theValue = get_magic_quotes_gpc()? stripslashes ($TheValue): $theValue;

    }

    $theValue = function_exists ("mysql_real_escape_string")? mysql_real_escape_string ($TheValue): mysql_escape_string ($theValue);

    Switch ($theType) {}

    case 'text ':

    $theValue = ($theValue! = "")? « " ». $theValue. "" "": "NULL";

    break;

    case "long":

    case "int":

    $theValue = ($theValue! = "")? intval ($TheValue): 'NULL ';

    break;

    case "double":

    $theValue = ($theValue! = "")? doubleVal ($TheValue): 'NULL ';

    break;

    case "date":

    $theValue = ($theValue! = "")? « " ». $theValue. "" "": "NULL";

    break;

    case "set":

    $theValue = ($theValue! = "")? $theDefinedValue: $theNotDefinedValue;

    break;

    }

    Return $theValue;

    }

    }

    ?>

    <>

    Validate request to connect to this site.

  • When I run my script from a shortcut ExtendScript is invoked, but this isn't when I run the menu

    I use Photshop CS2 on Win XP

    I set up a keyboard shortcut (Ctrl + Alt + P) to execute a .jsx file in the folder... \Presets\Scripts\.

    When I activate the script via the keyboard shortcut ExtendScript is called and interrupts execution on main() statement (see below).

    When I activate the script via the menu file/Scripts that extendscript is not called and the script runs up to the end.

    The .jsx file is a wrapper for a .vbs script that does the 'real' work

    The .jsx is:-

    main() function
    {
    var VBSscript = file ("C:/Program Files/Adobe/Adobe Photoshop CS2/Presets/Scripts/GGN_PS_Code_v1_2.vbs");
    If (VBSscript.Exists) VBSscript.execute ();
    }
    main();

    Anyone have any ideas on how to disable the invocation of ExtendScript when I run the script from the skortcut?

    One thing to check is that the .jsx extension is associated with Photoshop and not ExtendScript.

  • [CS5] Run a script on the open document

    Is it possible to run a script automatically whenever a document is open?

    Application has the "beforeOpen" event listener, which won't work, the document is not opened and Document has the "afterOpen" event listener, but which cannot be added until after the document is already open, so I'm not sure was what it serves.

    Any help would be appreciated.

    /Dan

    .. .and document has the "afterOpen" event listener, but will not be added until after the document is already open, so I'm not sure what it serves.

    You can do it-here is an example:

    #targetengine "MyEngine"
    
    var myEventListener = app.eventListeners.add("afterOpen", myDocOpen, false);
    
    function myDocOpen(myEvent)
    {
         var myDoc = app.documents[0];
        myDoc.pages.add(LocationOptions.AT_END);
    }
    

    It is important to use app.documents [0] instead of app.activeDocument when you use the afterOpen event.

    This simple script adds a new page whenever a document is open. Written and tested on CS3, windows.

    Kasyan

    P.S. I just tested on CS5 - it works here as well, but it adds two pages instead of one for a reason any.

Maybe you are looking for

  • Printing error: setcolorspace

    Hello I never had trouble printing to my office, but recently, I get a print error regardless of the document to print. I downloaded the latest driver from the website of the society of the printer to see if that would solve anything and it didn't. P

  • HP Pavilion 14 v042tx: Wireless not found hp pavilion 14 v042tx

    Yesterday installed Windows 8.1 on UEFI mode since my previously installed Windows 10 in BIOS/Legacy mode, after that my Broadcom Wireless Device does not work, it always show no link found even this device is found and works correctly by the Device

  • How to use Dasylab measurement temperature TC

    Hello I need measure the temperature of the thermocouple DataShuttle-3000 with Dasylab. The 3000 datashuttle is specified as "input thermocouple on any of the 8 differential inputs. When I try to put in place the analog input module (PQaq3k - 1:Al) i

  • I CAN PRINT ON NET WORK BUT WILL NOT ANALYZE TO COMP

    I HAVE A JET OF OFFICE 6600 I CAN PRINT THE MODEL (WITH THE HELP OF THE WIFI NETWORK) BUT FOR SOME REASON, I CAN'T COMP. SCANNER I USE WID 8 WHEM TRYING TO CAN MODEL THE SO-CALLED COMP IN PRINTER IS NOT AVAILABLE

  • Need help with replacement disk on port 0 in Raid1 desktop machine

    I have a HPE 380 t. I have has a RAID1 (mirror) with 2-500 GB Western Digital. When I boot it says the raid has deteriorated and an error has occurred on the player connected to port 0, port 1 player shows ok. It's in the Manager of the Intel Matrix