[JS CS3] Apply the italic with scripts

There is a keyboard shortcut called 'Apply Italics', which is by default [cmd] + [shift] + [i] on Mac and [ctrl] + [shift] + [i] Windows. I use it often because it will change the correct italic text. E.g. text with the style '85 Heavy' will change '86 Heavy Italic' or 'Display Semibold"to"Display Semibold italic ".

Is it possible to access the "apply Italics" with scripts? The action is not available in any menu, AFAIK.

Yes it is possible.

Normal:

app.menuActions.itemByID (119609) .invoke)

"BOLD":

app.menuActions.itemByID (119610) .invoke)

Italic:

app.menuActions.itemByID (119611) .invoke)

Highlights:

app.menuActions.itemByID (119612) .invoke)

With the exception of normal, these are all the toggles...

Substances

Tags: InDesign

Similar Questions

  • [CS3/4, JS] Apply the pen with an object style

    I was hoping to apply transparency via an object style effects using this:

    myObjectStyle.objectStyleContentEffectsCategorySettings.enableFeather = true;

    But "object does not support the property or method...". "etc.

    I would be very grateful if someone could point me in the right direction.

    Thanks in advance - Jeremy

    I had this same problem with the bevel and emboss effect and I just thought about it!

    Here is the code for my style of object and bevel/stamping out perfectly.  The key is the last line.  You must set the parameter applied to true so he could check the box and actually apply the effect.

    var myObjectStyle = myDocument.objectStyles.item ("FamilyOfFrame");
    try {}
    var myObjectStyle.name = MyName;
    }
    {} catch (MonErreur)
    myObjectStyle = myDocument.objectStyles.add({name:"FamilyOfFrame"});)
    }
    myObjectStyle.strokeWeight = 0;
    myObjectStyle.transparencySettings.bevelAndEmbossSettings.size =. 09;
    myObjectStyle.transparencySettings.bevelAndEmbossSettings.style = 2020618852;
    myObjectStyle.transparencySettings.bevelAndEmbossSettings.applied = true;

    But as I learn... not all effects include the "applied"... property

    Alex

  • How to apply the expression using script?

    I use a script and an expression to automate all the layer selected to attend the control layer. So, I've do it now in two steps, first make a layer of control using this script:

    {

    model var = app.project.activeItem;

    var slctd_layer = comp.selectedLayers;

    var new_adjustment = comp.layers.addSolid ([1,1,1], "Control", comp.width, comp.height, comp.pixelAspect, comp.duration);

    new_adjustment.adjustmentLayer = true;

    var addSlider1 = app.project.activeItem.selectedLayers [0]. Effects.addProperty ("ADBE Slider Control");

    addSlider1.name = "time";

    addSlider1.property (1) .setValueAtTime (0, 0.06);

    var addSlider2 = app.project.activeItem.selectedLayers [0]. Effects.addProperty ("ADBE Slider Control");

    addSlider2.name = "opacity";

    addSlider2.property (1) .setValueAtTime (2, 0);

    addSlider2.property (1) .setValueAtTime (2.03, 100);

    }

    Then, I select all the layer under the control and apply the expression, for example:

    delay = thisComp.layer("Controler").effect ("delay") ("Slider") * index;

    t = time + delay;

    exp = thisComp.layer("Controler").effect ("opacity")("Slider").valueAtTime (t);

    exp;

    I'm working on an animation of the tight timelines and tons of materials with tons of layer for each model now. So I think that if it is possible to combine this stage two in a script that will automate this work for me. I'm still new to scripts and none need help with it. Thank you

    Like this:

    var ease = new KeyframeEase(0,100/6);    // speed (0 for easeIn or easeOut, influence range: 0-100)
    var addSlider1 = new_adjustment.effect.addProperty("ADBE Slider Control");
    addSlider1.name = "delay";
    // 1st key: value + ease
    addSlider1.property(1).setValueAtTime(0, 0.2);
    addSlider1.property(1).setTemporalEaseAtKey(1, [ease], [ease]);
    addSlider1.property(1).setInterpolationTypeAtKey(1, KeyframeInterpolationType.LINEAR, KeyframeInterpolationType.BEZIER);
    // 2nd key: value + ease
    addSlider1.property(1).setValueAtTime(2.03, 0.03);
    addSlider1.property(1).setTemporalEaseAtKey(2, [ease], [ease]);
    addSlider1.property(1).setInterpolationTypeAtKey(2, KeyframeInterpolationType.BEZIER, KeyframeInterpolationType.LINEAR);
    

    (The use of setInterpolationTypeAtKey is not necessary, it is only there to do things similar to what you would get by doing things by hand).

    Xavier

  • Bug of the scrollbar with script "scale to fit".

    Hello

    I meet some sort of bug with this nice script "appropriate size":

    http://sarahjustine.com/2013/04/08/create-scale-to-fit-projects-with-Adobe-edge-animate/

    I create an animation simple, consisting of a single image (step = 1024px X 3000px) with the script (see below) to do the test: everything works, the animation is snug, BUT when I resize the browser, the scroll bar keeps its original size, even if the height of the animation is very low.

    The bug concerns all popular browsers (version desktop and mobile *) except chrome.

    * I use this meta: < = happy 'viewport' meta name = "width = device-width " >

    example:

    animation = 3000px original height

    the scroll bar height = 3000px

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

    animation-scaled height = 600px

    height of the scroll bar does not change = 3000px

    I use no CSS, I just publish the animation with EDGE CC (not 1.5).

    Could someone give me some advice to fix this "bug"?

    Oliver.

    Sorry for my English, I'm French...

    A living example that seems to use this script (not),

    You can see the scroll bar bug if you resize the browser (IE or Firefox)

    http://www.ryanterry.NET/resume/HTML5/

    -the script (on.compositon.ready)-

    var stageHeight = sym.$('Stage').height (); Set a variable for the height of the stage

    SYM. $("#Stage") .css ({/ / set the origin of the transformation to always fit in the upper left corner of the scene})

    'transform-origin': "0 0".

    "- ms - transformation-origin": "0 0".

    ' - webkit - transform-origin ":"0 0".

    ' - moz - transform-origin ":"0 0".

    "transform - o - origin": "0 0"

    });

    function scaleStage() {}

    var point = sym.$('Stage'); Define a reusable variable to refer to the scene

    var parent = sym.$('Stage').parent (); Define a reusable variable to reference the container parent of the scene

    var parentWidth = stage.parent () .width (); Get the parent of the soundstage

    var stageWidth = stage.width (); Retrieves the width of stage

    var desiredWidth = Math.round(parentWidth * 1); Set the new width of the scene as it evolves

    var scale = (desiredWidth / stageWidth); Set a variable to calculate the new width of the scene he puts on the scale

    Resize the stage!

    internship. CSS ('transform', ' scale (' + scale + ')');

    internship. CSS ('- o - transform', ' scale (' + scale + ')');

    internship. CSS (' - SM - transform ', ' scale (' + scale + ')');

    internship. CSS (' - webkit - transform ', ' scale (' + scale + ')');

    internship. CSS (' - moz - transform ', ' scale (' + scale + ')');

    internship. CSS ('- o - transform', ' scale (' + scale + ')');

    parent. Height(stageHeight * Rescale); Reset the height of the container parent for objects below will be redistributed as the ADJUSTABLE height

    }

    When the browser is also

    $(window) .one ("Resize", function() {}

    scaleStage();

    });

    When the first load of the page

    $(document) .ready (function () {}

    scaleStage();

    });

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

    Hey Oliver,.

    Try to encapsulate another div around the div. #Stage I think that scroll bars appear with the Animate script will recalculate the height of the parent, because if that parent is the body it is not adjusted for he thinks it is the initial height of your composition. If your HTML page will look like this:

    I found that I had to apply the height property to get it to hide the scroll bar, but the value is obsolete as it gets when even crushed by the script. Who give a shot.

    Good luck!

    Sarah

  • InDesign CS3 - apply the style to the selection no longer works!

    Hello

    I have a little problem with InDesign CS3 and caraters style and paragraph style.

    style options in the options section and in the text, and in a style of object (even in GENERAL pannel), 'style to apply to the selection' appear in gray and I can not select, (or check), and is uncheked.

    In the room included an immage of a panel with the uncheched 'apply the style selection '.

    Please help me, what I have to do?

    I have try all thinghs but not reistalling jump is the last chance.

    Thank you for advice.

    ALE

    Your English is very good.

    The first thing I would try replacing the InDesign preferences. It seems to me that if you have repaired permissions of Mac files, but have does not replace the application preferences themselves. On Mac, the fast lane is close ID, then restart and IMMEDIATELY (almost instantly) press and hold the control + Cmd + Opt shift keys while the application starts. You should see a dialog box asking to confirm the replacement of preference. If you don't see the dialog box, you were not fast enough with the keyboard.

    You can also do a manual replacement. Look for the InDesign Defaults and InDesign SavedData files (these are probably hidden, but it will be in your user library) and just rename, move or delete. ID will create a new set at its launch. This has the advantage that you can recover your customizations by moving the prefs old return in the case where replacing them does not solve your problem.

    Things you lose are non-standard styles default and shades, which can be re-imported from a document that uses and document presets and a printer that can be saved from the dialog boxes "Set" before replacing your prefs and reloaded after same dialog boxes.

    Peter

    Edit: I see while I was busy typing Eugene was busy looking at the picture more closely I have and gave the real answer. Good info on the replacement of prefs, however, if you need it in the future.

  • Film &gt; change the Framerate with script?

    Hi guys, I am importing sequences of images with my script, recreate the local folder structure.

    It all works very well, but now I can add an option of framerate. May specify a different framerate as by default the project. This can be done in the GUI with right click > interpret footage > main... > Frame Rate

    Is this possible with the script?

    I could find this method AVItem setProxyWithPlaceholder()... not sure that this is the best way

    Thanks in advance!

    Basically, my script works like this:

    myFolderArray = myFolder.getFiles ();

    for (i = 0; i < myFolderArray.length; i ++) {}

    If {(myFolderArray [i] instanceof file)

    var aFolder = myFolderArray [i];

    myFileArray = aFolder.getFiles ();

    var newFolder = app.project.items.addFolder (aFolder.name);

    var myImportOptions = new ImportOptions();

    If (myFileArray [0] instanceof File) {}

    aFile var = myFileArray [0];

    {if (afile)}

    myImportOptions.file = aFile;

    myImportOptions.sequence = true;

    newFile var = app.project.importFile (myImportOptions);

    newFile.parentFolder = newFolder;

    }

    }

    }

    }

    You can use the method conformFrameRate of the mainSource object.

    myImportOptions.sequence = true;

    newFile var = app.project.importFile (myImportOptions);

    newFile.parentFolder = newFolder;

    newFile.mainSource.conformFrameRate = 24;     Assign the frame here rate.

    70 pages of the guide After Effects CS6 Scripting says more.

    After effects Developer Center | Adobe Developer Connection

  • Install RAC 11 GR 2 and apply the patches with the new Option of software updates YES

    Anyone tried the installation with the new Option of software updates?

    I'm going to install grid RAC 11 GR 2 and I intend to do the following steps:
    (1) install the Oracle Grid Infrastructure 11.2.0.2 patch group
    (2) make all configurations with YES
    (3) create ASM disks
    (4) install Oracle Database 11.2.0.2 software only
    (5) apply recommended patches 11.2.0.2.2 Oracle (12311357) and 12431716. (Ref. MOS doc [756671.1 ID])
    (6) create the RAC (advanced option) with DBCA database

    With these steps:
    Grid and ASM disks would be configured without the recommended patches, but the database will be created with applied patches.

    I would not do a "Software only" install IM and then apply the patches because later I would have to manually do all the configuration steps.

    If I use the Option of YES software updates to apply patches, YES makes the adjustment, and then I would set up the GRID with YES?

    Quote from Oracle® Setup Guide Network Infrastructure 11 g Release 2 (11.2) for Linux - E17212 number of part-11:
    'Use the feature of dynamic download and apply software upgrades of software updates as part of the installation of the Oracle database. You can also download updates separately using the downloadUpdates option and later to apply during installation by providing the location where updates. »

    I could not find more detailed information on this feature in the documentation and MOS.

    Thank you

    Hello

    You can download the latest updates and patches to help with option - downloadUpdates

    ./runInstaller -downloadUpdates
    

    You can use this note:

    * How to download the latest updates and patches using 11.2.0.2 YES [ID 1295074.1] *.

    Don't miss...
    * Error: INS-20704 while installation 11.2.0.2 with Option 'use downloaded software updates' [1265270.1 ID] *.
    : Note ensure that the user download the updates of patches have own/correct permission to download updates to patch to MOS (My Oracle Support).
    Do not use the directories/tmp/oraInstall * for the download location. New bug 9975999

    Documentation explaining...
    4.5.1 running Oracle Universal Installer
    Download of updates before Installation
    http://download.Oracle.com/docs/CD/E11882_01/install.112/e16763/inst_task.htm#BABJGGJH

    Kind regards
    Levi Pereira

  • Customize the Dock with Script

    I'm doing an AppleScript script that puts a .app in my dock users based on the org group that they are part of Active Directory.  For example, a teacher will get a different app in the dock as a student, because they are part of another group in Active Directory.  Can someone help me with this?  Thank you!

    I do not use Active Directory, so I can't test your org group decision tree in AppleScript. But here's how you specify that a launch of the application, minimize itself to an icon in the Dock and continues in the Dock after he left running. Use GUI scripts. Tested with OS X 10.11.4.

    The following code is an adaptation of MacScripter.

    -AppleScript that launches, limit itself and remains on the dock, once it is stopped.

    game appName to 'Notes '.

    say application (my appName) to launch

    say application 'System events' to tell UI element appName of list 1 of process 'Dock '.

    perform action 'AXShowMenu '.

    click on menu item 'Options' from the menu 1

    click on menu item "Keep in Dock" from menu 1 menu item 'Options' from the menu 1

    perform action 'AXShowMenu '.

    click on menu item 'Hide' from the menu 1

    perform action 'AXShowMenu '.

    click on menu item 'Quit' from the menu 1

    end say

  • Apply the Image with layer.id or layer.itemIndex

    Hello

    I want to use the 'Apply Image' function in my JavaScript.
    Because this function is not available in API, I recorded with the 'ScriptListener.8li' function calls
    Here is the code that was generated (I reformatted the code a bit to make it more readable):

    function testIt() {
        var ref24 = new ActionReference();
    
        var idChnl = charIDToTypeID( "Chnl" );
        var idChnl = charIDToTypeID( "Chnl" );
        var idRGB = charIDToTypeID( "RGB " );
        ref24.putEnumerated( idChnl, idChnl, idRGB );
    
        var idLyr = charIDToTypeID( "Lyr " );
        ref24.putName( idLyr, "My Layer Name" );
            
        var desc30 = new ActionDescriptor();
        var idT = charIDToTypeID( "T   " );
        desc30.putReference( idT, ref24 );
    
        var idClcl = charIDToTypeID( "Clcl" );
        var idClcn = charIDToTypeID( "Clcn" );
        var idSbtr = charIDToTypeID( "Sbtr" );
        desc30.putEnumerated( idClcl, idClcn, idSbtr );
    
        var idScl = charIDToTypeID( "Scl " );
        desc30.putDouble( idScl, 2.000000 );
    
        var idOfst = charIDToTypeID( "Ofst" );
        desc30.putInteger( idOfst, 128 );
    
        var desc29 = new ActionDescriptor();
        var idWith = charIDToTypeID( "With" );
        var idClcl = charIDToTypeID( "Clcl" );
        desc29.putObject( idWith, idClcl, desc30 );
    
        var idAppI = charIDToTypeID( "AppI" );
        executeAction( idAppI, desc29, DialogModes.NO );
    }
    

    The problem: the function is based on the name of the layer.
    This can cause problems if two layers have the same name:

    ref24.putName( idLyr, "My Layer Name" );
    

    How can I get this to work of function with 'layer.id' or 'layer.itemIndex '?
    I tried for over six hours and have not found a solution.
    Help, please!

    Something on the lines of.

    function apply(ID) {
    var ref = new ActionReference();
    ref.putEnumerated( charIDToTypeID('Chnl'), charIDToTypeID('Chnl'), charIDToTypeID('RGB ') );
    ref.putIdentifier(charIDToTypeID('Lyr '), ID); //Layer ID
    //ref.putIndex( charIDToTypeID('Lyr '), idx ); //Layer Index
    var desc = new ActionDescriptor();
    desc.putReference( charIDToTypeID('T   '), ref );
    desc.putEnumerated( charIDToTypeID('Clcl'), charIDToTypeID('Clcn'), charIDToTypeID('Sbtr') );
    desc.putDouble( charIDToTypeID('Scl '), 2.000000 );
    desc.putInteger( charIDToTypeID('Ofst'), 128 );
    var desc2 = new ActionDescriptor();
    desc2.putObject( charIDToTypeID('With'), charIDToTypeID('Clcl'), desc );
    try{
    executeAction( charIDToTypeID('AppI'), desc2, DialogModes.NO );
    }catch(e){}
    };
    
  • The details of the path with script

    An absolute beginner in InDesign and java script...

    With the CS6 InDesign a document already open on my PC... I can't Open file at the path and save some/all the name of files/sub-sub-sub-folders and paper route as variables with javascript?

    Path is like that: -.

    ------Server\PDFWorkflow\AdifCounty\GDS\InDesign\Adverts\225501IP.indd

    Why? I want to write a script that gives me a Place dialog box using some original path variables.

    Script dialogue place would have a path something like that: -.

    ------ServerAdifvariable\GDS\InDesign\resources\PDFWorkflow\-variable

    app.activeDocument.filePath

    Returns the path of the document. This works on recorded documents.

    If you want to make any kind of file manipulation, you should read Chapter 3 on file system access in the "JavaScript Tools Guide CS6". Launch the ESTK and open the Help menu; You'll see the document in this menu.

    Peter

  • Get information about the layer with script styles

    Is there a way for a script to get information about the currently existing on a layer layer styles?

    For example, can I know if a layer has a drop shadow, and that therefore, find the dimensions of this shadow, transparency, color, etc...?

    If you don't have CS4 you will need Xbytor script. With CS4, you can the the layer descriptor

    var ref = new ActionReference();
    ref.putEnumerated( charIDToTypeID("Lyr "), charIDToTypeID("Ordn"), charIDToTypeID("Trgt") );
    var desc = executeActionGet(ref).getObjectValue(stringIDToTypeID('layerEffects'));
    if( desc.hasKey( stringIDToTypeID('dropShadow') ) ){
         desc = desc.getObjectValue(stringIDToTypeID('dropShadow'));
         alert('opacity = '+ desc.getDouble( stringIDToTypeID('opacity') ) );
         alert('distance = '+ desc.getDouble( stringIDToTypeID('distance') ) );
         alert('spread = '+ desc.getDouble( stringIDToTypeID('chokeMatte') ) );// spread
         alert('blur = '+ desc.getDouble( stringIDToTypeID('blur') ) );
         var desc = desc.getObjectValue(stringIDToTypeID('color'));
         var r = desc.getDouble( stringIDToTypeID('red') ) ;
         var g = desc.getDouble( stringIDToTypeID('green') ) ;
         var b = desc.getDouble( stringIDToTypeID('blue') ) ;
         alert( 'r = ' + r +'\rg = ' + g + '\rb = ' + b );
    }
    
  • The list of all names of virtual machines that are attached to the computer with script group

    I need a script that would list all the virtual machines names that are attached to the Machine group as the bellows screenshot:

    vcm.jpg


    Ce can be in any language I just need to get this information.

    I tried to Watch in database and found vm names of in table [ecm_dat_machines] and Group of/ids in names of table [ecm_sysdat_machine_groups] but I don't find table that would be assign vm to the Group.

    I serait appreciate any help or clue as I already spent a lot of time on this task.

    Attached file of import/export includes a view created for the SQL below, as well as a SQL report that uses this perspective to the computers by group in the VCM UI.

    Note that the functions used in the join of the query criteria are there to ensure that only valid/active/license machines are displayed, these date data and time are adjusted to the time zone of the user, and that the users do not see that their role does not have access to groups of computers.

    SELECT

    m.machine_name,

    mg.machine_group_name,

    mg.machine_group_desc,

    DATEADD (mi, utc.utc_offset, m.date_last_contact) as date_last_contact

    OF dbo.ecm_dat_machine_group_machines_xref mgx

    JOIN dbo.ecm_dat_machines m

    ON mgx.machine_id = m.machine_id

    Join dbo.ecm_dat_machine_groups mg

    ON mgx.machine_group_id = mg.machine_group_id

    JOIN dbo.ecm_dat_roles_machine_group_xref rmx

    ON mgx.machine_group_id = rmx.machine_group_id

    AND rmx.role_id = dbo.role_current)

    JOIN dbo.ecm_fn_machines_valid_t (vm)

    ON mgx.machine_id = vm.machine_id

    JOIN dbo.ecm_user_utc_offset (utc)

    1 = 1

  • Open a file in the finder with script

    I have instructions for actions in pdf files. Trying to make a script that opens a specific folder in OS x Finder (/ applications/Adobe Photoshop CS6 / Instructions / FileNameHere).

    Is this possible. An alternative is to have only the script go to the finder and show the folder. Or if its possible also opens all files in this folder (but maybe that's not necessary if it is difficult)

    Any ideas?

    Open the folder

    var myFolder = file ('path');

    myFolder.execute ();

    Open the file

    var myFile = file (' path/file.pdf");

    myFile.execute ();

    Let the user select a folder and open all the .pdfs in the folder

    myFolder var is Folder.selectDialog ('select the file!');.

    myFiles = myFolder.getFiles ("*.pdf") var;

    for (var i = 0; i)< myfiles.length;="">

    [i] myFiles .execute ();

    };

  • Save the file with script ("modified outside the Illustrator" skip warning)

    Hi all

    We are all familiar with this command:

    app.activeDocument.save();
    

    saves the document jump all the dialog boxes and even alert which is jumping every time manually save you your file on a server:

    Screen Shot 2015-04-04 at 11.03.58.png

    My problem is that I work with PDFs (with preserved Illustrator editing capabilities) almost all the time instead of .ai files and whenever I use

    app.activeDocument.save();
    

    The .ai file is created.

    My question is if it is possible to save the PDF file that you are working on even as you would manually 'save' in the context menu, omitting this boring dialogue on updated the file?

    Concerning

    Peter

    Hi Carlos,

    Near!

    I managed to do it with:

    app.userInteractionLevel = UserInteractionLevel.DONTDISPLAYALERTS;
    app.executeMenuCommand ('save');
    app.userInteractionLevel = UserInteractionLevel.DISPLAYALERTS;
    

    Thanks again!

  • How to get rid of confirmation on the actions with scripts dialog (multi path delete)?

    "I am using a script in actions to clear all roads, since the web found the 'activeDocument.pathItems.removeAll (); " and it works fine when it is called in the menu script not these dialogs at all but when I try to use it in shares, it still appears a dialog box asking for confirmation if I really want to remove" path regardless.

    Any help on how to perform this action without dialog would be much appreciated.

    Ty in advance.

    Try

    app.displayDialogs = DisplayModes.ERROR;

    or

    app.displayDialogs = DisplayModes.NO;

    In both cases, you probably want to reset to its original state when you are finished.

Maybe you are looking for

  • How to transfer the Favorites of the phone for laptop

    How can I transfer my favorites from my Firefox android on my laptop?

  • HP 14 - d039tu: Bios

    I have laptop with bios: Insydeh20 version 05.03.31F.11 and I want to display menu advanced in the bios, then what should I do?

  • HP6520 does not print and can not be seen by all devices

    I recently bought a HP6520 printer and assign the all, the first time I printed from a Windows PC using the software provided was very good, also I printed my book of mac pro with success.   I try to use it again and now it won't do anything. IFI try

  • HP 15 ay503tx: my laptop webcam does not work

    my laptop webcam is not working... I installed all the drivers from the manufacturer's Web site... still, I cannot open my webcam.when I click on cyberlink youcam, showing me an error massage "you do not have compatible VGA hardware or driver to run

  • Vista will not load after complete reinstallation

    It is a dell laptop inspiron 1720. system was ok before. lost password admin and not a lot of data on mahine. said best is to just do a clean reinstall. Vista will not start after re-installation complete. hard drive formatted and loaded into the par