Scripting support offers many possibilities for third-party developers. For the latest news on third-party add-ins, visit the VTOM Scripts section of the Macromedia Developer Exchange at http://www.macromedia.com/go/fp_cfstudio_exchange.
If you want to distribute an add-in, you can register it to run the script.
At start-up, the program executes any scripts it finds listed in these Windows Registry keys:
HKEY_CURRENT_USER\Software\Macromedia\HomeSite5\RunOnce
HKEY_CURRENT_USER\Software\Macromedia\Studio5\RunOnce
HKEY_CURRENT_USER\Software\Macromedia\JRStudio4\RunOnce
After these keys are read, the program deletes the entries so that they do not execute again.
//*************************************************//
// This script adds a toolbar for an application. // Add a string entry whose value contains the // full path to the script you want to run //*************************************************// "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