Rehooking modules Thread last updated on 2004-05-21 11:30:13

Posted by member 12025 on 2004-05-19 07:20:28

Is there any way to reload a module, even xLabel itself, and get it to hook back into a xLabel without a recycle? Currently that's one of the annoying things I'm dealing with, tinkering, and between xLabel and many popups, recycling isn't so speedy.

Posted by member 37809 on 2004-05-19 07:36:57 link

Does anyone know if what the module Kidnap does is the same as hooking? (it's able to capture and release windows)

Posted by member 45783 on 2004-05-19 08:08:18 link

Currently I don't understand why themes have to be made so that they have to be recycled often and/or during normal usage.

Enlighten me.

Posted by member 12798 on 2004-05-19 08:10:59 link

Smurth said you can "hook around" at runtime in here: http://www.litestep.net/index.php?section=4&action=view&catId=3&id=2002&hl=skinbox
however, he didn't go into details.

Posted by member 12025 on 2004-05-19 08:30:16 link

He went into as much detail as Rabidcow did in another thread...both ones I made, oddly enough.
If it could be scripted, I'd love to do it. !Reload and !NetReLoadModule get anything that isn't hooked done, but right now that's all of...Popup2 :/.

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

Posted by member 159957 on 2004-05-21 10:49:43 link

about the recycle time, try to load the xlabel version equivalent to xlabellight 1.1, if youre on 2.8 or 2.9 youll solve your recycle time problem.

Posted by member 12025 on 2004-05-21 11:30:13 link

Even with a different xLabel, it still takes awhile. Popup is just not speedy at loading when you have several popups.
...and Popup is the one module that doesn't need any hooking, and does just fine with a simple !reload and !netreloadmodule.

Ideally, being able to destroy the label, reload the module, and then recreate the label should do it. It works for LsBox usually. The trouble there being that !LabelCreate doesn't work.