
Originally Posted by
codyppc
ok, I understand option #1. I like #2 better. the only thing is it is something new for me. I don't have version 1.04 anymore. is there a way to get this .... "InitScript" registry setting for 1.05?
could someone please give quick explanation of how it works as well. sorry for the noob response. billboard is too cool to give up on just because I don't understand. must learn.
thanks scotty and zbob,
cody
The InitScript hook is still in v1.05.
From the main post where I have the cab file...
------------------------------
InitScript (STRING)
This is the fully-qualified pathname of the script that handles the start and
stop action of the plugin. If this is set, the specified script will be invoked
with PARAM=START or PARAM=STOP when the plugin is loaded/unloaded.
This eliminates the need for having a script in \Windows\Startup and allows
the script to properly start/stop itself in tandem with the plugin.
------------------------------
Unfortunately, I created the example before I added this feature. I should update the example to use an InitScript.
If you installed Silencer, it uses an InitScript. See code below:
Code:
ITEM = "Software\Microsoft\Today\Items\Silencer\Item1"
QUOTE = """"
MortScript = SystemPath( "ScriptExe" ) \ "MortScript.exe"
Script = "\Program Files\Silencer\DatePlusSilencer.mscr"
Unsilencer = QUOTE & Script & QUOTE & " PARAM=Unsilence"
ShowDate = QUOTE & Script & QUOTE & " PARAM=ShowDate"
If ( PARAM eq "START" )
RunWait( MortScript, ShowDate )
EndIf
If ( PARAM eq "STOP" )
Silenced = RegRead( "HKLM", ITEM, "Silenced" )
If ( Silenced )
RunWait( MortScript, Unsilencer )
EndIf
RemoveNotifications( MortScript, ShowDate )
RemoveNotifications( MortScript, Unsilencer )
EndIf