The Ghostly Visitor
Send an arcane inspector through your legion of automation windows, extracting metrics or altering states without touching their original code.
✧ GANG OF FOUR LINEAGE & ARCANUM ✧
GOF DESIGN PATTERN: Visitor
ARCANUM SCHOOL: Divination // Spectral Inspection
SCRIBE / ARCHON: Joshua Edward McLaughlin Cox
CANONICAL REGISTRATION:
// CODEX INCANTATION //
class WindowElement {
Accept(visitor) {
throw Error("Not implemented")
}
}
class NotepadElement extends WindowElement {
Accept(visitor) {
visitor.VisitNotepad(this)
}
}
class CalcElement extends WindowElement {
Accept(visitor) {
visitor.VisitCalc(this)
}
}
class PoltergeistVisitor {
VisitNotepad(element) {
ToolTip("Ghost writes in Notepad!")
Sleep(500)
ToolTip()
}
VisitCalc(element) {
ToolTip("Ghost calculates doom in Calc!")
Sleep(500)
ToolTip()
}
}
elements := [NotepadElement(), CalcElement()]
inspector := PoltergeistVisitor()
for index, el in elements {
el.Accept(inspector)
}
Runic Tags:
#autohotkey
#visitor
#automation
#poltergeist