# Different behavior - Script Compiler YAK vs Script Editor

**URL:** <https://discourse.mcneel.com/t/different-behavior-script-compiler-yak-vs-script-editor/206138>\
**Category:** Grasshopper Developer\
**Tags:** windows\
**Created:** [June 19, 2025, 11:54am UTC](https://discourse.mcneel.com/t/different-behavior-script-compiler-yak-vs-script-editor/206138 "2025-06-19T11:54:32Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![kiteboardshaper](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/kiteboardshaper/32/767533_2.png) [@kiteboardshaper](https://discourse.mcneel.com/u/kiteboardshaper)\
**Post date:** [June 19, 2025, 11:54am UTC](https://discourse.mcneel.com/t/different-behavior-script-compiler-yak-vs-script-editor/206138/1 "2025-06-19T11:54:32Z")

</div>

@eirannejad this is aimed straight for your inbox I believe.

I have today been looking at updating my GH to YAK work flow from the Script Compiler to the Script Editor.

To this end I have compiled the same test GH file with a DKUI user interface.

Attached in a zip file is both versions including the YAK files.

The Script Compiler version operates as I’ve come to expect:

 ![Image 191](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/d/e/9/de9051c8845814c498e41dd91c756e563473626e.png)

The Script Editor version seems to ignore the keep open flag and dies after one run thru of the script:

 ![Image 190](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/e/9/6/e96ae3675ceaae681e245c630a9c5298a447406f.png)

Can we get the Script Editor behavior to match the Script Compiler?

Cheers

DK

[DK Compiler Test.zip](https://discourse.mcneel.com/uploads/short-url/2LSPFfqD5iqTWeVpGmAWOQG31Q7.zip) (161.1 KB)

---

<div class="post-metadata">

**Author:** ![kiteboardshaper](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/kiteboardshaper/32/767533_2.png) [@kiteboardshaper](https://discourse.mcneel.com/u/kiteboardshaper)\
**Post date:** [June 19, 2025, 12:25pm UTC](https://discourse.mcneel.com/t/different-behavior-script-compiler-yak-vs-script-editor/206138/2 "2025-06-19T12:25:30Z")

</div>

There is a slight aside to this to be found on this post:

> [@Close GH Player definition](https://discourse.mcneel.com/t/close-gh-player-definition/159150/21):
>
> 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 ‘22…

THIS behavior is in fact SO MUCH CLOSER to what I would actually like in this process which is to have control over when the GH based command closes.

Cheers

DK

---

<div class="post-metadata">

**Author:** ![Muhammad\_Talha\_Mufte](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/muhammad_talha_mufte/32/500550_2.png) [@Muhammad\_Talha\_Mufte](https://discourse.mcneel.com/u/Muhammad_Talha_Mufte)\
**Post date:** [June 23, 2025, 12:07pm UTC](https://discourse.mcneel.com/t/different-behavior-script-compiler-yak-vs-script-editor/206138/3 "2025-06-23T12:07:23Z")

</div>

Same issue. Seems like Script Editor was designed to work with Hops and Context Inputs/Outputs. So DKUI seems to have issues with Script Editor.

---

<div class="post-metadata">

**Author:** ![kiteboardshaper](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/kiteboardshaper/32/767533_2.png) [@kiteboardshaper](https://discourse.mcneel.com/u/kiteboardshaper)\
**Post date:** [June 23, 2025, 12:55pm UTC](https://discourse.mcneel.com/t/different-behavior-script-compiler-yak-vs-script-editor/206138/4 "2025-06-23T12:55:25Z")

</div>

Check the link @Muhammad_Talha_Mufte I’ve had some interesting developments over the weekend. DKUI is compatible with the Script Editor AND is potentially a nicer setup.

Cheers

DK

---

<div class="post-metadata">

**Author:** ![Muhammad\_Talha\_Mufte](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/muhammad_talha_mufte/32/500550_2.png) [@Muhammad\_Talha\_Mufte](https://discourse.mcneel.com/u/Muhammad_Talha_Mufte)\
**Post date:** [June 23, 2025, 1:31pm UTC](https://discourse.mcneel.com/t/different-behavior-script-compiler-yak-vs-script-editor/206138/5 "2025-06-23T13:31:06Z")

</div>

Yeah it’s a decent workaround will give it a go this week
