Execution script

Hello Experts,

Here is the code I use to alert generated machine small cap found in the document or not.

This will give warning that if I run the script. Is it possible to make a panel who run this script in the backend and show the results via javascript? (like the preflight Panel)

I hope that this can be done by the plugin. But he must know is possible to do the same in javascript.

var myDoc = app.activeDocument;
app.findTextPreferences = NothingEnum.nothing;
app.changeTextPreferences = NothingEnum.nothing;
app.findTextPreferences.capitalization = Capitalization.SMALL_CAPS;
var myFinds = myDoc.findText();
app.findTextPreferences = NothingEnum.nothing;
app.changeTextPreferences = NothingEnum.nothing;
if (myFinds.length == 0) {
   alert("No Small Caps found");
}
else {
  alert("Small Caps found");  
}

Thanks in advance.

Kitty

// VERY VERY VERY ROUGH STARTER GUIDE
// add checks and optimizations yourself!

#targetengine smallcaps
(function () {
// just for debug purposes remove the eventListeners if they exist and add them again
// for release check if they exist and create them of if they don't
    app.eventListeners.item("onAfterDocSmallCaps").isValid && app.eventListeners.item("onAfterDocSmallCaps").remove();
    app.eventListeners.item("onSelectionChange").isValid && app.eventListeners.item("onSelectionChange").remove();
    app.eventListeners.item("afterSelectionChanged").isValid && app.eventListeners.item("afterSelectionChanged").remove();
    app.eventListeners.add("afterOpen", checkForSmallCaps).name = "onAfterDocSmallCaps";
    app.eventListeners.add("afterSelectionAttributeChanged", checkForSmallCaps).name = "onSelectionChange";
    app.eventListeners.add("afterSelectionChanged", checkForSmallCaps).name = "afterSelectionChanged";
    const capMessage = ["No Small Caps", "Yes Small Caps"];
    var scui = new Window('palette');
    scui.caps = scui.add('staticText');
    scui.caps.minimumSize.width = 200;
    scui.show();

    function updateUI(yep) {
        if (updateUI.cache === yep) return;
        updateUI.cache = yep;
        scui.caps.text = capMessage[yep];
    }

    function checkForSmallCaps(ev){
        var sel = app.selection;
        if (sel.length) {
            sel = sel[0];
            if (sel.properties.baseline) {
                updateUI(+(sel.capitalization == +Capitalization.SMALL_CAPS));
            }

        }
    }
})();

Tags: InDesign

