# "Export As" / "Save for Web" and "Select and Mask" - how to use with UXP or batch play

**URL:** https://forums.creativeclouddeveloper.com/t/export-as-save-for-web-and-select-and-mask-how-to-use-with-uxp-or-batch-play/4003
**Category:** UXP Plugin API
**Created:** [December 9, 2021, 8:16pm UTC](https://forums.creativeclouddeveloper.com/t/export-as-save-for-web-and-select-and-mask-how-to-use-with-uxp-or-batch-play/4003 "2021-12-09T20:16:40Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Adam](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.creativeclouddeveloper.com/adam/32/1808_2.png) [@Adam](https://forums.creativeclouddeveloper.com/u/Adam)
#### Post date: [December 9, 2021, 8:16pm UTC](https://forums.creativeclouddeveloper.com/t/export-as-save-for-web-and-select-and-mask-how-to-use-with-uxp-or-batch-play/4003/1 "2021-12-09T20:16:40Z")

</div>

Hi,

I’m trying to find the solution for two issues:

1. How to create the function that will use Export As or Save for web with custom settings selected through Panel? I can’t find the way to record Export As through Alchemist and did’t find solution with UXP.

This is how I want to use it:

 ![Zrzut ekranu 2021-12-9 o 21.10.23](https://us1.discourse-cdn.com/flex015/uploads/xdplugins/original/2X/e/ed90e556e7e222f4a2acf885d9ede0692ac50867.png)

1. Hów to open Select and Mask window with batch play or UXP?

I want to open it through button in my panel:  
 ![Zrzut ekranu 2021-12-9 o 21.10.33](https://us1.discourse-cdn.com/flex015/uploads/xdplugins/original/2X/0/0dca538399f41f207cd441780536923811cefa68.png)

Thank you!

---

<div class="post-metadata">

### Author: ![Adam](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.creativeclouddeveloper.com/adam/32/1808_2.png) [@Adam](https://forums.creativeclouddeveloper.com/u/Adam)
#### Post date: [December 11, 2021, 12:27pm UTC](https://forums.creativeclouddeveloper.com/t/export-as-save-for-web-and-select-and-mask-how-to-use-with-uxp-or-batch-play/4003/2 "2021-12-11T12:27:45Z")

</div>

I’ve found the solution to open Select and Mask Window:

```auto
async function selectandmask() {
  
   await core.executeAsModal(() => {
 
      batchPlay(
          [
         
            {
               _obj: "smartBrushWorkspace",
               presetKind: {
                  _enum: "presetKindType",
                  _value: "presetKindDefault"
               },
               _options: {
                  dialogOptions: "display"
               }
            }
        
           
   ], {});
})
}

```
