[Class] AEE-simple event emitter

Post your working scripts, libraries and tools for AHK v1.1 and older
jj4156
Posts: 19
Joined: 17 Jun 2019, 07:03
Contact:

[Class] AEE-simple event emitter

Post by jj4156 » 19 Dec 2020, 11:14

A poor coded, barely tested, crude minimal event emitter framework.

Simple Example:

Code: Select all

#Persistent ; Ensure script keeps running until our timmer is fired
#include <AEE>
Hello(words)
{
    Msgbox, % "Hello " words "!"
    ; we need exit script by ourselves, 
    ; when use #Persistent
    ExitApp
}
emitter := new AEEmitter()
emitter.On("say", Func("Hello")) ; register a event
; A msgbox will show with "Hello World!"
emitter.emit("say", "World")     ; fire it
Download and some documents here:
Github

Return to “Scripts and Functions (v1)”