Script library. Does such thing exists?

Hi!

I wan’t to optimize my workflow in Rhino and started to dig from previously created scripts in this forum.

Then I asked my self: how to run these script on startup that it won’t ask to be loaded every single time there is a need for them?

What are your practices dealing storing scripts? Is it convenient to have a folder of all scripts or is there more efficient way to store and run them?

This topic correlates with either Rhino and grasshopper scripting.

Thank you

This post/topic might provide some answers:

The example above demonstrates how to import functions/classes from an external Python file into a GhPython component. However I also import and run functions from that same file by assigning them to Rhino keyboard shortcuts. Here’s a recent example:

The trick here is to be a bit unpythonic and use semicolons to add multiple lines of code into a one line string. That is, the macro on the F7 keyboard shortcut in the screenshot is:

-RunPythonScript (import ahd; ahd.flipBackgroundColor())

There’s a 200 character limit, so one could actually add quite a bit of Python directly within the macro too!

It probably requires additional macro formatting, but I think one might add them here.

If not, and probably advisable in general on the Rhino side, one can make actual commands. And again, things probably look a bit different with the scripting options provided in Rhino 8.