Right clicking in Script Editor

I am posting this more to inform others than ask a question, since I find this to be rather valuable. A search on Wikipedia led me to an AppleScript article that explained if you right click in Script Editor you get a list of options like automatically inserting comments, or tell blocks, or any other snippet of code you might regularly use. Furthermore, you can add and edit scripts in this menu - just go to the “Script Editor Scripts” folder of your “Scripts” Folder in your Library.

I feel extremely silly now for not trying a Right Click in the editor window earlier…

jON bEEBE

I’ll join you in that feeling. I never noticed that feature either, nor did I know that I could add my own handlers. I’ve been copying and pasting.

Yes, this is a very handy feature. Here’s an extremely useful script I wrote for selecting a routine you’ve written and easily adding it as an insertion script in the Script Editor Scripts folder for future use:

Save this as “Save Selection as Script…scpt” in your Script Editor Scripts folder and relaunch SE to access it. You may need to adjust the path to the scripts folder to your user’s script folder if that’s where you store your scripts (I keep them in the main library so I can access them from all users on my machine).

Jon


[This script was automatically tagged for color coded syntax by Convert Script to Markup Code]

That’s very cool! Jonn8!

Is there a way to integrate this in xCode?
You would need to add an extra ScriptSnippets menui tem to the standard xCode contextual menu, right?

Vince

Right after I found this feature I thought about writing a script that does exactly what yours does…Thanks!

jON bEEBE

this is why this bbs is so valuable to us`
keep up this good work gays

thanks JJ