[Plugin] Code Runner - Automate Mundane Tasks

Code Runner
Ever gone through the explorer object by object repeating the same action over and over again? This plugin will help you out! I’ve suffered from this time and time again, so I wrote a simple plugin that allows you to save/edit/delete these tasks for repeated use and a more efficient workflow.

Simply put, you write a function that acts on what you selected on the explorer.

Example of setting a model’s name to one of its descendants properties:

Possible Use Cases

  • Batch renaming that requires some conditional statements/logic
  • Batch updating assetids
  • Finding part offsets from a position for welds
  • Finding all assetids for preloading with a given selection

Possible Features

  • Search functionality
  • Temporary code (to avoid creating/deleting right after)
  • Run general functions (not just from the selection of the explorer)
  • Pass parameters in

Despite this being a small project for me, any feedback would greatly appreciated!

ROBLOX Plugin
Source Code

30 Likes

Is this able to, say for example, Disable/Enable scripts?

1 Like

Guessing by the fact that this uses roblox lua i would say yes

2 Likes

Nice module but I do not see how this would be useful. This is something I rarely encounter and when I do I use the command bar. How would this module help us in our development process?

2 Likes

I found it monotonous to keep having to write out for i,v in pairs(game.Selection:Get()) do
so that’s the main reason I created this. There is another use case that I can think of for which is getting part positions relative to a primary part for welds/renderstepped part locking a position.

Totally understandable though!

Update 12/23/19
New Setup(), Teardown() functions that will be called before/after the main function is called on each object!

This is really cool! I really like what you did with running the code, as well. Loading the code into a module script and then requiring the module script is a really smart alternative to loadstring!

Good job!

2 Likes

Thank you! Yeah I really didn’t want people to turn on loadstring just for this plugin :stuck_out_tongue_closed_eyes:

1 Like

Yeah simple but clever, loadstring is the only reason I never made this tool. (And laziness I hate making plugins)

Be gone, for i,v in pairs(game.Selection:Get()[1]:GetDescendants()) !

3 Likes

Update 12/24/19
Made functional with Team Create.

This is incredible. I don’t have any obvious use cases off the top of my head, but I know Photoshop has a similar system with the Macro feature.

Will download soon!

1 Like

You should let us bind a key to a function - that’d be really powerful!

1 Like

Thanks for the suggestion! I will try to implement that sometime in the near feature!

1 Like

Damn I really like the interesting work!

1 Like

Does this support multi-variable/parameter functions? Like with the one you demo’d, since there is only one variable for the function that changes the properties, each instance selected can be substituted into it. Does it work just as well if the function has more than one variable (such as swapping instance names, or renaming an instance to that of another?

At the moment, adding extra arguments to the main function does not do anything. The only argument passed in is the object itself. I plan to add support for custom arguments passed in through the GUI. If you need something similar to a LastObject variable, you can write your own variables.

Hopefully this answers your question.

What a great plugin! I plan to use it w/ ReClass.

1 Like

This plugin is a god-sent.
Does this plugin save scripts across different places/games?