-
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're a third-party developer who wishes
to distribute either program as an add-in, 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
if app.ToolbarExists(TB_NAME) then
app.DeleteToolbar(TB_NAME)
end if
app.CreateToolbar TB_NAME
app.SetToolbarDockPos TB_NAME, 2
app.AddAppToolbutton TB_NAME, "c:\MyApp\MyApp.exe", "", "Click to run MyApp"
app.AddTagToolbutton TB_NAME, "<div>", "</div>", "DIV Toolbutton", "DV", ""
app.AddScriptToolbutton TB_NAME, app.AppPath + "test.bas" , "Script Toolbutton", "SC", ""
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