At start-up, HomeSite checks the HKEY_CURRENT_USER\Software\Allaire\HomeSite4\RunOnce
registry key and executes any scripts it finds listed. Studio checks the HKEY_CURRENT_USER\Software\Allaire\Studio\RunOnce
registry key.
If you want to distribute an add-in for either program, you can use this key to run a script that, for example, creates a toolbar for your application the next time the program starts. For example, just add a string entry whose value contains the full path to the script you want executed, like this:
[HKEY_CURRENT_USER\Software\Allaire\HomeSite4\RunOnce] "MyAppScript"="c:\\MyApp\\MyAppScript.bas" Sub Main const TB_NAME = "MyApp" Dim app set app = Application ' delete toolbar if it already exists if app.ToolbarExists(TB_NAME) then app.DeleteToolbar(TB_NAME) end if ' recreate toolbar app.CreateToolbar TB_NAME ' dock it to the bottom app.SetToolbarDockPos TB_NAME, 2 ' add app toolbutton app.AddAppToolbutton TB_NAME, "c:\MyApp\MyApp.exe", "", "Click to run MyApp" ' add tag toolbutton app.AddTagToolbutton TB_NAME, "<div>", "</div>", "DIV Toolbutton", "DV", "" ' add script toolbutton app.AddScriptToolbutton TB_NAME, app.AppPath + "test.bas" , "Script Toolbutton", "SC", "" ' add VTM toolbutton app.AddVTMToolbutton TB_NAME, app.AppPath + "Extensions\TagDefs\HTML\div.vtm" , "VTM Toolbutton", "VT", "" End Sub
After these keys are read, the program deletes the entries so that they won't be executed again.
Scripting support opens up numerous possibilities for third-party developers. For the latest news on third-party add-ins, check the Allaire Developer site.