Enable/disable single-click mask

I am familiar with the OS x keyboard shortcut click + the possibility to show/hide layer mask.

Trying to toggle mask script behavior. I found a forum script that toggles a mask layer in three clicks.

1-click-1 (selects layer mask)

Screen Shot 2016-01-23 at 10.37.22 AM.png

2 - Click 2 (shows mask)

Screen Shot 2016-01-23 at 10.37.40 AM.png

3 - Click 3 (mask mask and makes the icon of the active layer)

Screen Shot 2016-01-23 at 10.38.01 AM.png

Now for the tricky part. Can a script toggle a layer mask without making the icon of the active layer after the toggle effect?

In other words, the script selects the layer mask to mask toggles and maintains the icon of selected master.

Link to the forum script: Re: toggle selection

You want something like that?

function isChannelMaskSelected() {}

var ret = false;

If (hasMask () == true) {}

If (getChannelMaskSel () == true)

{

RET = true;

}

else {ret = false}

}

return ret;

};

function hasMask() {}

var hasMask = false;

Var ref = new ActionReference();

var keyHasMask = app.stringIDToTypeID ("hasUserMask");

var keyHasMask = app.charIDToTypeID ("rocket");

ref.putEnumerated (app.charIDToTypeID ("Lyr"), app.charIDToTypeID ('Ordn'), app.charIDToTypeID ("Trgt'));

var / / desc = executeActionGet (ref);

If (desc.hasKey (keyHasMask)) {}

hasMask = true;

}

Return hasMask;

}

function selectComponentChannel() {}

try {}

map var = {}

Map [DocumentMode.GRAYSCALE] = charIDToTypeID ('Blck');

Map [DocumentMode.RGB] = charIDToTypeID ("RGB");

Map [DocumentMode.CMYK] = charIDToTypeID ('CMYK');

Map [DocumentMode.Lab] = charIDToTypeID ("Lab");

var / / desc = new ActionDescriptor();

Var ref = new ActionReference();

ref.putEnumerated (charIDToTypeID ('one'), charIDToTypeID ('one'), map [app.activeDocument.mode]);

desc.putReference (charIDToTypeID ('null'), ref);

executeAction (charIDToTypeID ('slct'), desc, DialogModes.NO);

} catch (e) {}

};

function selectChannelMask (visible) {}

try {}

var / / desc = new ActionDescriptor();

Var ref = new ActionReference();

ref.putEnumerated (charIDToTypeID ('channel'), charIDToTypeID ('channel'), charIDToTypeID ("Msk"));

desc.putReference (charIDToTypeID ("null"), ref);

desc.putBoolean (charIDToTypeID ("MKV"), visible);

executeAction (charIDToTypeID ("TPCV"), desc, DialogModes.NO);

Returns true;

} catch (e) {return false ;}

};

function getChannelMaskVis() {}

isVisible = false var;

Var ref = new ActionReference();

var keyVisChannels = app.stringIDToTypeID ("visibleChannels");

ref.putEnumerated (app.charIDToTypeID ("Lyr"), app.charIDToTypeID ('Ordn'), app.charIDToTypeID ("Trgt'));

var / / desc = executeActionGet (ref);

If (desc.hasKey (keyVisChannels)) {}

list = desc.getList (keyVisChannels);

Alert ("kas key");

Alert (DESC. GetType (keyVisChannels));

Alert (List.Count);

If (List.Count > 1)

{

isVisible = false;

}

else {isVisible = true}

}

return isVisible.

}

function getChannelMaskSel() {}

Var ref = new ActionReference();

