How to set a certain layer is selected or not?

If you click outside the open document, and then on board the unidentified layers which layer is active, some are blocked by filters, but in the properties of the active layer of a document. In his instrument, I also want to block some controls if you explicitly choose one of the layers (not selected in the layers panel)

This will give you a list of the selected layers, the table will be nil if no layers are selected.

var selectedLayer =  getSelectedLayersIdx();
if(!selectedLayer.length) alert("no layers selected");

function getSelectedLayersIdx(){
      var selectedLayers = new Array;
      var ref = new ActionReference();
      ref.putEnumerated( charIDToTypeID("Dcmn"), charIDToTypeID("Ordn"), charIDToTypeID("Trgt") );
      var desc = executeActionGet(ref);
      if( desc.hasKey( stringIDToTypeID( 'targetLayers' ) ) ){
         desc = desc.getList( stringIDToTypeID( 'targetLayers' ));
          var c = desc.count
          var selectedLayers = new Array();
          for(var i=0;i 
         

Tags: Photoshop

Similar Questions

  • How to set the first character as selections in the EditField.

    Hi friends,

    I am a third-party application that I have to set the first character as capital.

    so please help me how to set the first tank as capital.

    Take a look at AutoTextEditField - maybe you can use this to do it automatically...

  • How to set the size of the selection list

    Hi all

    I want to see the selection list as multi select but not able set the "size" attribute in the attributes of the HTML Form element. It gives an error
    * SIZE and ID attributes must not be specified. Any help is very appreciated.


    Thank you

    Hello:

    Add this piece of JS in the page footer

    
    

    CITY

  • How to set the width of a Select list in APEX 5.0?

    Hello

    I have been using APEX 4.2 for a couple of years now. I am currently building my first application in APEX (Oracle DB 11g XE) 5.0

    On a page with multiple selection lists, I'm trying to set the width of each of them, so they are all the same size regardless of content.

    APEX 4.2, I used to just add: style = "width: 200px ' to 'ownership of the attributes of element HTML Form.

    How do I in the APEX 5.0? Property of the 'HTML Form Element attributes does not seem to exist anymore. Is there another way?

    Nick

    Hello

    You can use custom attributes: CSS min-width and max-width properties

    Concerning

    J

  • How to set the width of a select list?

    Hello

    an another newbie question me :-)

    When I create a list of selection the default width is 30, no matter what I set this value to the width of the selection list remains the same, it is as wide as the widest item in the list. This mess the page design. I f I have three select lists in a column, I want to have the same width. How to accomplish this?

    / Magnus

    Change the element and in the form HTML to the elements attributes field type the following:

    style="width:120px";
    

    adjust the 120 to what width you like

    Shunt

  • How to set up the printer to SELECT PUBLICATION report in R12.1.3?

    Legends of dear,

    Our Env: R12.1.3 RHEL 64 bit 5.6 DB - 11.1.0.7

    I'm a DBA working on this issue. Please let me know how to configure a specific printer for a specific version report Pick.

    We tested the test page of a report works normal, but during the execution of freedom to CHOOSE by the client, is not printing out.

    Execution of the expedition: Version: 12.1

    Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.

    WSHPSGL: Choose selection list generation

    +---------------------------------------------------------------------------+

    Current system time is August 4, 2015 11:05:55

    +---------------------------------------------------------------------------+

    * Starts * August 4, 2015 11:05:55

    * Ends * August 4, 2015 11:05:56

    Choose selection completed successfully

    +---------------------------------------------------------------------------+

    Beginning of the FND_FILE log messages

    +---------------------------------------------------------------------------+

    p_log_level is 0

    In Release_Batch_Sub, the collection is complete

    Choose selection is complete

    +---------------------------------------------------------------------------+

    End of the FND_FILE log messages

    +---------------------------------------------------------------------------+

    +---------------------------------------------------------------------------+

    No AutoComplete options were opposed.

    Size of the output file:

    0

    Output is not printed because:

    The option has been disabled for this report.

    +---------------------------------------------------------------------------+

    Concurrent query ended with success

    Current system time is August 4, 2015 11:05:56

    +---------------------------------------------------------------------------+

    Please help me how to solve this problem.

    Thank you

    Knockaert

    Hello

    Did you add the printer to the program simultaneous definition "choose selection list generation"?

    Kind regards

    Harsha

  • How to set the slider tool to select the tool when opening acrobat XI 11.0

    I need the tool to default to the Selection tool and NOT the hand tool slider when you open Acrobat XI 11.0

    Hi mkwillden,

    Once you select the "Select" tool any subsequent launches of the software should keep the 'selection' as default tool.

    If this isn't the case, you can specify the parameter registry here:

    HKEY_CURRENT_USER\Software\Adobe\Adobe Acrobat\11.0\Selection

    Change the data of aDefaultSelect to Select or by hand as requires it.


    Kind regards

    Rave

  • How to set a nonprinting layer in Illustrator CC 2014?

    He disappeared into the layers Options window: the only options I have are Show and Lock. Model is gone, too.

    You mean something like this where you double dlicked on the element instead of the layer?

  • How to set the timeout of read when using channelReader.ReadWaveform?

    I'm using a USB-6210/a. data acquisition, and it works fine until I have to take a longer than 10 s waveform.

    When I take a longer than wave form, I get the error 200284, "some or all of the requested samples are not yet acquired.  To wait for the samples become available use longer read timeout... »

    No problem, I thought, I'll just put a longer period.  I searched through the documentation, and the timeout only I found was the watchdog timeout.  When I wanted a longer value, I get code 200452 State - specific property is not supported by the device or is not applicable to the task.

    I use the code in the example AcqVoltageSamples_IntClk.2008 .net with c# in Visual Studio 2008, .net 3.5 sp1.

    How to set the timeout so that ReadWaveform() is not the time?

    Here is the code:

    privateAnalogMultiChannelReaderchannelReader;

    privateAnalogWaveform awf;

    publicList GetWaveForm()

    {

    Try

    {

    Task getWaveform = newTask();

    getWaveform.AIChannels.CreateVoltageChannel (Channel,"", TerminalConfiguration, RangeMinimum,

    RangeMaximum, AIVoltageUnits.Volts);

    getWaveform.Timing.ConfigureSampleClock ("", SampleRate, SampleClockActiveEdge.Rising,)

    SampleQuantityMode.FiniteSamples, NumSamples);

    getWaveform.Control (TaskAction.Verify);

    channelReader = new AnalogMultiChannelReader (getWaveform.Stream);

    AnalogWaveformdata = channelReader.ReadWaveform (NumSamples);

    AWF = data [0];

    samples As new List();

    for (inti = 0; i)

    returnsamples;

    }

    catch (DaqExceptionexception)

    {

    MessageBox.Show (exception. (Message);

    }

    List of l = newList();

    return l;

    }

    Thank you

    Curt

    Hi Curt,.

    Here is a Knowledge Base that can help you to set the timeout setting in your code:

    The property using Timeout of DAQmx task in Visual Studio

  • Why wmp12 don't set selected view? How then set as default?

    Why wmp12 in win7 do not display selected set? How then set as default?

    Hi wksu,.

    I see that you want to set playback in Windows media player 12. I'll help you with this problem.

    1. What is the brand and model of the computer?

    2. what security software is installed on the computer?

    3. have you made changes on the computer recently?

    4. what happens when you try to set the visualization?

    I suggest you to refer to this article and check if that helps.

    Watch visualizations while playing your music: http://windows.microsoft.com/en-US/windows7/Watch-visualizations-while-playing-your-music

    Notes:

    Not all visualizations are visible mode full-screen.

    Visualizations can not be read when you go to Windows Media Player by using remote desktop.

    Try these steps and let us know the status.

    Thank you.

  • How can I set a certain web page automatically start and open when I connect Windows?

    How can I set a certain web page automatically start and open when I connect Windows?  My company as a "Home Page" that I would like it to appear when I connect Windows.

    Hello.

    Yes, you can do it. The only way to do this is to create a startup items.

    STEP 1- Make sure that the home page is set correctly

    Second STEP- Creating a startup items

    How to create a startup items:

    1. Right click on the shortcut of browser (Internet Explorer, Mozilla Firefox, Google Chrome), then click on copy.
    2. Open the start menu, click all programs.
    3. Right click on the startup folder, click Explore.
    4. Right-click on an empty area of the Windows Explorer, click Paste shortcut.

    STEP 3- Restart the computer to apply the changes and see the effect

    Response to see if it helps.

  • How to set the visibility of the layer on the initial view?

    I created some shapes that have multiple layers in them. They are several pages long. Page 1 there are 3 radio shows buttons... it selects the appropriate user type and begins running the correct layer and turns off the other layers. Unfortunately, if they go to page 2, before clicking on one of the butttons, they see all layers at once, and it's a confused mess.

    Is there a way to set the default layer visibility so that when you open the PDF file, it only shows the layer I want it? I don't find it in the initial view settings.

    Thanks in advance for any help provided!

    Yes, you can use a script to document level to set the State of the OCG, Optonal content group or layer, States up-front objects.

    var nOCG = 0; number of BCG for display

    all leave OCGS

    SOWC var = this.getOCGs ();

    SOWC [0].initState.constants.states.off;

    Activ a BCG for initial view

    SOWC [nOCG].initState.constants.states.on;

  • How to set the font on the text selected in textframe?

    Hello

    I want to change the font (let's say Times New Roman) of the selected text in textframe when I click on the menu of my plug-ins item.

    I have gone through the documentation of the Adobe text engine and tried a code for setting fonts but failed. I do not see a member function in class IFont to set the desired font, so impossible to move forward.

    Please see the code. I would like to know something more that how can we define a specific font for a textframe?

    TextRangesRef rangesRef = NULL;

    result = sAIDocument-> GetTextSelection (& rangesRef);

    aisdk::check_ai_error (result);

    ITextRanges ranges (rangesRef);

    If (mountain ranges. GetSize() > 0)

    {

    Range ITextRange = ranges. Item (0);

    ICharFeatures = range characteristics. GetUniqueLocalCharFeatures();

    IFont fonts;                     I don't see any method to make the desired font.

    features. SetFont();

    Thank you.

    D.A.

    First, download the policy:

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

    AIFontKey fontKey = 0;

    Error AIErr = sAIFont-> FindFont ("Times New Roman regular", kAIAnyFontTechnology, kNativeAIScript, 0, & fontKey);

    do something with the error

    ATE::FontRef fontRef = 0;

    error = sAIFont-> FontFromFontKey (fontKey & fontRef);

    do something with the error

    ATE::IFont do (fontRef);

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

    Then, apply like this:

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

    ATE::TextRangeRef textRangeRef = 0;

    Error AIErr is sAITextFrame-> GetATETextRange (handle_to_artwork & textRangeRef);.

    check error

    ATE::ITextRange textRange (textRangeRef);

    ATE::ICharFeatures charFeatures = textRange.GetUniqueLocalCharFeatures ();

    charFeatures.SetFont (do);

    textRange.ReplaceOrAddLocalCharFeatures (charFeatures);

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

    There are several other ways to set the text, but you must understand how the paragraph & character styles interact with each other to understand the differneces. It is the simplest way to do it well.

  • How to set up the initial States of layer in pdf format

    Hello. What version of Acrobat will I need set the initial layer visibility States? At present, all the layers in the PDF files that we create at work are defined on it, but we want to control that appears at startup. Do I need pro or pro extended? I was unable to understand that comparison of the production / purchase guide.

    Furthermore, is it possible to rotate the layer visibility changes in batch? For example take 100 cards with all the market and output layers the same number, but with only the selected layers. Can I customize the code of the lot, what scripting language I should know?

    Thank you very much

    J

    There are no Pro Extended, Pro just.

    Yes, you could States of batch layer, provided their order or names were the same in each document. All scripts in Acrobat is done with JavaScript, and batch processing is now part of the toolset of measures (it still can work JavaScript snippets against files, just via a new system of dialogue based on a Wizard).

  • How to set the printer wireless ad Hoc mode to CP1025nw with automatic stop is off? IE never automatic.

    How to set the printer wireless ad Hoc mode to CP1025nw with automatic stop is off? IE never automatic.

    Thank you very much for your help, if necessary.

    Quite a few questions, send, but I will do what I can to answer them.

    I recommend first to buy a router, even if it's one you won't connect to internet and it network with others your PC and printer. This will give you the best features and the results of what you're trying to do.

    In addition, the automatic stop of the printer function can be disabled and is not affected by the type of connection. Usually, you can go through the configuration Menu and select tools to change the options there on the energy saving features.

    Finally, the auto off function on your computer is a Windows question, but one easy answer. If you're on a laptop, you can right click on the battery in the tray (lower right corner) and change the settings for energy conservation.

    You might be better off installing the printer via the USB cord and alternately inspiring when you use it, but which is not optimal if you are printing only a few documents on an irregular basis. A network connection is the easiest to manage across multiple computers, honesty, but you have certain requirements for this connection and limits as well.

    I hope this information is useful!

Maybe you are looking for

  • FaceTime Activation error

    I have been using facetime on my apple devices. 2 days before all of a sudden my all my devices apple facetime has disconnected. Now on Iphone 6 when I try to connect it gives me error "ACTIVATION of FACETIME, an error occurred during activation. Try

  • I use iphone 32 gb grey 5s

    Hello I forgot my apple ID password to my Iphone How can I solve this problem, I can not start Post edited by: brijesh205

  • Satellite A205-SP5820: where can I find the init file V1.0.4.0 GST?

    Hello Where can I find this file V1.0.4.0 init GST? thnx

  • Tasks of installation of WSUS 2012 Server Message fail - access denied

    I couldn't find the right place to post this. I have a Windows Server 2012 who was executed on this WSUS.  One day, it just stopped to receive updates.  Several attempts to make it work again failed, so I uninstalled WSUS and re-installed.  WSUS inst

  • How to disable the VirtualStore in Windows 7?

    Tell me why I should leave it or what it does. I know what he does. It prevents my application to work correctly. The application must be able to read/write files in their ACTUAL location, not in their virtual store. Disable UAC on Vista it kills, bu