[AHK v2] Evaluate Function
Posted: 30 Oct 2018, 04:26
Hi, here's something I have been toying with. It can evaluate functions/methods and can access/define global variables/arrays/objects. It can only access array/objects through a[1][2][3]... form (does not support a.b.c.d form or a[1,2,3...] form). It does not recognize operators, so everything needs to be wrapped in a function. The ones I wrote can be found inside class f (f.add, f.mul, f.div ...). I have also written some basic Boolean logic functions (AND, OR) and they support short-circuiting (f.and, f.or). There is also a simple if/else function (f._if). If everything is working properly you should be able to nest functions/arrays inside each other.
I originally built this with the intention of using this over WM_COPYDATA so I can remote control my scripts and not have to write extra wrapper functions.
edit1: Having trouble with indentation. GitHub: https://github.com/oif2003/AHK_v2_64bit ... r/eval.ahk
edit2: Added support for nested variadic functions. ie: f( g( h( param* )* )* )
I originally built this with the intention of using this over WM_COPYDATA so I can remote control my scripts and not have to write extra wrapper functions.
edit1: Having trouble with indentation. GitHub: https://github.com/oif2003/AHK_v2_64bit ... r/eval.ahk
edit2: Added support for nested variadic functions. ie: f( g( h( param* )* )* )