ref.putProperty (charIDToTypeID ('Rprp"), stringIDToTypeID ('numberOfChannels'));

ref.putEnumerated (charIDToTypeID ('Dcmn"), charIDToTypeID ('Ordn'), charIDToTypeID ("Trgt'));

var / / desc = executeActionGet (ref);

var numberOfChannels = desc.getInteger (stringIDToTypeID ('numberOfChannels'));

Var ref = new ActionReference();

ref.putProperty (charIDToTypeID ('Rprp"), stringIDToTypeID ("targetChannels"));

ref.putEnumerated (app.charIDToTypeID ("Lyr"), app.charIDToTypeID ('Ordn'), app.charIDToTypeID ("Trgt'));

var / / desc = executeActionGet (ref);

list var = desc.getList (stringIDToTypeID ('targetChannels'));

firstIndex var = list.getReference (0) .getIndex ();

return list.count == 1 & firstIndex == numberOfChannels + 1;

}

function toggleChannelMask0() {}

var maskSelected = isChannelMaskSelected();

if(maskSelected == true) {}

If (getChannelMaskVis () == true)

{

selectComponentChannel();

{else {selectChannelMask (true)};

} else {}

selectChannelMask (false);

}

};

function toggleChannelMask() {}

var maskSelected = isChannelMaskSelected();

if(maskSelected == true) {}

If (getChannelMaskVis () == true)

{

selectChannelMask (false);

{else {selectChannelMask (true)};

} else {}

selectChannelMask (false);

}

};

toggleChannelMask();

Tags: Photoshop

Similar Questions

  • Firefox does not account for single click and has double click for a feature need simple click as a bookmark link, enter in a text box, press a button

    Firefox 7.0.1 on Win7 pro 64

    Hello team FF & community.

    sometimes FF 6/7 shows a VERY strange behavior:
    While 'normal' things on Web sites (click on the links, edit text, scrolling, evolution of the tabs boxes) FF starts to ignore my simple clicks. The only way to work is with double-click instead of single-click (i.e. for links, enter a SBO, switch tabs, even to open a menu of Firefox) for all actions.

    Previously, the last example was about a minute

     https://plus.google.com/circles/find
    

    While moving to a "circle" contact - FF changes only are allowed double clicks. No errors, no message.

    I found this behavior buggy on many different sites - simple websites and with complex features, too - in the past few weeks since bf6 + 7 are current versions.

    With my other two questions, I get the idea that the current releases of FF contain more bugs in versions between FF1 to FF3.

    OK, I think that this issue (change of behavior: needs double click to get the reaction of simple click)-isRESOLVED: -

    I have disabled all addons and enabled/tested one by one... it was, apparently, the add-on "Multi links 3.0.0.16" was the problem.

    I replaced it with "Snap Links 2.1.1" (installed, but not yet tried a new), and less than a week daily work of 10-12 I never got this bug again.

    SOLVED!

  • How can I enable disable Activity Manager?

    How can I enable disable Activity Manager?

    General information:
    The activity Manager records all interactions between Thunderbird and your e-mail in one place provider. There is no guesswork more. Just look in one place to see what's going on with your email.
    Activity Manager allows you to follow more closely what is happening in the system and what activities are currently performed (for example, synchronization of folders offline IMAP, download new POP messages). The info in the status bar may appear and disappear quickly sometimes before able to read, but the info is displayed in the Manager activity.

    Useful in the audit of what has occurred and are auto stocks. This can help in the troubleshooting section.

    It appears if you select 'Tools' > 'the activity Manager.
    Thus, it is not something that suddenly arises every two minutes to annoy the user.
    The journal is deleted whenever you leave Thunderbird or you can clear the log manually.
    "Tools" > "activity Manager".
    Click on the button 'clear list '.

    This is an unusual request to stop the activity of logging as a background process and the only way to check what activity account has or has not occurred.

    I have searched and checked preferences to see if it could be turned off, but nothing helped.

  • How can I disable the "Zoom enabled / disabled Zoom" Notification.

    How can I disable the "Zoom enabled / disabled Zoom" Notification.

    I see a lot of people who don't don't not transparent "activated Zoom / Zoom disabled»

    After triple notification area by clicking on the Home button.

    My iPhone6 shows all the time and I want to turn it off.

    Thank you

    Chris

    Hi Chris,

    Here are the instructions to turn off the Zoom feature on your iPhone:

    If your home screen icons are magnified on your iPhone, iPad or iPod touch

    Disable Zoom in your device settings

    If you cannot access the settings because your home screen icons are magnified, double tap with three fingers on the screen to zoom out.

    To turn off the Zoom feature, go to settings > general > accessibility > Zoom > press the slider to turn off.

    Happy new year!

  • Disable touchpad 'click '.

    I feel that I've been all over the internet. I want to just disable the click on my touchpad. I have a gateway _ and vista. Please help me, it drives me crazy!

    Hi FrostChilde,

    Please use the forum for answers,

    You want to disable completely the touchpad or just the sound of the click?
    If you want to disable it completely, go to Device Manager > locate the keyboard in the list > right click and select disable device.
    If you want to enable the clicking sound, check in Control Panel > mouse and its option to see if there is one for Gateway touchpad.  Each computer may have a different expectation to put sound effect.

    Let us know if you have any other questions, Kevin
    Microsoft Answers Support Engineer
    Visit our Microsoft answers feedback Forum and let us know what you think.

  • How to enable / disable certain fields based on the value of the checkbox

    This is probably a stupid question, but I was not able to find the trivial solution (I'm fairly new to the user's BlackBerry interface)

    Example scenario:

    Screen of the user interface with two components

    box: "Run daily.

    time field: ' to hh: mm ".

    If the check box is enabled, the hour field must be activated. If the check box is not selected, the time field should be disabled.

    I wasn't able to find a simple solution. The solution is to remove all components and re-create it with different style (Field.NON_FOCUSABLE |) Field.READONLY), but there are significant drawbacks:

    1. It's pretty messy keep the current value (if the user has modified the time field and click twice on the box, I would like to have the same value and the field must be dirty)
    2. She becomes more messy when you have more complicated logic (panels inside panels that should be enabled / disabled based on all parent checkboxes)

    Any ideas?

    Thanks in advance!

    The way I handled it was to the custom methods in areas that allow me to set the disabled and then state substitute TouchEvent, NavigationMovement and NavigationClick methods to search for this variable and simply return true if it is defined. This will take care of the FieldChanged States and targeted to make them unable to be activated.

  • Enabled / disabled as in FABS

    Hello

    Congratulations for the beautiful JavaFX, I think it will be in the future.

    How I can the devil/activate a button based on a property?

    Or this associated with a method, so more buttons in a toolbar can share the same method?

    For example, a complex application may have most of the buttons in the menu disabled if no project is open.

    With a single call to a method must signpost that the property changed and freshen up the interface.

    Same thing for the selectedProperty.

    Something similar is being implemented to the title of best Swing Application Framework.

    There are the bellows of the anotated method with:

    @org.jdesktop.application.Action (enabledProperty = "flagIsProcedureFunctionTrigger", selectedProperty = "flagIsSystem")

    public void markAsSystem() {...}

    I create a button JButton() = new JButton (getAction ("markAsSystem"))

    The getAction is provided by the framework and creates an Action with the appropriate icon and the text (from resource files) by calling the markAsSystem() method.

    There are two more methods isFlagProcedureFunctionTrigger() and isFlagIsSystem() return Boolean values.

    The software calls a method whenever the System State has changed. It automatically update the interface user and toggle buttons.

    static Boolean isSystem private = false;

    public void fireEvents() {}

    public void fireEvents() {}

    Boolean _isSystem = isSystem;

    isSystem = sql.isSystem ();

    If (_isSystem! = isSystem) firePropertyChange ("flagIsSystem", _isSystem, isSystem);

    }

    Thank you

    Dragos

    I don't know the Swing framework you use, although I did a bit of programming Swing in my day. At the time, if I remember correctly, I subclass AbstractAction and substitute their isEnabled() to manage the enabled/disabled state of button groups.

    In JavaFX, State of controls such as if they are enabled is managed by an observable property API. Have a quick look at the tutorial for that. In short, an observable property is a value that can be set and can be observed via a listener for changes in its value. The properties can be bound; binding of one property to another basically registers a listener for changes in a property that updates a second property, when these changes occur.

    Nodes have a disableProperty, which when set to true will disable this node and all nodes below the graphic scene. So if you want to disable a button under certain conditions, you can do

    myButton.disableProperty().bind(...);
    

    If you have a container with buttons that should all be disabled under the same conditions, you can bind the property disable of container:

    HBox buttonBox = new HBox();
    buttonBox.getChildren().addAll(button1, button2, button3);
    buttonBox.disableProperty.bind(...);
    

    Here is a complete example, where some of the buttons in a toolbar are activated when something is selected in a list:

    import javafx.application.Application;
    import javafx.beans.binding.Bindings;
    import javafx.beans.value.ObservableValue;
    import javafx.collections.FXCollections;
    import javafx.event.ActionEvent;
    import javafx.event.EventHandler;
    import javafx.geometry.Insets;
    import javafx.geometry.Pos;
    import javafx.scene.Scene;
    import javafx.scene.control.Button;
    import javafx.scene.control.ListView;
    import javafx.scene.control.ToolBar;
    import javafx.scene.layout.BorderPane;
    import javafx.scene.layout.HBox;
    import javafx.stage.Stage;
    
    public class DisableButtonDemo extends Application {
    
        @Override
        public void start(Stage primaryStage) {
            final ToolBar toolbar = new ToolBar();
            final ListView list = new ListView<>(
                    FXCollections.observableArrayList("Apples", "Oranges", "Bananas", "Pears"));
            final Button clearSelectionButton = new Button("Clear selection");
            clearSelectionButton.setOnAction(new EventHandler() {
                @Override
                public void handle(ActionEvent event) {
                    list.getSelectionModel().clearSelection();
                }
            });
            Button addButton = new Button("Add");
            Button editButton = new Button("Edit");
            Button deleteButton = new Button("Delete");
    //
            // Bind disable property of buttons:
            ObservableValue emptySelection = Bindings.isEmpty(list.getSelectionModel().getSelectedItems());
            editButton.disableProperty().bind(emptySelection);
            deleteButton.disableProperty().bind(emptySelection);
            clearSelectionButton.disableProperty().bind(emptySelection);
    //
            toolbar.getItems().addAll(addButton, editButton, deleteButton);
            HBox clearSelectionButtonContainer = new HBox();
            clearSelectionButtonContainer.setAlignment(Pos.CENTER);
            clearSelectionButtonContainer.getChildren().add(clearSelectionButton);
    //
            final Insets padding = new Insets(10);
            clearSelectionButtonContainer.setPadding(padding);
    //
            BorderPane root = new BorderPane();
            root.setPadding(padding);
            root.setTop(toolbar);
            root.setCenter(list);
            root.setBottom(clearSelectionButtonContainer);
    //
            Scene scene = new Scene(root, 600, 600);
            primaryStage.setScene(scene);
            primaryStage.show();
        }
    //
        public static void main(String[] args) {
            launch(args);
        }
    }
    

    Notice how I used the class Bindings to create value to bind the disable property. The class of links has a ton of useful methods to create links.

  • Keep the layers enabled/disabled

    How can I keep layers enabled/disabled when opening a file?

    I like to keep my files as clean and simple as possible. When I opened the files with layers of multipule I want often they remain untoggled but everytime I open a template file or file .ai that each layer is enabled.

    Is there a way to keep all untoggled layers in the file so that I can quickly find the layer I need without having to manually untoggling them?

    Illustrator CS3 13.0.2

    Windows XP

    You can not fundamentally.

    Best option, put all the layers into a new layer. You can then when you open the file Option/Alt click the top layer to close and all internal layers sub will close as well.

  • When I send a mass text by enabling / disabling message group, then I turn on message group, suddenly became a group text responses?

    When I send a mass text by enabling / disabling message group, then I turn on message group, suddenly became a group text responses?

    I sometimes send jokes or notifications to multiple contacts.  After I mass text them by activating / deactivating iMessage and Group Messages, then I switch on iMessage and Group Messages - will people I sent a mass text message can see phone numbers and the responses of the other?

    I think it should not because after sending the text it comes just up on their phone as a text message you only, but I want to just make sure

    Thank you

    Hello Eddie7777,

    Thanks for your post. I understand that you wanted to confirm if a mass message will convert to a group message after activating again Group Messaging. I certainly understand wanting to send a mass text message without launching a group of crazy message where number of all is shared. I'll be more than happy to help clarify.

    I tested on my iPhone, and so my previous knowledge on the messages, I discovered some great information. When you send a mass text with disabled group messaging message, it sends the messages individually and these other people only get a text without your mass SMS numbers. When you have enabled messaging group once again, it won't change the message on their end, and if they say it will for you.

    Hope this helps explain things!

    Take care!

  • disable the click right trackpad

    Hello

    I've always had a disabled right click (like being able use the whole trackpad) and used to use ctrl + click instead.

    I'm now with MacOS Sierra is no longer able to do so, as I'm not able to disable the trackpad when I use a mouse (mouse magic) Lord...

    MacOS Sierra is broken?

    System Preferences > Trackpad > Point & Click > secondary click = "uncheck".

  • How to enable/disable cookies in Firefox for iOS?

    How to enable/disable cookies in Firefox for iOS?

    Hi Aaaassssddddffff,
    To disable or enable cookies in Firefox iOS, you need a content blocker. This is done in Safari tap Settings > Safari > block Cookies

    Focus is a nice content for devices with ios 8 and maximum blocker, this could be a nice way to block certain content, including cookies. Focus by Firefox

  • How can I disable right-click?

    I right click disabled globally on Windows 10, but FireFox still right click. How can I disable right click in the browser?

    Windows update has finally solved, I can't believe that I didn't try first. Thanks anyway!

  • How can I make double click to single click to open files?

    How can I make double click to single click to open files?

    See:

  • disable the click to activate functionality?

    Win7, Firefox 30. I followed the instructions to disable the * click here to activate * feature and appears as * wrong * about: config... but it is still asking me to click to activate. What Miss me?

    You can set the default behavior for each plugin on Firefox/tools > Modules > Plugins page.

  • Why does take two clicks to open an e-mail now instead of a single click, that it usually take?

    So far, it took only a single click to open an email in the Inbox and now it takes 2 clicks. How to return to a single click? Y at - it a setting or an option for this?

    The standard has always been a click to view the message in the messages pane and two clicks to open a message in a window or tab.

    If you do not have the set message pane, press F8.

Maybe you are looking for