Posted by member 99 on 2004-05-19 11:41:04 link

Untested, but I think this should do the trick:
*script var P "%"

*script bang !HookModule
; *ModuleHook !HookModule (name) (real hook bang)
; - to load it the first time
; !HookModule (name)
; - to rehook the module later
*script gotoif ("%{\2}" = "") done
*script exec !VarSet i "2"
*script label loop
*script exec !IfEval ("%{P}{\%{i}}" = "") !VarRemove i
*script exec gotoif ("%{i}" = "") done
*script exec !VarSet %{\1}HookCommand "%{P}{%{\1}HookCommand} %{P}{\%{i}}"
*script exec !VarAdd i "1"
*script goto loop
*script label done
*script exec !exec %{P}{%{\1}HookCommand}
*script ~bang