Hello
I’m starting to have a lot of handlers for each application that I automate with Applescript and I have to look for them in my script files and sometimes I don’t know if they are the latest versions.
Is there an application, a tool or a tip to manage and classify handlers so that you can find them when you need them?
Maybe SD8 already does something that makes this manipulation easier?
thank you for your attention
I save frequently used handlers in the Clippings folder. Then they appear in the Clippings Menu or from the inspectors tab.
Here?
/Users/nameUser/Library/Scripts
And how do you call them?
The inspector Tab in SD? Can you tell me more
Well, that’s a different thing and can also work.
The Library Scripts folder is where you would store scripts as Libraries that can be accessed by any script (provided the library script is available at runtime).
In ScriptDebugger Help (from the Help Menu) there is a good definition and explanation of Library Scripts in the Glossary and a link to this page:
But I was referring to the “Clippings” folder.
/Users/user/Library/Application Support/Script Debugger 8/Clippings/
You can store your handlers there, each in a separate text file. Then select them from the Clippings menu, or the inspector tab and the contents of the text file are inserted into your script at the cursor position (or replacing the selection).
There is a default collection of clippings installed with Script Debugger. To try it out you can open a new script and select one from the Clipping menu and see how the UI for them works.
Again, there is extensive documentation of the clippings system in Script Debugger Help.
Also, I would recommend spending some time with Script Debugger help just in general. It’s probably the best use of Apple’s Help system anywhere, and among the best software documentation you’ll find anywhere. It’s very well written and comprehensive in all the features it covers.
As for the “Inspectors” tab, you can reveal it in a script window from the View menu/Instpectors Tab. (The default Toolbar has buttons allowing you to quickly display any of the tabs or hide them).
There are three panes in the Inspectors tab.
The top pane reveals the contents of the Clippings menu and gives you the options to insert or edit a clipping file.
The middle pane shows what scripting dictionaries Script Debugger is aware of, and allows you to search the contents of multiple dictionaries.
Don’t remember exactly what the bottom pane does, I don’t think I found it useful. But I know it’s fully documented in Script Debugger Help as are the other Inspector Tab panes.
Ho yeah
Ha yes I didn’t know about this possibility of being able to add your own files. All you have to do is add your handlers or snippets of code to a .text file and place it in the correct “clipping” folder and it is available.
Thank you very much Ed Stockly for this resource that I hadn’t seen!
Hi Ed Stockly
So I just created a new script which I placed in the SD Script folder to automate it.
This retrieves the handler that I selected with the mouse even if there is a little more text (example: a comment), recognizes the name of the selected handler among those present in the file and it is automatically saved in the clippings folder with the correct name.
I’ll share it for those who are interested :
clip.applescript (1.2 KB)