# How to trigger Window \> Arrange options?

**URL:** <https://forums.creativeclouddeveloper.com/t/how-to-trigger-window-arrange-options/6677>\
**Category:** Photoshop\
**Created:** [August 13, 2023, 1:40pm UTC](https://forums.creativeclouddeveloper.com/t/how-to-trigger-window-arrange-options/6677 "2023-08-13T13:40:13Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![samandmaxphoto](https://avatars.discourse-cdn.com/v4/letter/s/919ad9/32.png) [@samandmaxphoto](https://forums.creativeclouddeveloper.com/u/samandmaxphoto)\
**Post date:** [August 13, 2023, 1:40pm UTC](https://forums.creativeclouddeveloper.com/t/how-to-trigger-window-arrange-options/6677/1 "2023-08-13T13:40:13Z")

</div>

Hey everyone!

I’m playing with my first PS plugin and I wanted to use some of the Windows \> Arrange options (specifically “New Window from” and then “2-tile vertically”), but I can’t find a way to do so.

I thought I could use core.performMenuCommand, but I can’t figure out what commandID matches those menu options. Is there a list of all commandIDs somewhere?

On a more general note, I can’t find any API to manipulate windows and workspace elements (position and size), is this out of scope of PS plugins?

Cheers,  
Max

---

<div class="post-metadata">

**Author:** ![Swap2525](https://avatars.discourse-cdn.com/v4/letter/s/aeb1de/32.png) [@Swap2525](https://forums.creativeclouddeveloper.com/u/Swap2525)\
**Post date:** [August 14, 2023, 4:03am UTC](https://forums.creativeclouddeveloper.com/t/how-to-trigger-window-arrange-options/6677/2 "2023-08-14T04:03:20Z")

</div>

You can do this with Batchplay and menuItemClass.  
(_There is no option 2 Tile Vertically (At least on my system), so this ex demonstrates 2 Up Vertical._)  
Check the below code:

```auto
const {executeAsModal} = require("photoshop").core;
const {batchPlay} = require("photoshop").action;

async function actionCommands2UpVertical() {
   const result = await batchPlay(
      [
         {
            _obj: "select",
            _target: [
               {
                  _ref: "menuItemClass",
                  _enum: "menuItemType",
                  _value: "2upVertical"
               }
            ],
            _options: {
               dialogOptions: "dontDisplay"
            }
         }
      ],
      {}
   );
}

export default async function runModalFunctionResetView() {
   await executeAsModal(actionCommands2UpVertical, {"commandName": "Action Commands"});
}

```

You can replace any menuIem/command by converting menu item name into camelCase like 2 Up Vertical converted to 2upVertical. ( **Note - I have not tried every menuItem/Command** )
