
However… you should first duplicate this file or you will save over the original (and if it is linked to the snippet, you will affect it too). applescript file in the Snippets folder to use it either way) Now instead of inserting code, it opens the file itself. What if you just want to build some core template scripts? In XMenu’s User-Defined menu, you can add a script (or even link to a. applescript format comes in handy as it can be opened and compiled to make sure it will run correctly whereas typing into TextEdit can’t directly.Ģ. Note: I didn’t type any of that but used the snippets to paste directly into this post! This is also where the. Now when I press compile, it’s resolved and ready for more specific coding. the User-Defined menu which opens the files when you select them in the menu).įor example, I have a bit of text in a file with a common routine. Then when you have a new script to write you can choose one of these snippets and the copy will be inserted just like as if you typed it (contrary to e.g.
#Xmenu user defined code
In XMenu’s Snippets menu you can store bits of code in plain-text files (or even in AppleScript’s text format.

To this end we can buy a snippet organizer or we could use XMenu to assist. You end up typing the same thing over and over again. Sometimes writing AppleScripts is monotonous. You can also organize the Snippets folder in the same fashion. Then click on the menubar icon to see the new folder with apps ready to launch all nicely organized in their own folder.

(This creates an alias instead of moving or copying the file.) Repeat this with as many apps as you’d like to include. Then open your Applications folder and drag an application to this window while holding the Command and Option keys at the same time. Create a folder in this window called “Apps”. Now right-click the User-Defined menu in the menubar (it looks like a gear icon) and choose “Open Folder in Finder”. First, make sure you’ve turned on the User-Defined menu in XMenu’s Preferences. This means you can create subfolders within these folders to help organize the menu contents.įor example, say you didn’t want to show the Applications menu (since you’ve installed waaay too many apps like me!) but you wanted to use XMenu for an app launcher. (More to come on that in a future post.You may not really think about it, but under-the-hood of each XMenu icon is a simple Finder folder. You can also organize the ‘Snippets’ folder in the same fashion.

Then open your Applications folder and drag an application to this window while holding the ⌘Command and ⌥Option keys at the same time.

Create a folder in this window called Apps. Now right-click the User-Defined menu in the menubar (it looks like a gear icon) and choose Open Folder in Finder. First, make sure you’ve turned on the User-Defined menu in XMenu’s preferences. You may not really think about it, but under-the-hood of each XMenu icon is a simple Finder folder.
