Using groups to organize and call code snippets

General Macro Scheduler discussion

Moderators: Dorian (MJT support), JRL

Post Reply
Warren
Pro Scripter
Posts: 83
Joined: Sun Oct 08, 2017 11:57 pm

Using groups to organize and call code snippets

Post by Warren » Mon Oct 09, 2017 4:29 am

I've dug up a dozen or so sources each giving a bit of info on how to use groups, but I'm finding it confusing and counterintuitive so far.

I'm basically looking to break a very large script up into small pieces and assemble those pieces like legos. I want to do the usual things of having a single file for global variables and such, and defining functions once so I can call them many times, etc.

Ultimately, I'm going to have some rather deeply nested conditionals, so it's very important that I keep everything tidy.

I've got the basics as far as includes go, but am tripping over myself as far as the proper use of the groups as it relates to the hierarchy of the composite script.

The stuff I've looked up thus far has been a bit confusing, so does anyone have a particular tutorial, video, or other resource that shows exactly how to match the use of groups to facilitate the breaking up of a script into composite parts?

Or... is there something else I'm missing that would be a better way to organize all these snippets?

User avatar
JRL
Automation Wizard
Posts: 3500
Joined: Mon Jan 10, 2005 6:22 pm
Location: Iowa

Re: Using groups to organize and call code snippets

Post by JRL » Mon Oct 09, 2017 1:32 pm

Use groups to create a "document manager" tree structure for your files in the Macro Scheduler main menu. I believe there is a way to associate groups with sub folders within your Macro Scheduler script folder as well. I do not do that. All of my files are is the default script folder and the group names give me a way to access them logically from the main menu. I also try to name the files logically. For example I have an include folder that contains scripts named:

Draw Arc
Draw Ellipse
Draw Line
etc.

Post Reply
cron
Sign up to our newsletter for free automation tips, tricks & discounts