# Opening/Closing the Libraries window without using CommandID

**URL:** <https://forums.creativeclouddeveloper.com/t/opening-closing-the-libraries-window-without-using-commandid/5532>\
**Category:** UXP Plugin API\
**Created:** [November 28, 2022, 10:42pm UTC](https://forums.creativeclouddeveloper.com/t/opening-closing-the-libraries-window-without-using-commandid/5532 "2022-11-28T22:42:44Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Karmalakas](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.creativeclouddeveloper.com/karmalakas/32/1048_2.png) [@Karmalakas](https://forums.creativeclouddeveloper.com/u/Karmalakas)\
**Post date:** [November 29, 2022, 9:17am UTC](https://forums.creativeclouddeveloper.com/t/opening-closing-the-libraries-window-without-using-commandid/5532/2 "2022-11-29T09:17:21Z")

</div>

I think you’ll need to find your item in the menu bar by name or ID and then use the command. You can get menu bar tree with a script like in this post:

> [@How to get Photoshop menu item checked status?](http://forums.creativeclouddeveloper.com/t/how-to-get-photoshop-menu-item-checked-status/5319/2):
>
> If you find your menu item in menuBarInfo, you will se a checked param [image] const photoshop = require("photoshop"); const getMenuItem = () =\> { return photoshop.action.batchPlay([{ "\_obj": "get", "\_target": [{"\_property": "menuBarInfo"}, {"\_ref": "application", "\_enum": "ordinal", "\_value": "targetEnum"},], "\_options": {"dialogOptions": "dontDisplay"} }], {synchronousExecution: true})[0]["menuBarInfo"]["submenu"] }…

---

_[View the full topic](https://forums.creativeclouddeveloper.com/t/opening-closing-the-libraries-window-without-using-commandid/5532)._
