The Poltergeist Flyweight
Share the intrinsic spectral essence of thousands of ghostly clicks to conserve your machine's arcane memory.
✧ GANG OF FOUR LINEAGE & ARCANUM ✧
GOF DESIGN PATTERN: Flyweight
ARCANUM SCHOOL: Abjuration // Essence Preservation
SCRIBE / ARCHON: Joshua Edward McLaughlin Cox
CANONICAL REGISTRATION:
// CODEX INCANTATION //
class GhostEssence {
__New(action_type) {
this.action_type := action_type ; e.g., "LeftClick" or "RightClick"
}
Manifest(x, y) {
Click(x, y, this.action_type == "RightClick" ? "Right" : "Left")
}
}
class EssenceFactory {
static essences := Map()
static GetEssence(type) {
if (!EssenceFactory.essences.Has(type)) {
EssenceFactory.essences[type] := GhostEssence(type)
}
return EssenceFactory.essences[type]
}
}
left_click_essence := EssenceFactory.GetEssence("LeftClick")
left_click_essence.Manifest(100, 200)
left_click_essence.Manifest(300, 400)
Runic Tags:
#autohotkey
#flyweight
#automation
#poltergeist