# QuickAdd Plugin

**URL:** <https://forum.obsidian.md/t/quickadd-plugin/20032>\
**Category:** Plugins\
**Tags:** plugin-release\
**Created:** [June 24, 2021, 12:37pm UTC](https://forum.obsidian.md/t/quickadd-plugin/20032 "2021-06-24T12:37:38Z")\
**Posts on this page:** 1\
**Showing post:** 13

<div class="post-metadata">

**Author:** ![Felipe](https://forum.obsidian.md/user_avatar/forum.obsidian.md/felipe/32/13848_2.png) [@Felipe](https://forum.obsidian.md/u/Felipe)\
**Post date:** [July 24, 2021, 7:21pm UTC](https://forum.obsidian.md/t/quickadd-plugin/20032/13 "2021-07-24T19:21:57Z")

</div>

Hello friends!

I have a special MACRO choice to share with you related to the Workspaces Core Plug-in.

If use this plug-in a lot, you know that it doesn’t have in Command Palette the feature to define Hotkeys for Specific Workspaces.

Using QuickAdd and the fantastic [Obsidian Advanced URI](https://github.com/Vinzent03/obsidian-advanced-uri) from our community friend @Vinadon we could achieve this!

## Cenario

Obsidian Advanced URI has a feature that let the user open workspaces with a schema: `obsidian://advanced-uri?vault=<your-vault>&workspace=main`

QuickAdd - MACRO has a feature that let you define a command to a MACRO from a `.js` script

Conclusion: if you create a SCRIPT with the WORKSPACE schema, you could generate a MACRO to open a Workspace from a Hotkey!

## What You Need

- QuickAdd plug-in;
- Obsidian Advanced URI plug-in;
- A script file in .JS;

## Script

This is the model:  
`module.exports = params => window.open("obsidian://advanced-uri?vault=<your_vault>&workspace=<yourworkspace>");`

**→ How to create the Script**

1. Open a Text Editor and Paste the model above
2. Substitute `<your_vault` with your vaults name. My vault name is MARIA
3. Substitute `<yourworkspace>` with the name of your workspace. My workspace is Home

In my case I would have something like this:  
`module.exports = params => window.open("obsidian://advanced-uri?vault=MARIA&workspace=Home");`

1. Save this text file as `.js`
2. Paste this file at your vaults folder (any place you want)

This is my file:

 ![Screen Shot 2021-07-24 at 16.16.27](https://forum.obsidian.md/uploads/default/original/3X/3/9/39dba9da8731bb7ea7709e3babb81ccbf1f6a14b.png)

## Creating a MACRO with USER SCRIPT

When creating a MACRO, use the field `User Scripts` to select your .js file

 ![Screen Shot 2021-07-24 at 16.08.24](https://forum.obsidian.md/uploads/default/original/3X/3/a/3a401b86fefa153606f78c1dece438c8b230823e.png)  
 ![Screen Shot 2021-07-24 at 16.09.20](https://forum.obsidian.md/uploads/default/original/3X/e/c/ec6def263b518ef5f39aa457f8b357568970c8e9.png)  
… from this point you follow the ordinary steps to create an item in QuickAdd.

* * *

I hope you enjoy this feature as much as I do.

I wanna thanks to @Christian for helping with this feature. @Christian gave me the script and guidance to create this.

My thanks to @Vinadon for build this fantastic Obsidian Advanced URI and other plug-ins (Hotkeys for Templates, Specific Files ans Starred Files) that I use everyday!

If you like this, you should say thanks to @Christian and @Vinadon , not me 🙂

Have a great day friends!

---

_[View the full topic](https://forum.obsidian.md/t/quickadd-plugin/20032)._
