Close GH Player definition

Hi All,

I’ve had a interesting success today with this ongoing problem of being able to close a GH script running as a Rhino command:

What I have done is compile the script using the Script Editor (I normally use the CLI Script Compiler). This has different behavior than the Script Compiler in that it has to have a context aware input parameter on the GH canvas to ‘stay alive’.

I ended up putting some logic around my DKUI controls that used a context number input that needed exactly ‘222’ as an input. Anything else would ask for a re-input. 222 however triggers a close of the DKUI, a close of the complete GH and using the context print a ‘close screen’.

This not perfect but its a LONG way towards the behavior I would like to have with these ‘headless’ GH built commands.

Source code attached - needs DKUI (available on the package manager)

Cheers

DK

DK Compiler Test3.zip (113.5 KB)

2 Likes