# batchPlay to set Brush opacity toggles stylus-specific options off in the Options bar

**URL:** <https://forums.creativeclouddeveloper.com/t/batchplay-to-set-brush-opacity-toggles-stylus-specific-options-off-in-the-options-bar/3613>\
**Category:** Photoshop\
**Tags:** bug\
**Created:** [September 12, 2021, 5:03pm UTC](https://forums.creativeclouddeveloper.com/t/batchplay-to-set-brush-opacity-toggles-stylus-specific-options-off-in-the-options-bar/3613 "2021-09-12T17:03:19Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![AnthonyK](https://avatars.discourse-cdn.com/v4/letter/a/85f322/32.png) [@AnthonyK](https://forums.creativeclouddeveloper.com/u/AnthonyK)\
**Post date:** [September 12, 2021, 5:03pm UTC](https://forums.creativeclouddeveloper.com/t/batchplay-to-set-brush-opacity-toggles-stylus-specific-options-off-in-the-options-bar/3613/1 "2021-09-12T17:03:19Z")

</div>

The following batchPlay code sets Brush opacity:

```auto
require('photoshop').action.batchPlay([
    //Set brush opacity to 100%
    { "_obj": "set","_target": { "_ref": "paintbrushTool" }, "to": { "_obj": "currentToolOptions", "opacity": 100}, "_options": {"dialogOptions": "dontDisplay" }},
], {"synchronousExecution": false, "modalBehavior": "wait"});

```

However, on Windows, if any of the stylus-specific options on the Options bar (use pressure for size, use pressure for opacity, or enable airbrush) are toggled to “On,” they will toggle to “Off” when this code executes. It also happens when using batchPlay to change the blend mode of the brush. I had another customer who said just the opposite happened. For him, they toggled “On,” though I’ve not observed that.

I’ve also noticed the Burn and Dodge tools are similarly affected. Changing options in the Options bar with batchPlay toggles the stylus-specific settings to “Off.”

That doesn’t seem right. Ideally it would be possible to change just one or two things in the Options bar without affecting these stylus settings.

---

<div class="post-metadata">

**Author:** ![AnthonyK](https://avatars.discourse-cdn.com/v4/letter/a/85f322/32.png) [@AnthonyK](https://forums.creativeclouddeveloper.com/u/AnthonyK)\
**Post date:** [September 13, 2021, 8:28pm UTC](https://forums.creativeclouddeveloper.com/t/batchplay-to-set-brush-opacity-toggles-stylus-specific-options-off-in-the-options-bar/3613/2 "2021-09-13T20:28:54Z")

</div>

In addition to the stylus-specific options toggling inappropriately as described above, the “useScatter” option also gets toggled to “true,” which is equally frustrating. I’ve started checking the toggle state for all these and resetting them when I reset other brush options. However, I have a feeling there are other options that I’m probably missing.