Similar Questions

  • location of execution scripts

    Hi all
    I'm trying to run a mapping in OWB. It finishes running with several warnings. The wb_rt_audit table contains all the details for this mapping.
    Where execution scripts are stored for mapping? I need to look at in detail.
    Thank you.

    Remember that the amount of information recorded in a mapping run will depend on the LEVEL of AUDITING by DEFAULT the mapping property. IF you have that NONE you want until at least the value ERROR DETAILS or COMPLETE and to redeploy (or replace this value when running if running SQL * more). You don't want to leave this FULL value, however, because it generates a ton of data in the repository of the runtime.

    If you want to directly examine the generated PL/SQL, it is created as a package with the same name as your mapping in schema deployment target. This can be useful sometimes to allow a visual confirmation of the generated code.

    See you soon,.
    Mike

  • Execution script sql DB automatic opening

    Is it possible to configure a DB so a script given SQL is executed each time the opens the database?

    Thank you very much in advance.

    You can create a startup after trigger to run PL/SQL

    Is it ok for you or do you really need to call a script stored on disk?

    http://download.Oracle.com/docs/CD/B28359_01/server.111/b28318/triggers.htm#i6061

  • BlackBerry smartphone Curve 8520 - multiple problems (youtube, instant messaging, the overall processing speed)

    Hi all!

    I grabbed by BB Curve 8520 just now and even if I like it, I am not completely satisfied with it. I use my BB on the carrier of Vodafone here in Germany, I have the newest OS installed (v4.6.1.286 (Platform 4.2.0.122)), at least the continuous update tool to tell me there is no update available for my device.

    I have a number of problems with it, namely:
    -When I watch videos on YouTube, my BB often ends the reading after precicely 01:18 minutes of reading, saying that the wireless connection has been disconnected. I can resume playback again immediately, but it is still very annoying.
    -Playback quality on YouTube is sometimes poor. The image is blurry or distorted with previous keyframes (apparently, the media player lack sometimes keyframes). Also, when I look at mode full screen, and playback will stop for buffering, it does not return mode full screen automatically. I have to click on the menu button and click on "Fullscreen" twice.
    -After receiving several messages on ICQ, the red light flashing, if I read the posts or not. I can only erase the LED of a single message and its reading.
    -L' device is generally quite slow. It keeps stalling sometimes for a few seconds and is particularly slow when rendering of the sites a bit more complex. (The browser repeat me "Requesting the script", "execution script...'"). Sometimes I wait some minutes before I can start browsing a Web site.

    I hope someone can help me with this, or at least tell me that those who are known issues that RIM are trying to fix.

    Thank you very much!

    From what you have posted here, you have not yet tried what I recommended above. With this process, you are free to use any carriers OS package. There is nothing about the use of a carriers OS package that locks your BB to them. If you use one that is not your 'home' carrier, then simply insert, between steps 1 and 2, the deletion, on your PC, a file named PROVIDER. XML.

    Good luck!

  • The Muserk module causes fatal error everytime I open PP

    I'm under Premiere Pro CC 2015 (9.2) on Windows 7 SP1. I have 32 GB of RAM, with 16 GB allocated to the PP.

    I installed the add-on from Muserk, since the site Adobe add-on. When I ran Muserk the first time, I got this error:

    Execution Script Error: Eception JavaScript exception: Type error: list of arguments of the AfDB.

    When I click OK on the error message, the error message appears again immediately, no matter how many times I click OK.

    The only way out of this error is to cancel PP using the Windows Task Manager.

    After termination of PP, PP won't work again until I restart the computer.

    Once I restart the computer, I run PP.

    Immediately, without any input from me, Muserk tries to run itself and gets the same error.

    I uninstalled PP and reinstalled twice, once to keep the application preferences and once, do not keep the application preferences.

    Whenever I have reinstall PP and run it, Muserk immediately tries to run itself and get the same error.

    The CC extensions Manager shows no Muserk.

    I tried to contact Muserk without any result.

    I think that might require a change in the Windows registry to remove the Muserk from my computer. Anyone have any ideas?

    Thanks for your input Neil, but I don't have to try your solution. Muserk answered my call later that day there and were very helpful. They provided a way to remove the add-on that worked.

    Namely, go to adobe/ons/myadd-Add-ons and remove the offending module. Then I reinstalled PP and of course, the add-on Muserk has disappeared from my PP and the problem of perpetual error message had also disappeared.

    So I will mark this issue is resolved.

  • First error can not Open sequence and CC presets missing

    I am having some problems with the first.

    I was working on a project which has been very well for awhile, but now when I try to open it, first gives the error:

    "This project contained a sequence that could not be opened. No preview of the sequence is preset file or codec might be associated with this type of sequence. »

    In addition, in any project when I create a new sequence, there no useful presets. I found the sequence presets folder and they are all there, but they don't show up in the first.

    Also, when I import AVCHD. The MTS files, I get video but no audio, while they play fine in VLC

    I've tried but alternatives that solve nothing:

    1 disconnect, restart first, sign

    2 re-create the Adobe Premiere Pro preferences and the plugin cache. (using the shift/option drop-down list)

    3 uninstall first, reboot, run cleaner script, restart, reinstall the first

    4 uninstall creation, execution script cleaner, restart, reboot, create a new user account, install the first in this user account instead of the original account

    I am aware of this page: http://helpx.Adobe.com/Premiere-Pro/KB/features-presets-missing-Premiere-Pro.html

    and this page: http://helpx.Adobe.com/Creative-Suite/KB/CS5-cleaner-tool-installation-problems.html

    A few pages I met suggested that executing the script cleaner several times, but you can really run only one time, since after the first cleaning, when you run it again once nothing appears on the list to be cleaned.  There are still remnants of things Adobe has left on my machine not cleaned by the cleaner script that I need to manually remove?

    If someone has had this problem but had no one of the proposed solutions adobe work for them and subsequently corrected this?

    It is Adobe first CC 2014.  I'm under it on a Mac Book Pro, which is less than a year, OSX 10.9.5 w / 16 GB memory running.

    It's UNBELIEVABLY FRUSTRANT.  I spent almost all day this problem and all I want to do is change my video. A quick search of the internet shows that I am far from alone in having this problem. In addition, relocation is not trivial because the speed of download where I am is slow.

    Dave

    Well, it took a long time, but I finally got it working properly.  All codecs and presets are, I can import AVCHD files correctly with audio and the project that I could not open before now opens very well, so it turns out not to make a corrupt project. It seems that the problem was that the script cleaner does not clean actually all it should be, and I had to do it all manually.

    I uninstalled all the software Adobe Creative Cloud, rebooted, run the CC cleanup script and restarted again.

    So I uninstalled Flash and all other Adobe software, I got on my machine.

    Then I used the app to find any file to find all the references on my Mac for any file with "adobe" in the name - including system files - and deleted and empty the trash.

    The only things of Adobe, I have left on my machine were the Adobe RGB color profile and all Adobe fonts, I had.

    Empty the trash again, reset again.

    Then, I used the CC Setup program to install the first and only first (I was not yet installed Adobe Media Encoder) because I didn't want to spend all this time download only to fail again on me.

    And finally it worked. Then I went back and installed Media Encoder, which does not break something, then I went back and installed the other CC apps I wanted on my machine and things are finally working.

    The "cleaner" script lets a files related to LOT of creative cloud on your machine, which, in my opinion, means that this isn't a very effective "cleaner".  He seems to want to leave a lot of preferences and files other files which I don't know the purpose (but I deleted them anyway).  It should at least be a checkbox somewhere on the vacuum cleaner that says "wipe absolutely everything about Adobe off my machine.

    Thanks again for your suggestions, Neil.

    Dave

  • A script on this page may be busy or have stopped responding. You can stop the script now or wait to see if the script concludes its execution. Script: chrome://fflinkfilter/content/ikavlinkcollection.js:15

    I am currently using Windows 7 Home premium. I have a kaspesky 2010 installed on pc and navigo on the Internet with firefox 3.6.
    Unfortunately, every time I leave a notice:
    A script on this page may be busy or have stopped responding. You can stop the script now or wait to see if the script concludes its execution.

    Script: chrome://fflinkfilter/content/ikavlinkcollection.js:15

    The biggest problem is that soar of CPU consumption to values very high but blocked for regular activities... sad.gif

    Do you know if or how you can solve?

    This is a problem with an extension: fflinkfilter

    See Troubleshooting extensions and themes and problems of hardware acceleration to resolve common Firefox problems

  • Security settings do not allow execution of script code in the report.xsl stylesheet

    Hello world

    I can't open a file of XML in Excel 2007 results - even if I added the stylesheet for trusted locations and deleted all the protections.

    Here's what happens:

    1. open the XML results file how I am propmpted for select the report.xsl stylesheet TestStand

    2. then gives error: Scripts in this XML document and/or references to other documents are disabled.

    3. by clicking OK gives more specific information - namely the security settings don't allow execution of code within this stylesheet script:

    But I did the following:

    -The path to the sheethas style was added to the "trusted locations".

    -ActiveX settings are completely enabled for all controls without restrictions

    -Macros settings are enabled for all macros

    -Is trust access to the VBA project object model

    -All data connections are allowed

    How can I activate the execution of script code in the style sheet for the file XML can load?

    Thank you

    Ronnie

    Ronnie-

    Directly from the Article in the Microsoft Knowledge base, please note that do the following changes "may make your computer or your network more vulnerable to attack by malicious software such as viruses." It's always a good idea to make a backup of your registry before editing. This can be done by clicking on file' export.

    In any case, as the article explains, open the registry and navigate to HKEY_CURRENT_USER\Software\Microsoft\Office\12.0\Security. The security file must contain a registry key called XSLSecurityLevel. Mine did not have this registry key and I had to create it (see screenshot below). Double-click the XSLSecurityLevel registry key, type 1 in the data value, and then click OK.

    You should now be able to view the XML from Excel 2007 report. To reset this setting, simply double-click the registry XSLSecurityLevel key, enter 0 in the given value, and then click OK.

    I hope this helps!

  • Unable to load psDiagnostics.psm1 - execution of scripts is disabled on this system.

    original title: file c:\windows\system32\WindowsPowerShell\v.1a\modules\psDiagnostics\psDiagnostics.psm1 cannot be loaded because the execution of scripts is disable on this system.

    Remember - this is a public forum so never post private information such as numbers of mail or telephone!

    Ideas:

    • Disable programs you Wira c:\windows\system32\WindowsPowerShell\v.1a\modules\psDiagnostics\psDiagnostics.psm1 cannot be loaded because the execution of scripts is on this system.e of problems with
    • Error messages
    • Recent changes to your computer
    • What you have already tried to solve the problem

    Run scripts.

    To secure Windows PowerShell, the default on Windows PowerShell execution policy is restricted. This strategy allows you to run cmdlets, but not scripts. To run scripts, use the Set-ExecutionPolicy cmdlet to change the AllSigned and RemoteSignedexecution policy. Only members of the Administrators group on the computer can run this cmdlet.

    https://TechNet.Microsoft.com/en-GB/library/hh849677.aspx

  • The execution of Scripts is disabled

    I remember - this is a public forum so never post private information such as numbers of mail or telephone!

    Ideas:

    • Keep getting a warning Message on execution of Powershell Scripts is disabled on System.Is this supposed to be in the measuring mode? And if so, no matter what ideas how to do this? THANK YOU MUCH FOR YOUR TIME...  You have problems with programs
    • Error messages
    • Recent changes to your computer
    • What you have already tried to solve the problem

    Michael Tothill

    Information on the execution of script in Powershell is available here http://technet.microsoft.com/en-gb/library/ee176949.aspx

    What you see is the default behavior. You need to change the ExecutionPolicy.

  • Need a script that will provide details of concurrent applications that took place beyond the avg time of execution.

    Hi guru - it will be really useful, if so can provide a script that will get details of concurrent applications that went beyond the avg time of execution.

    Thank you

    Are you after something like this? Last column shows the average too.

    select FCP.user_concurrent_program_name
          ,FCR.argument_text
          ,FCR.completion_text
          ,to_char(FCR.actual_start_date,'DD-MON-YYYY HH24:MI:SS') start_time
          ,to_char(FCR.actual_completion_date,'DD-MON-YYYY HH24:MI:SS') end_time
          ,ROUND((FCR.actual_completion_date  - FCR.actual_start_date)*86400) time_in_sec
          ,ROUND(AVG_VALUES.avg_time) AVG_TIME_IN_SEC
    from fnd_concurrent_requests FCR
        ,fnd_concurrent_programs_vl FCP
        ,(select  FCR1.concurrent_program_id
                 ,avg((FCR1.actual_completion_date  - FCR1.actual_start_date)*86400) avg_time
          from fnd_concurrent_requests FCR1
          group by FCR1.concurrent_program_id) AVG_VALUES
    where FCR.concurrent_program_id = FCP.concurrent_program_id
    and   (AVG_VALUES.concurrent_program_id = FCR.concurrent_program_id
           and
           ((FCR.actual_completion_date  - FCR.actual_start_date)*86400) > AVG_VALUES.avg_time)
    ORDER BY FCR.concurrent_program_id,FCR.actual_start_date desc;
    

    See you soon

    AJ

  • Execution of Scripts of Calc automation

    Hi, how we automate the calculations that are required to do so in a sequence?

    I have about 12 Calc which are dependent on each other and must be performed in a sequence (01 to 12).

    3/4 Calc are on a granular level, so few of them take some time 6-7 minutes, and we have a step of aggregation that takes 15 minutes. But outside of these, the rest take 1-2 minutes to run.

    Problem is when I use the MaxL editor in the Regional service console - using the command "run the calculation.

    Set Message level.

    Set timestamp

    coil 'Aug - 12.log';

    echo "Execute - start - calculation."

    function SIERREUR 'ErrorExit;

    run the 'Sample' calculation.' Sample '.' 01-step ';

    run the 'Sample' calculation.' Sample '.' 02-step ';

    run the 'Sample' calculation.' Sample '.' 03-step ';

    ....

    ...


    These statements-error - saying previous request is still in progress if the calculation takes more time

    For by example 01-step 2 minutes

    -It works very well and the next step is executed successfully

    02-step took 6 mins

    -then it does not perform successfully step 03 - it does not wait for the earlier execution at the end and when he tries to run the 3rd step it error saying 'previous request still pending '.



    Any help would be appreciated.



    Ankur


    If you run these MaxL (not FRO EAS) they will work in serial mode using something like:

    Call pathname...\startMaxl.bat myscript.mxl

    Where myscript.mxl has the calculation of performance in orders.

    Depending on if you want to check for codes back and forth between the steps, you could have separate MaxL scripts and call each

    Call pathname...\startMaxl.bat step_1.mxl

    Call pathname...\startMaxl.bat step_2.mxl

    Call pathname...\startMaxl.bat step_3.mxl

    Call pathname...\startMaxl.bat step_4.mxl

  • ORA-01017 encountered during execution of shell scripts

    Hello

    During execution of the backup script for one of my databases, the script contains a login section which breaks down as shown below

    Section login script:

    sqlplus / < < END > /tmp/$PROGRAM.tmp


    Error generatedf in the log file:

    SQL * more: Production release 11.2.0.3.0 on sea Apr 10 11:32:06 2013

    Copyright (c) 1982, 2011, Oracle. All rights reserved.

    ERROR:
    ORA-01017: name of user and password invalid. connection refused


    Two points to note:
    1) there are two other databases on the same server and they have no problem
    (2) I am able to connect to this database as ' / '.
    (3) I am able to connect to the database as sysdba from another server
    (4) the script runs successfully when I change like: sqlplus / as sysdba < < END > /tmp/$PROGRAM.tmp

    Hi, for the use of this you must create a user authenticated externally then it will work... Check other databases where you are using the sqlplus / connection for your refrence command

  • VSphere Management Assistant freezes during execution of scripts Perl SDK

    In our environment, we have a nagios server which connects to our Executive Assistant to check the health of our host ESX 4.1 vSphere. Scripts are pretty basic and just run over SSH using cryptographic keys every 10 minutes. The problem is that after a day or so to work properly the VMA one freezes and unresponsive. I am at a loss here as to what is causing this problem that I made sure to always disconnect the server vSphere when scripts are finished. Anyone who has met by this kind of problem before?

    Here is one of my scripts for reference:

    check_cpu:

    #!/usr/bin/perl -w
     
    use strict;
    use warnings;
    use FindBin;
    use lib "$FindBin::Bin/../";
    use VMware::VIRuntime;
    use VMware::VmaTargetLib;
     
    my $host = $ARGV[0];
    my $warn = $ARGV[1];
    my $crit = $ARGV[2];
     
    if ( $host eq '' || $warn eq '' || $crit eq '' )
    {
            print "Usage:  check_cpu <SHORT HOSTNAME> <WARNING LEVEL> <CRITICAL LEVEL>\n";
            exit (0);
    }
     
    my $target;
     
    $target = VmaTargetLib::query_target("vcenterserver.***.****.****");
    $target->login();
     
    my $entity_views;
     
    &main();
     
    sub main
    {
            &get_views();
            &get_cpu();
    }
     
    sub logout
    {
            $target->logout();
    }
     
    sub get_views
    {
            $entity_views = Vim::find_entity_views(
                                                    view_type => 'HostSystem',
                                                    filter => { 'summary.config.name' => "$host.***.****.***" },
                                                    );
            if ( @{$entity_views} == 0 )
            {
                    print "Error: Host does not exist! Exit 2\n";
                    &logout();
                    exit (2);
            }
    }
     
    sub get_cpu
    {
            for my $entity (@{$entity_views})
            {
                    my $status = $entity->runtime->standbyMode;
     
                    if ( $status eq 'none' )
                    {
                            my $totalMhz = $entity->summary->hardware->cpuMhz;
                            my $cpuCores = $entity->summary->hardware->numCpuThreads;
                            my $cpuUsage = $entity->summary->quickStats->overallCpuUsage;
     
                            my $cpuPerc = ($cpuUsage/($totalMhz*$cpuCores))*100;
     
                            if ( $cpuPerc < $warn )
                            {
                                    print "CPU at $cpuPerc\%. Exit 0.\n";
                                    &logout();
                                    exit (0);
                            }
                            elsif ( $cpuPerc < $crit )
                            {
                                    print "Warning! CPU at $cpuPerc\%. Exit 1\n";
                                    &logout();
                                    exit (1);
                            }
                            else
                            {
                                    print "Critical! CPU at $cpuPerc\%. Exit 2\n";
                                    &logout();
                                    exit (2);
                            }
                    }
                    else
                    {
                            print "\tHost $host is in standby mode. Exit 0\n";
                            &logout();
                            exit(0);
                    }
                    print "\n";
            }
    }
    

    Thank you

    You monitor the execution of your hosts vMA during execution of the script? By default, it is configured with only 1vCPU and 512 MB of memory, based on the query and the size of your environment it may be running out of resources that I saw myself, and generally I'll upgrade the memory to 1 GB, if not slightly more depending on what he does. It's probably a good idea to take a look at the performance of your vSphere environment and see what it consumes and if the system is swapping or pegging on CPU.

  • Get the error during the execution of the IOM in script integrated purge OIM_ReconArch.sh

    Get the error during the execution of the IOM in script integrated purge OIM_ReconArch.sh


    bash-3. $00 cat Err_Arch_Recon_2012_11_01_15_36_06.log
    ****
    -The execution state of archives reconciliation
    ****
    BEGIN OIM_SP_ReconArchival ("n", "n", 200000, 'ARCHIVE_SELECT_WITH_CONS_DROP_REC', 'both, '20110101',' 20111231'); END;

    *
    ERROR on line 1:
    ORA-00942: table or view does not exist
    ORA-06512: at "PREPRD. OIM_SP_RECONARCHIVAL', line 722
    ORA-00942: table or view does not exist
    ORA-01031: insufficient privileges
    ORA-06512: at line 1


    Help, please

    ORA-06512: at "PREPRD. OIM_SP_RECONARCHIVAL', line 722
    ORA-00942: table or view does not exist
    ORA-01031: insufficient privileges

    (1) check if the OIM_SP_RECONARCHIVAL table or the view exists or not...
    (2) if it exists, check if the DEV_OIM user has enough privilege to view this table...
    Otherwise, give it all privileges to open as a sys as sysdba

    GRANT ALL PRIVILEGES ON DEV_OIM;

    COMMIT;

Maybe you are looking for