280
Chapter 14 Scripting the Visual Tools Object Model
Third-Party Add-Ins
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.
Running a script at startup
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.
Sample startup script
//*************************************************//
// 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", ""
Содержание ColdFusion Server 5
Страница 18: ...xviii About This Book...
Страница 26: ...8 Chapter 1 Setting Up the Product...
Страница 42: ...24 Chapter 2 Configuring Browsers and Servers...
Страница 60: ...42 Chapter 3 Exploring the Workspace...
Страница 100: ...82 Chapter 6 Editing Pages...
Страница 126: ...108 Chapter 7 Using Web Development Languages...
Страница 212: ...194 Chapter 13 Customizing the Development Environment...
Страница 320: ...302 Glossary...