✨ ARCANUM RUNE DIFFICULTY: Adept Structural

The Ethereal Bridge

Decouple the spirit's behavior from its target window, allowing Poltergeists to haunt different applications independently.

✧ GANG OF FOUR LINEAGE & ARCANUM ✧
GOF DESIGN PATTERN: Bridge
ARCANUM SCHOOL: Transmutation // Ethereal Links
SCRIBE / ARCHON: Joshua Edward McLaughlin Cox
CANONICAL REGISTRATION:
// CODEX INCANTATION //
class TargetApplication {
    Activate() {
        throw Error("Not implemented")
    }
}

class NotepadTarget extends TargetApplication {
    Activate() {
        WinActivate("ahk_exe notepad.exe")
    }
}

class BrowserTarget extends TargetApplication {
    Activate() {
        WinActivate("ahk_exe chrome.exe")
    }
}

class PoltergeistBehavior {
    __New(target) {
        this.target := target
    }
    PerformHaunting() {
        this.target.Activate()
        Sleep(200)
        Send("Woooooo!")
    }
}

notepad_spirit := PoltergeistBehavior(NotepadTarget())
notepad_spirit.PerformHaunting()
Runic Tags: #autohotkey #bridge #automation #poltergeist