I am creating a toolbar button that with a simple macro launches Grasshopper Player so I can select a particular script to run. That works fine but what I really would need to do is to get the Player to automatically find that script and run it (so the user doesn’t have to look for it manually). Seems like a pretty obvious thing but what would be the best way to do this?
You can use this macro -_GrasshopperPlayer “C:\Users…file.gh”
Alternativelly you can also use Rhino scrip compiler to create a plugin with commands for those scrips.
Thank you Mats. I have tried the first option (macro) but it doesn’t work. It launches the grasshopper player but then ask to select the grasshopper script manually. (Frustrating because in theory it should work).
I’ll try the Rhino Script compiler but I was trying to keep things simple…
When I try this it seems like Rhino starts looking for the .gh file in the wrong folder because I have folder names containing a blank space. Example: C:\Folder name\filename.gh. That blank space between the words folder and name in the path is giving me issues.
Your path is fully wrapped in quotes such as "my path" ?
Try 'my path' with the single quotes.
If neither of those work you can always just do the macro as a simple python script calling the same functionality but then using string literal to ensure the space and / don’t cause enter or escape to trigger.
Try the first two suggestions first please and let me know if that doesn’t work still.