# Hscript with classes, aka "hscript-ex"

**URL:** https://community.haxe.org/t/hscript-with-classes-aka-hscript-ex/2597
**Category:** Haxe
**Created:** [July 26, 2020, 5:50pm UTC](https://community.haxe.org/t/hscript-with-classes-aka-hscript-ex/2597 "2020-07-26T17:50:03Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![ianharrigan](https://community.haxe.org/user_avatar/community.haxe.org/ianharrigan/32/52_2.png) [@ianharrigan](https://community.haxe.org/u/ianharrigan)
#### Post date: [July 26, 2020, 5:50pm UTC](https://community.haxe.org/t/hscript-with-classes-aka-hscript-ex/2597/1 "2020-07-26T17:50:03Z")

</div>

So in my never ending pursuit to procrastinate, in a looooooong meeting one day, i added classes to hscript 🙂

They arent particularly clever, but they are functional, you can extend from haxe classes (and hscript “classes”), i dont really have a need for this to be honest, but i thought it might be kinda cool to try, especially once i found that hscript already processed modules / classes, so its just a matter of using them.

As i mentioned, i dont really have a specific need for them, and script classes _ **will not** _ feature in haxeui (directly at least) but i thought maybe someone might have some fun with them too, so heres the repo: [GitHub - ianharrigan/hscript-ex](https://github.com/ianharrigan/hscript-ex)

Speaking of fun, in the repo there is a very boring “plugin” system to show how useful hscript classes might be (keep in mind these “plugins” will work on all haxe platforms, not a js module, or a java jar, etc). So with that in mind i decided to see how far i could take this type of plugin system, so created a very straight forward windowing and “application” framework in haxeui (about 1-1.5k LoC), then plugged in some hscript classes to see how it all fared - it worked out far too well!

 ![image](https://community.haxe.org/uploads/default/original/2X/5/54c524fab0acd4d6583e09e85081e04203eac2e5.jpeg)  
 ![image](https://community.haxe.org/uploads/default/original/2X/7/74d2c3a026d98aa4a2ca9026dd8b58c5eefda138.jpeg)  
 ![image](https://community.haxe.org/uploads/default/original/2X/1/145bb25893fbbef0f3741eea4686427a4aa03c26.jpeg)  
 ![image](https://community.haxe.org/uploads/default/original/2X/b/b4406ff5758e96e8f5d8d8af7980a89c9c6e8aa0.jpeg)

So maybe this lib might be useful after all! Regardless, it was fun to develop (the windowing system and the hscript-ex itself) and maybe, just maybe, someone might get some actual use out of it.

Enjoy!  
Ian

---

<div class="post-metadata">

### Author: ![ianharrigan](https://community.haxe.org/user_avatar/community.haxe.org/ianharrigan/32/52_2.png) [@ianharrigan](https://community.haxe.org/u/ianharrigan)
#### Post date: [July 26, 2020, 5:54pm UTC](https://community.haxe.org/t/hscript-with-classes-aka-hscript-ex/2597/2 "2020-07-26T17:54:39Z")

</div>

Forgot to add the obligatory gif of it the script classes in action (its from an older version, styled differently, but the concept is the same):

 ![poc2](https://community.haxe.org/uploads/default/original/2X/f/f13c5f65b83732927059ef3cb762e7462745750b.gif)

---

<div class="post-metadata">

### Author: ![Zhan](https://community.haxe.org/user_avatar/community.haxe.org/zhan/32/468_2.png) [@Zhan](https://community.haxe.org/u/Zhan)
#### Post date: [January 7, 2021, 3:49am UTC](https://community.haxe.org/t/hscript-with-classes-aka-hscript-ex/2597/3 "2021-01-07T03:49:00Z")

</div>

thank you for share this .it’s useful for me!

---

<div class="post-metadata">

### Author: ![Zhan](https://community.haxe.org/user_avatar/community.haxe.org/zhan/32/468_2.png) [@Zhan](https://community.haxe.org/u/Zhan)
#### Post date: [January 7, 2021, 10:27am UTC](https://community.haxe.org/t/hscript-with-classes-aka-hscript-ex/2597/4 "2021-01-07T10:27:30Z")

</div>

It would be better if support static function call ! 😀
