I might be confused about your goals, but here's what I'd try:
1. In NCM 7.4, build your script exactly how you'd implement it from the CLI. Do this in Configs > Script Management > Add new script
2. Now go to Configs > Config Managment
3. Use the drop down to show options for how you want to Group devices. For example, you could use "Group by > Machine Type" and then click on Cisco 2911K9 routers.
4. Check the top box to select them all, or just select the ones you want.
5. Click Execute script
6. Select the new script you previously built in step 1
7. Click Execute
I don't see a way to select manually-created custom Groups that you may have built for Dependencies and I think that should be an option. Either I'm missing it, or it's not possible--which would be disappointing.
Swift Packets!
Rick S.