MACROMEDIA HOMESITE Using Manual

For windows 98, windows me, windows nt 4.0, windows 2000, and windows xp
Table of Contents

Advertisement

Quick Links

Using HomeSite+ for
Dreamweaver MX
HomeSite+ for Dreamweaver MX
for Windows 98, Windows ME,
Windows NT 4.0, Windows 2000,
and Windows XP
Macromedia® Incorporated

Advertisement

Table of Contents
loading

Summary of Contents for MACROMEDIA HOMESITE

  • Page 1 Using HomeSite+ for Dreamweaver MX HomeSite+ for Dreamweaver MX for Windows 98, Windows ME, Windows NT 4.0, Windows 2000, and Windows XP Macromedia® Incorporated...
  • Page 2 Copyright Notice Copyright 2002 Macromedia, Inc. All rights reserved. Macromedia, the Macromedia logo, ColdFusion, Dreamweaver, Flash, HomeSite, JRun, Quick Tag Editor, Roundtrip, and what the web can be are trademarks or registered trademarks of Macromedia, Inc. which may be registered in the United States and internationally.
  • Page 3: Table Of Contents

    Contents About This Book ....... xiii Intended audience ........... . . xiv Developer resources .
  • Page 4 Contents Managing servers ..........19 About server mappings .
  • Page 5 ..........63 Sharing snippets between Dreamweaver MX and HomeSite+ .
  • Page 6 Contents Creating and editing an event handler script block ....79 Formatting pages with Cascading Style Sheets......80 About Cascading Style Sheets (CSS) .
  • Page 7 ......148 Using source control in HomeSite+ for Dreamweaver MX ... . 150 Displaying the Source Control toolbar .
  • Page 8 viii Contents Running the Debugger ......... . . 156 About the Debug window .
  • Page 9 Contents About Visual Tools Markup Language (VTML) ......198 Using Tag Chooser ........... . 199 Exploring the new VTML structure .
  • Page 10 Contents Wizard definition page library ......... . 220 Examples .
  • Page 11 Contents Table of CommandID values ......... . . 310 Table of SettingID values .
  • Page 12 Contents...
  • Page 13 About This Book Using HomeSite+ for Dreamweaver MX is designed to familiarize you with the product’s user interface and the productivity tools that you can use to quickly develop high-quality applications and web content. Contents • Intended audience ....................xiv •...
  • Page 14: About This Book

    Macromedia Corporation is committed to setting the standard for customer support in developer education, technical support, and professional services. Therefore, the Macromedia web site provides a wealth of online resources. This section also describes other resources available for HomeSite+ for Dreamweaver MX developers. Macromedia website...
  • Page 15: Coldfusion Web Resources

    Developer resources Resource Description Professional education Information about developer certification www.macromedia.com/support/ and the classes, on-site training, and online training/ courses offered by Macromedia Macromedia alliances Connection with the growing network of www.macromedia.com/partners/ solution providers, application developers, resellers, and hosting services that create solutions with Macromedia products ColdFusion web resources Following are just a few of the many sites dedicated to ColdFusion Markup Language...
  • Page 16: About The Documentation

    Help menu. The rest of this section describes the conventions used in the documentation and the contents of the HomeSite+ for Dreamweaver MX documentation set. Documentation conventions When reading the documentation, note formatting cues, as described in the...
  • Page 17: Printing Online Documentation

    You can print one Help topic at a time in the HTML Help, or print as many pages of the Help as you need from the Adobe Acrobat (PDF) format of the Help. To print a single Help topic in the HTML Help: Display the Help topic that you want to print.
  • Page 18: Getting Answers

    The forum is a great resource for learning HomeSite+ for Dreamweaver MX, and it is also a great place to see the HomeSite+ for Dreamweaver MX developer community in action.
  • Page 19: Copyright Information

    Copyright information Copyright information Portions of the software are copyrighted as follows: Copyright © 2001, Macromedia Inc. All rights reserved. Copyright © 1987-2000 by Francois Piette, Rue de Grady 24, 4053 Embourg, Belgium. Copyright © 1998-2000 World Wide Web Consortium (Massachusetts Institute of Technology, Institut National de Recherche en Informatique et en Automatique, Keio University) ARR.
  • Page 20 About This Book...
  • Page 21: Chapter 1 Setting Up The Product

    Chapter 1 Setting Up the Product This chapter describes how to install or upgrade HomeSite+ for Dreamweaver MX and how to initially configure it. Contents • System requirements ....................2 • Installing or upgrading ....................2 • Completing the setup ....................3 •...
  • Page 22: System Requirements

    Dreamweaver MX. The installation also installs TopStyle 2.1 Lite, its integrated style sheet editor, unless your computer already has TopStyle version 2.1 or 2.5 installed. Do not install an earlier version of HomeSite+ for Dreamweaver MX over a later version; however, later versions are backward-compatible with earlier versions. If...
  • Page 23: Completing The Setup

    This section explains how to initially set up HomeSite+ for Dreamweaver MX if you have installed it for the first time, and how to set up HomeSite+ for Dreamweaver MX based on the options that were set in a previous version. The Initial Configuration Wizard (ICW) guides you through both of these processes.
  • Page 24: Using The Initial Configuration Wizard

    This section explains how to complete the ICW after a first-time installation on a computer, and after an upgrade. The ICW automatically starts when you run HomeSite+ for Dreamweaver MX for the first time. To complete the ICW after a first-time installation: In the initial Welcome dialog box of the Wizard, click Next.
  • Page 25 HomeSite+ for Dreamweaver MX documents. In the Perform Upgrade dialog box, confirm your selections (you can click Back and make changes if necessary), and then click Finish. The initial configuration is complete and you can start using HomeSite+ for Dreamweaver MX.
  • Page 26: Monitoring System Resources

    Resource Level Monitor. About the Resource Level Monitor The Resource Level Monitor runs in the background when you start HomeSite+ for Dreamweaver MX and warns you when resources reach a critical level, enabling them to save documents and close the application before a crash occurs.
  • Page 27: Using The Resource Level Monitor

    Monitoring system resources Using the Resource Level Monitor This section explains how to respond to warnings and how to configure the monitor. Responding to warnings A warning dialog box appears if your available Windows Graphics Device (GDI) or user resources drop below your default warning thresholds. For example, it appears if your default warning threshold for GDI resources is 15% and your available GDI resources drop to 14%.
  • Page 28 Chapter 1 Setting Up the Product...
  • Page 29: Chapter 2 Configuring Browsers And Servers

    Chapter 2 Configuring Browsers and Servers This chapter contains instructions for setting up browsers and servers. Contents • Configuring the internal browser................10 • Configuring an external browser ................12 • Working with files on remote servers ..............14...
  • Page 30: Configuring The Internal Browser

    You can use the internal browser to browse documents and application pages from within HomeSite+ for Dreamweaver MX. With a server mapping, you can also preview server-side processes in your page; for example, server-side includes, results from submitting a form to a CGI program, and the results of server-side code.
  • Page 31 Configuring the internal browser Add the Mozilla bin directory to your environment variable. Reboot if PATH necessary. If you are using Windows 95/98, you may have to specify the short name version of the path; for example, c:\mozil~1\bin. If your Mozilla bin directory does not have component.reg, or it is small ( < 5k), then delete it and run mozilla.exe.
  • Page 32: Configuring An External Browser

    Click OK. The External Browsers dialog box displays the new browser configuration. Click OK. HomeSite+ for Dreamweaver MX saves your changes. To edit a browser in the list: Select Options > Configure External Browsers. In the External Browsers dialog box, select a browser and click Edit.
  • Page 33 In the External Browsers dialog box, select a browser and click Delete. Click Yes to confirm. Click OK. HomeSite+ for Dreamweaver MX saves your changes. To change the default browser: Select Options > Configure External Browsers. In the External Browsers dialog box, select the appropriate browser, and click the up arrow until it is the first item in the list.
  • Page 34: Working With Files On Remote Servers

    HomeSite+ for Dreamweaver MX and in Windows Explorer, as the following describes: • In HomeSite+ for Dreamweaver MX Display a Files resource tab and, in the top pane, select My Computer from the drop-down list.
  • Page 35: Connecting To A Server

    Click Switch, then click Close. Connecting to a server HomeSite+ for Dreamweaver MX provides FTP server access, and secure HTTP access through Remote Development Services (RDS). RDS lets you communicate using HTTP with ColdFusion on your local computer and on any configured remote host.
  • Page 36 Chapter 2 Configuring Browsers and Servers To connect to an FTP server: On the Files resource tab, in the top pane, select Macromedia FTP & RDS from the drop-down list. • If you see Allaire FTP & RDS in the list, you can select this instead. For more information, see “Using the SNE node”...
  • Page 37 Enabling secure FTP You can transfer data using Secure Sockets Layer (SSL) to servers that support 40-bit encryption and decryption. HomeSite+ for Dreamweaver MX installs this FTP technology, from Ipswitch, as well as a default certificate and key. Note For this release, you cannot successfully transfer Unicode and Unicode Big Endian files through FTP using SSL.
  • Page 38 Chapter 2 Configuring Browsers and Servers Click Configure SSL and enter the appropriate certificate information. For more information, click Help. Click OK. The following table summarizes the error messages that you could receive: Error message Cause Unable to connect to the FTP SSL has not been enabled in the Configure server.Success FTP Server dialog box, and you attempted...
  • Page 39: Managing Servers

    Windows Explorer. Managing ColdFusion security for RDS The ColdFusion installation configures basic security for the server and, by default, requires a password for the ColdFusion Administrator and for HomeSite+ for Dreamweaver MX. To change the default security settings: Open ColdFusion Administrator.
  • Page 40: About Server Mappings

    To add a server mapping, see “Adding a server mapping” on page 23. Mapping for page processing By default, when you browse a page in the internal or external browser, HomeSite+ for Dreamweaver MX opens the page from the local file system, or returns it using FTP from a remote server.
  • Page 41 Note An error occurs if you try to browse a file when the HomeSite+ Path set in an RDS mapping does not match the path of the active file. For example, you cannot browse a file opened from a mapped drive unless that drive path matches the mapping path.
  • Page 42 Chapter 2 Configuring Browsers and Servers To resolve the URL paths, you must create a mapping for the App1 directory, as in the following table: ColdFusion Server and HomeSite+ for Dreamweaver MX on same computer HomeSite+ path C:\webprojects\App1\ ColdFusion Server path...
  • Page 43: Adding A Server Mapping

    C:\webprojects\App1\ Browser/URL path http://215.180.21.1/App1/ Adding a server mapping This section provides instructions for adding a server mapping in HomeSite+ for Dreamweaver MX, and how to set a default mapping. For more information on setting up server mappings, see the following articles on the Macromedia website: •...
  • Page 44 ColdFusion Server Path Path for the ColdFusion Server to access the same directory • Browser Path Path for the internal browser to access the same directory For page browsing on localhost, only HomeSite+ Path and Browser Path are required. Click Add, then click OK. Click Apply.
  • Page 45: Chapter 3 Exploring The Workspace

    Chapter 3 Exploring the Workspace This chapter acquaints you with the main areas of the user interface. It also guides you in customizing the workspace to make your development work as productive as possible. Contents • The workspace areas ....................26 •...
  • Page 46: The Workspace Areas

    Chapter 3 Exploring the Workspace The workspace areas The term workspace describes the user interface that you see when you first load the program. The workspace has four principal areas: • Command area At the top of the workspace is the title bar, which displays the file path of the current document.
  • Page 47: Setting Options

    The workspace areas Setting options The Settings dialog box lets you configure many HomeSite+ for Dreamweaver MX options to fit your work style, and you can easily change settings for different tasks. To set options: Select Options > Settings (F8) to open the dialog box.
  • Page 48: Working In The Resources Window

    The two Files tabs, labeled Files 1 and Files 2, facilitate working with files in multiple locations, including directories, drives, and remote systems. For information about how HomeSite+ for Dreamweaver MX determines the current directory with two Files tabs, see “About the Files tabs”...
  • Page 49: Creating And Browsing Files In The Document Window

    Creating and browsing files in the Document window Creating and browsing files in the Document window You work primarily in the Document window as you develop code and content. The three tabs at the top of the give you access to the following activities: •...
  • Page 50: Tracking Your Work In The Results Window

    Chapter 3 Exploring the Workspace Note You can cycle through all of the pages that have been opened in the Help tab during the current session. To do this, click in a page and then hold down the Alt key while pressing the left or right arrow key.
  • Page 51: Customizing The Workspace

    If you are interested in configuring the workspace to more readily support the way you work, you can start by viewing a list of the functions that are available in HomeSite+ for Dreamweaver MX, to see if you are using the program to its full potential.
  • Page 52: Customizing Toolbars

    Chapter 3 Exploring the Workspace The tab on the top of the list appears on the far left side of the QuickBar. Click Close. To hide or show a toolbar: Select Options > Customize. In the Customize dialog box, in the Visible Toolbars box, clear the check box next to every toolbar that you want to hide, and select the check box next to every toolbar that you want to show.
  • Page 53 Customizing the workspace The toolbutton is added to the toolbar in the workspace. To add a custom toolbutton to a toolbar: Select Options > Customize. In the Customize dialog box, in the Visible Toolbars box, select a toolbar. Click Add Custom Button. In the Custom Toolbutton dialog box, specify what you want the custom toolbutton to do, as described in the following table: For the custom...
  • Page 54 Chapter 3 Exploring the Workspace In the picture of the toolbar, drag each toolbutton that you want to move to its new position. Click Close. To remove a toolbutton: Select Options > Customize. In the Customize dialog box, in the Visible Toolbars box, select a toolbar. In the picture of the toolbar, drag the toolbutton that you want to remove to a position outside of the toolbar.
  • Page 55: Getting The Most From The Online Help System

    Getting the most from the online Help system Getting the most from the online Help system The online Help system provides you with several types of information: • Pop-up Help for basic tag syntax (press F2) • Comprehensive context-sensitive tag Help (press F1) •...
  • Page 56: Bookmarking Help

    Chapter 3 Exploring the Workspace Bookmarking Help You can quickly access your favorite Help documents by bookmarking them. You can assign bookmarks to documents in the Help, file system, or the Internet. To bookmark a document in the Help Tree: •...
  • Page 57 Getting the most from the online Help system Using an online index With the exception of language references, each book in the Help has an online index. To search a book using an index: Decide on the term or terms that you want to find in the index. Do one of the following: •...
  • Page 58: Extending The Help System

    Chapter 3 Exploring the Workspace Click Search. The search results appear in the Help pane. To open a document from the results list, double-click it. The results list is saved until a new search is run. To return to the search results: •...
  • Page 59 In Windows Explorer, open the Help root directory, make a backup copy of the booktree.xml file, and copy the new folder into the Help root directory. In HomeSite+ for Dreamweaver MX, open the new Help folder. In the file list, double-click the booktree.xml file.
  • Page 60: Adding Media Content

    Chapter 3 Exploring the Workspace The new folder appears in the order that you set, but the files in the folder appear in alphabetical order. If you want to control the order of chapters and pages, add tags in the booktree file for these entries, and rearrange them. Displaying text files in the Help tree You can add text files to the Help tree.
  • Page 61: Chapter 4 Managing Files

    Chapter 4 Managing Files This chapter describes how to perform file management tasks such as opening, closing, saving, and automatically backing up files. This chapter also describes how to work with Unicode and DBCS (Double-Byte Character Set) files. The tasks described in this chapter do not replace the need for creating a project to organize the files in a website or web application.
  • Page 62: About The Files Tabs

    • Both Files tabs share the same Favorite Folders settings. • If both File tabs point to the same location, HomeSite+ for Dreamweaver MX refreshes both tabs to display changes to files and folders in that location.
  • Page 63: About File Encoding

    About file encoding Several operations—such as opening and saving files, backing up before replacing text in files, displaying thumbnails for the images in a folder, browsing to files in tag editors, and creating an image map—refer to the current directory. The Files tabs use the following rules to determine which directory is the current directory: •...
  • Page 64: Working With Files

    You can use the following procedures to work with files, regardless of their location (local drive, network drive, or remote server). Opening and saving files refer to the current directory. For information about how HomeSite+ for Dreamweaver MX determines the current directory with two Files tabs, see “About the Files tabs” on page...
  • Page 65: Adding A Link To An Open File

    Working with files If you attempt to open a Unicode file without having selected the Enable non-ANSI file encoding option, the encoding format of the file cannot be detected or handled properly. The file is loaded as an ANSI string of the same type specified in your system language settings.
  • Page 66: Backing Up Files

    Search > Extended Replace dialog box. How Auto-Backup works Following are the steps that HomeSite+ for Dreamweaver MX takes to back up files: During installation, HomeSite+ for Dreamweaver MX creates a default Auto-Backup folder under the product root directory, and creates a control filenamed Auto-Backup.ini to track the files in the Auto-Backup folder.
  • Page 67 Note that the backup directory is always used for remote files. − Set a time interval (in days) after which backup files are deleted. For Timed Auto-Backup, set a time interval (in minutes) after which HomeSite+ for Dreamweaver MX saves all open modified files.
  • Page 68: Changing The File List Display

    Chapter 4 Managing Files Otherwise, select Options > Auto-Backup File Maintenance and, in the Auto-Backup File Maintenance dialog box, check the files that you must recover and select File > Open Selected Files for Edit. The files open in the Editor. Changing the file list display You can arrange the file list to display exactly what you want.
  • Page 69: Downloading A Web Page

    Working with files To view a favorite folder: On a Files tab, right-click in the file list and select Favorite Folders. From the Favorite Folders submenu, select the folder. The folder opens in the directory tree and its files appear in the file list. To organize your favorite folders: On a Files tab, right-click in the file list and select Favorite Folders >...
  • Page 70 Chapter 4 Managing Files...
  • Page 71: Chapter 5 Writing Code And Web Content

    Chapter 5 Writing Code and Web Content HomeSite+ for Dreamweaver MX manages many different web development tasks, from writing basic HTML pages to designing, testing, and deploying complex, dynamic sites. This chapter describes basic techniques for creating web content and application code.
  • Page 72: Inserting Code

    Chapter 5 Writing Code and Web Content Inserting code HomeSite+ for Dreamweaver MX coding tools support a range of writing styles, from typing to point-and-click, and you can set the level of support you want: for repetitive tasks, you can use its productivity tools to enter repeated code blocks and required text;...
  • Page 73: Selecting A Tag From Tag Chooser

    Inserting code To do this Do this Add custom Click Add Custom Button. Custom Toolbutton dialog box toolbutton displays. Select an action; complete entries for action; click OK. Add separator In Customize dialog box, Visible Toolbars list, click a toolbar. Click Add Separator.
  • Page 74: Completing A Tag With A Tag Editor

    Chapter 5 Writing Code and Web Content Completing a tag with a tag editor You can use a tag editor to add a lot of content within an existing tag, for example in tag. body To complete the details for a tag: In the Editor, position the cursor in the tag to complete.
  • Page 75: Using Inline Tools To Enter Code

    Using inline tools to enter code Using inline tools to enter code You have a number of tools to help you insert new code and to edit existing code as you type. Each of these tools supports a distinct language element, such as tags, objects, and functions.
  • Page 76: Using Function Insight

    Chapter 5 Writing Code and Web Content Press the Esc key to close a drop-down list. • To change an attribute — Delete the attribute and add a new attribute. • To add a value — Press the spacebar after the attribute to display a drop-down list of known values for the attribute.
  • Page 77: Using Auto Completion

    Using inline tools to enter code Using Auto Completion Auto Completion completes a code block by inserting the appropriate code when you enter the opening code fragment (trigger string). You can set options for this feature in the Options > Settings > Editor > Auto Completion pane.
  • Page 78: Using The Extended And Special Characters Palette

    Chapter 5 Writing Code and Web Content Using the Extended and Special Characters palette To enter special characters and Latin-1 extended characters, you either can enter the ASCII code or select from a special characters palette. To display the special characters palette: •...
  • Page 79: Adding Document Content

    Adding document content Adding document content The default template contains just the code required for a valid HTML document. This default template is stored as \Wizards\HTML\Default Template.htm below your root directory. You can edit this file and save it to change its content. Or you can save a document as a template by choosing File >...
  • Page 80 Add content in Dreamweaver MX. For more information, see the Dreamweaver MX tutorials and online Help. Save your work and close Dreamweaver MX. The page displays in HomeSite+ for Dreamweaver MX again, with the changes you made in Dreamweaver MX.
  • Page 81: Using Keyboard Shortcuts

    Using keyboard shortcuts Using keyboard shortcuts Keyboard shortcuts are active for many file management, editing, and debugging commands. To see the current keyboard assignments: Select Options > Customize. Click the Keyboard Shortcuts tab. To print the list of shortcut keys: In the Options >...
  • Page 82: Saving A Code Block As A Snippet

    Chapter 5 Writing Code and Web Content Saving a code block as a snippet A code snippet is a block of code or content that you store for reuse. You can comment your snippets just as you would any code block. To create a code snippet: Before adding a snippet, you must create a folder.
  • Page 83: Sharing Snippets

    The folder is yellow and the brackets on the snippet icon are green. In HomeSite+, you can insert, edit, or assign shortcuts to existing Dreamweaver snippets as well as create folders and snippets in the Dreamweaver snippets tree. You can view, edit, delete, and use the folders and snippets in Dreamweaver.
  • Page 84: Using Dynamic Variables In Snippets

    You can add variables to snippets. Snippet variables take the same form as VTML variables: $${VARNAME}. When you insert a snippet with a variable into a document, HomeSite+ prompts you to enter a value. You can also include a list of values for a variable; for example, $${COLOR:Blue,Red,Green}.
  • Page 85: Resources For Website Accessibility

    Resources for website accessibility Resources for website accessibility The W3C Web Accessibility Initiative (WAI) at http://www.w3.org/WAI/ provides a great deal of practical information about designing applications and interfaces for the broadest range of users. Macromedia supports user accessibility in its product interfaces and is striving to fully implement the WAI recommendations.
  • Page 86: Tips For Visually Impaired Users

    HomeSite+ for Dreamweaver MX includes support for customizable keyboard shortcuts and browser-based HTML online documentation, including Alt text for all images. This section offers suggestions for ways to work productively in HomeSite+ for Dreamweaver MX. Assigning keyboard shortcuts Keyboard shortcuts are enabled for many file management, editing, and debugging commands.
  • Page 87: Working With User Interface Elements

    Tips for visually impaired users Using shortcut keys for common tasks Here are a few handy shortcuts: • Press F11 opens the current document in the default external browser, then use Alt+Tab to move between the applications. • F9 toggles the Resources window display. •...
  • Page 88 Chapter 5 Writing Code and Web Content...
  • Page 89: Chapter 6 Editing Pages

    Chapter 6 Editing Pages HomeSite+ for Dreamweaver MX has a wealth of tools for updating code and content. This chapter explains how you can use these tools to your best advantage. Contents • Setting editor options ....................70 • Selecting a code or text block ................... 71 •...
  • Page 90: Setting Editor Options

    Chapter 6 Editing Pages Setting editor options HomeSite+ for Dreamweaver MX features a flexible editing environment that gives you control over all aspects of web maintenance. Using the Editor toolbar The column between the Document window and the Resources window contains the Editor toolbar.
  • Page 91: Selecting A Code Or Text Block

    Selecting a code or text block Selecting a code or text block You can use the mouse and standard Windows keyboard commands to highlight sections of a document, or use the following shortcuts: • To select a tag, press Ctrl and double-click. •...
  • Page 92: Collapsing Text

    Chapter 6 Editing Pages Collapsing text When editing long documents or complex applications, you can hide text and code blocks so that you can focus on just a portion of the content. A customizable marker displays the first few characters of the collapsed selection. You can drag collapsed text in the same way as text blocks.
  • Page 93: Editing A Referenced File

    • To expand all collapsed text, right-click anywhere in the document and select Expand All Collapsed Sections. Editing a referenced file You can edit image files and included files from HomeSite+ for Dreamweaver MX. Editing an image file If Macromedia Fireworks MX is installed on your computer, you can open your GIF, JPG, and PNG image files for editing in Fireworks MX.
  • Page 94: Editing An Included File

    Chapter 6 Editing Pages • If you always maintain your images in PNG format and export them to GIF or JPG format, then select Always Use Source PNG in the drop-down list and click Yes. Browse to the source PNG file and click Open. The image you selected opens in Fireworks MX and, when you edit an image in the future, you can immediately browse to the source PNG file without seeing this dialog box again.
  • Page 95: Using Tag Editors

    Using tag editors Using tag editors A tag editor is a tag-specific dialog box that lets you enter information for a specific tag, and then inserts the tag with the attributes and values that you specified. Tag editors fully support ColdFusion Server. Each tag editor has its own online Help for tag syntax and usage information.
  • Page 96: Navigating The Structure Of A Document

    Chapter 6 Editing Pages Navigating the structure of a document You can inspect and navigate the structure of a document in the Tag Tree. The Tag Tree is in the Resources window, in the top pane of the Tag Inspector tab. You can configure the Tag Tree to display only the tags you want.
  • Page 97: Setting The Tag Tree Display

    Navigating the structure of a document Alternatively, you can create or edit an outline profile in the Outline Profile Editor dialog box. To open this dialog box, display the Tag Inspector resource tab and, in the toolbar in the top pane, click Configure Outline Profiles. Setting the Tag Tree display You can edit the list of outline profiles in the Tag Tree, and import an outline profile from a VTML (.vtm) file or a Document Type Definition (DTD) file.
  • Page 98: Editing Code In The Tag Inspector

    Chapter 6 Editing Pages Click Finish. If you imported a DTD file, HomeSite+ for Dreamweaver MX stores its information in a VTML file in the /Extensions/Outline Profiles folder. Otherwise, the selected VTML file is copied to /Extensions/Outline Profiles. In the Outline Profiles dialog box, click Done. (There is no Cancel button.) To use the Tag Tree with imported DTD information: Open a document that adheres to a DTD that you imported.
  • Page 99: Creating And Editing An Event Handler Script Block

    Editing code in the Tag Inspector Creating and editing an event handler script block You can add and modify script blocks for events such as from Tag Inspector. onClick If the selected tag supports an event as an attribute, you can edit the event in its attribute field.
  • Page 100: Formatting Pages With Cascading Style Sheets

    Chapter 6 Editing Pages Formatting pages with Cascading Style Sheets This section describes Cascading Style Sheets (CSS), and provides information for using the integrated TopStyle Lite Style Editor and for coding styles by hand. About Cascading Style Sheets (CSS) CSS (also known as styles) lets you specify a format for a page element, such as a paragraph or table, and then specify where to apply this format.
  • Page 101: About The Integrated Style Editor

    TopStyle Lite provides an integrated user interface for designing and deploying Cascading Style Sheets (CSS). TopStyle lets you define, preview, and apply styles to web content. It has color-coding like HomeSite+ for Dreamweaver MX, so you can identify the various style elements.
  • Page 102 Chapter 6 Editing Pages The following figure shows the main components of the TopStyle user interface: The TopStyle online Help includes a tutorial, a CSS reference, procedures for using its features, and information for upgrading to TopStyle Pro.
  • Page 103: Macro Recorder

    Macro Recorder Macro Recorder The Macro Recorder feature stores commands based on user keystrokes, mouse clicks, toolbutton and menu option selections, and lets you save and play back or just play back the series of commands. Using macros can save you time and effort when you perform the same action multiple times.
  • Page 104 In the Macro Manager dialog box, select a saved macro and select the Edit button. The macro file opens in HomeSite+ so you can edit it. You can add any available Command IDs to a saved macro file. See the list of Command IDs.
  • Page 105: Vtom Methods

    Macro Recorder VTOM methods You can use the following Visual Tools Object Model (VTOM) methods to create macros for automated tasks. None of the methods take parameters. Method Action RecordOnOff Toggles the Macro recorder on and off. RecordPlay Plays the currently buffered macro. OpenMacroManager Brings up the Macro Manager dialog.
  • Page 106 Chapter 6 Editing Pages • cmdDebugShowStack • cmdDebugShowOutput • cmdDebugShowVariables • cmdDebugShowDebugStartSettings • cmdDebugShowMappings • cmdEditBackspace • cmdEditCut • cmdEditCopy • cmdEditPaste • cmdEditUndo • cmdEditRedo • cmdEditRepeatLastTag • cmdEditCodeFormat • cmdEditToggleInsertMode • cmdEditDelete • cmdEditDeleteLine • cmdEditDeleteToEOL • cmdEditDeleteWordLeft •...
  • Page 107 Macro Recorder • cmdEditCollapseIdenticalTags • cmdEditExpand • cmdEditExpandAll • cmdEditIsXHTML • cmdEditFindInclude • cmdEditOpenInFireworks • cmdEditorToggleWindowList • cmdEditorToggleGutter • cmdEditorToggleTagInsight • cmdEditorToggleTagCompletion • cmdEditorToggleTagValidation • cmdEditorBrowser • cmdEditorFirst • cmdEditorLast • cmdEditorNext • cmdEditorPrev • cmdEditorFileClose • cmdEditorToggleGutterLineNum • cmdFileOpen •...
  • Page 108 Chapter 6 Editing Pages • cmdGotoPrevError • cmdHelpAbout • cmdHelpContents • cmdHelpHTML • cmdLinkBotVerifyPage • cmdLinkBotVerifyProject • cmdNone • cmdOptionsSettings • cmdOptionsCustomize • cmdOptionsOrganizeQuickBar • cmdOptionsCodeFormatSettings • cmdProjectNew • cmdProjectOpen • cmdProjectClose • cmdProjectAddFile • cmdProjectRemoveFile • cmdProjectSync • cmdProjectUpload •...
  • Page 109 Macro Recorder • cmdSearchFindMatchingTag • cmdSearchReplaceDoubleSpacing • cmdSearchReplaceExtChars • cmdSCGetLatestVersion • cmdSCCheckOut • cmdSCCheckIn • cmdSCUndoCheckOut • cmdSCAdd • cmdSCRemove • cmdSCShowHistory • cmdSCShowDifferences • cmdSCApplication • cmdSelectionCreateSnippet • cmdSelectionConvertToUL • cmdSelectionConvertToOL • cmdSelectionConvertToTable • cmdSelectionAddBR • cmdSelectionStripTags • cmdSelectionUCase •...
  • Page 110 Chapter 6 Editing Pages • cmdViewFullScreen • cmdViewToggleResTab • cmdViewToggleResTabFocus • cmdViewPreviousDocument • cmdViewNextDocument • cmdViewInternalBrowser • cmdViewExternalBrowser • cmdViewDefaultExternalBrowser • cmdViewDreamweaver • cmdViewEditSource • cmdViewEditorTab • cmdViewEditorToolbar • cmdViewTagInsight • cmdViewTagTip • cmdViewToggleEditPreview • cmdViewToggleTagInspectorFocus • cmdViewToggleSpecialChar • cmdViewToggleQuickBar •...
  • Page 111 Macro Recorder • jrunMailParam • jrunGetMail • jrunServlet • jrunServletParam • jrunQuery2Xml • jrunXslt • jrunForm • jrunInput • jrunSelect • jrunParam • jrunForEach • jrunIf • jrunSwitch • jrunCase • jspPage • jspIncludeFile • jspTagLib • jspDeclaration • jspScriptlet •...
  • Page 112 Chapter 6 Editing Pages • tagCheckbox • tagComment • tagDD • tagDIV • tagDL • tagDT • tagEM • tagFont • tagFontSize_Plus • tagFontSize_Minus • tagForm • tagFrameDlg • tagFrame • tagFrameWizard • tagFrameset • tagFramesetDlg • tagH1 • tagH2 •...
  • Page 113 Macro Recorder • tagReset • tagSelect • tagSpan • tagSubscript • tagSuperscript • tagStrong • tagSubmit • tagTable • tagTableCaption • tagTableDlg • tagTableWizard • tagTD • tagTDDlg • tagText • tagTextarea • tagTH • tagTHDlg • tagTR • tagTRDlg •...
  • Page 114 Chapter 6 Editing Pages • tagCFElseIf • tagCFError • tagCFFile • tagCFHeader • tagCFHTTP • tagCFHTTP_Param • tagCFIF • tagCFInclude • tagCFInsert • tagCFIndex • tagCFLDAP • tagCFLocation • tagCFLoop • tagCFMail • tagCFOutput • tagCFParam • tagCFPOP • tagCFQuery •...
  • Page 115 Macro Recorder • tagCFObject • tagCFSchedule • tagCFDirectory • tagCFTry • tagCFCatch • tagCFThrow • tagCFLock • tagCFCase • tagCFDefaultCase • tagCFSwitch • tagCFScript • tagCFBreak • tagCFExit • tagCFUpdate • tagNoFramesDlg • tagCFChart • tagCFChartData • tagCFChartSeries • tagCFGraphBar •...
  • Page 116 Chapter 6 Editing Pages...
  • Page 117: Chapter 7 Using Web Development Languages

    Chapter 7 Using Web Development Languages This chapter describes language support in HomeSite+ for Dreamweaver MX and provides specific information for setting language-specific options and color coding schemes, coding in XHTML, validating against different language specifications., and working with tag definitions.
  • Page 118: About Language Support

    Chapter 7 Using Web Development Languages About language support This section describes what languages are supported, how to get around limitations, and provides an overview of how HomeSite+ for Dreamweaver MX detects and handles a language. Supported languages HomeSite+ for Dreamweaver MX has significant support for current standards in several web development languages.
  • Page 119: How A Language Is Detected

    Setting options for markup languages How a language is detected On a document level, HomeSite+ for Dreamweaver MX determines the language based on the document’s declaration. If there is no declaration, the program DOCTYPE treats the document content as HTML. In the case of XHTML, when you enable Options >...
  • Page 120 (tag editors) is entered for every required attribute. To require an attribute in a tag editor: 1 In HomeSite+ for Dreamweaver MX open the VTML file for the tag editor, in the <installation directory>\Extensions\TagDefs folder, in the folder for the applicable markup language.
  • Page 121: Coding In Xhtml

    The rest of this section defines XHTML, describes its benefits, and explains how to take advantage of the XHTML support and features in HomeSite+ for Dreamweaver Note To specify the priority of XHTML in the Tag Definitions Library, see “Working with tag...
  • Page 122: What Is Xhtml

    Chapter 7 Using Web Development Languages What is XHTML? XHTML (Extensible Hypertext Markup Language) is a reformulation of HTML as an XML language. It is almost identical to HTML 4.01, but it is more strict and clean. Using XHTML lets you reap the benefits of XML, while ensuring the backward and future compatibility of your web documents.
  • Page 123: Setting Options For Xhtml

    Coding in XHTML Setting options for XHTML This section has instructions for setting options that are optimal for XHTML coding. For more information about these options and other language options that are not specific to XHTML, see “Setting options for markup languages” on page To set language options that are optimal for XHTML: Open the Options >...
  • Page 124: Setting Color Coding For Xhtml

    Chapter 7 Using Web Development Languages To create an XHTML document, do either of the following: • Create a document with one of the templates available in the File > New > XHTML dialog box (Strict, Transitional, or Frameset). • Open or create a document containing a Strict, Transitional, or Frameset doctype declaration.
  • Page 125: Using Codesweepers To Convert Your Code To Xhtml

    Coding in XHTML Using CodeSweepers to convert your code to XHTML Following is one way to configure a CodeSweeper to convert your code to XHTML. To use a preconfigured XHTML CodeSweeper: Open the Options > Settings > CodeSweeper > HTML Tidy CodeSweeper pane. Select Macromedia HTML Tidy Settings and click Edit Profile.
  • Page 126 Chapter 7 Using Web Development Languages The Values tab is for validating regular expressions. All of these are unnecessary for a standard XHTML document, so this configuration is complete. Click OK. In the Settings dialog box, click Apply. What the XHTML validator checks When you configure the validator to check your code against the XHTML 1.0 specification, it checks the following rules: •...
  • Page 127: Using Regular Expressions

    “Validating code” on page 120. Writing regular expressions The rules listed in this section are for creating regular expressions in HomeSite+ for Dreamweaver MX; the rules used by other RegExp parsers might differ. To construct a regular expression in Expression Builder: Select Tools >...
  • Page 128: Using A Special Character

    Chapter 7 Using Web Development Languages The regular expression appears in the working area at the top of the dialog box. (Optional) Modify the contents of the working area. You can insert other expressions in the working area to construct a more complex expression.
  • Page 129: Using A Character Class

    Using regular expressions • Any regular expression can be followed by one of the following suffixes: − {m,n} forces a match of m through n (inclusive) occurrences of the preceding regular expression − {m,} forces a match of at least m occurrences of the preceding regular expression The syntax {,n} is not allowed.
  • Page 130: Creating A Multi-Character Regular Expression

    “ba”. Using a back reference HomeSite+ for Dreamweaver MX supports back referencing, which allows you to match text in previously matched sets of parentheses. You can use a backslash followed by a digit n (\n) to refer to the n parenthesized subexpression.
  • Page 131: Anchoring A Regular Expression To A String

    Using regular expressions Anchoring a regular expression to a string You can anchor all or part of a regular expression to either the beginning or end of the string being searched: • If a caret (^) is at the beginning of a subexpression, the matched string must be at the beginning of the string being searched.
  • Page 132: Using Color Coding Schemes

    Chapter 7 Using Web Development Languages Using color coding schemes Language color coding helps you to identify code blocks in large documents and distinguish between language types. The default color coding scheme is for HTML, but you can use any of the following color coding schemes for your documents: •...
  • Page 133: Setting The Display Of Tags In The Editor

    Using color coding schemes Setting the display of tags in the Editor You can customize a color scheme by changing its default colors and font styles. To change a color scheme: Select Options > Settings > Editor > Color Coding. Choose the scheme you want to change.
  • Page 134: Formatting Code With Codesweepers

    Macromedia CodeSweepers. It has additional language support, and useful features such as line wrapping, converting tags, and working in XML. If new features are added to HTML Tidy between HomeSite+ for Dreamweaver MX releases, you can update your version of HTML Tidy.
  • Page 135: Running A Codesweeper

    Formatting code with CodeSweepers Editing an HTML Tidy CodeSweeper The HTML Tidy CodeSweepers pane provides access to all the supported options, but you can also edit a profile directly. This is especially useful in these situations: • When you do not want an option to appear in the CodeSweeper pane, delete the name:value pair for the option from the TDY file.
  • Page 136: Managing Codesweepers

    Chapter 7 Using Web Development Languages Managing CodeSweepers You can specify a default CodeSweeper, and create, edit, and delete a CodeSweeper. To set the default CodeSweeper: In the Options > Settings > CodeSweeper pane, select the CodeSweeper and click Set as Default and then click Apply. To create a CodeSweeper: In the Options >...
  • Page 137 To delete a Macromedia CodeSweeper: In the Options > Settings > CodeSweeper pane, select the CodeSweeper and click Remove Profile. HomeSite+ for Dreamweaver MX immediately removes the CodeSweeper from the list without asking for a confirmation. Click Apply. To delete an HTML Tidy CodeSweeper, see “Deleting an HTML Tidy CodeSweeper”...
  • Page 138: Setting Macromedia Codesweeper Options

    Chapter 7 Using Web Development Languages Setting Macromedia CodeSweeper options The options described in this section apply only to Macromedia CodeSweepers. For a description of options for HTML Tidy CodeSweeper, see http://www.w3c.org/ People/Raggett/tidy/#helphttp://www.w3c.org/People/Raggett/tidy/#help/a. Setting general options The following table describes the options on the General Settings tab of a Macromedia CodeSweeper pane: General option Description...
  • Page 139 Formatting code with CodeSweepers Setting tag-specific options You can set formatting rules for an existing or new tag, and you can remove a tag, so that the CodeSweeper ignores that tag in the documents it sweeps. About the tag-specific settings You can set the following options for each tag on the Tag-specific Settings tab of a Macromedia CodeSweeper: Tag-specific option Description...
  • Page 140: Validating Code

    Click Apply. Validating code You can use the HomeSite+ for Dreamweaver MX validator, or integrate the CSE HTML validator to work within HomeSite+ for Dreamweaver MX. Using the default Validator You can use the HomeSite+ for Dreamweaver MX validator to check and report syntax errors in HTML (including different browser extensions), XHTML, CFML, JSP , SMIL, and WML.
  • Page 141 Validating code Configuring the validator Configuration options are available to meet a wide range of validation requirements. This section contains a general procedure for configuring the validator, and procedures for setting specific options. Note If you validate both CFML and HTML (or XHTML) in a single document, the validator cannot assess the pound sign (#).
  • Page 142 Chapter 7 Using Web Development Languages • Versions Create a new family of languages, for example the XML language MathML, and add versions to language families. A version inherits everything from the parent language. You can add tags to a new family on the Tags tab, or you can back up the validator (VTV) files in the \Extensions and \Extensions\TagDefs directories, and then modify them in the Editor.
  • Page 143 Validating code In the Tag Options box, select Required in document and click Apply Options. Expand the img node, select the Attributes folder and click Add. In the New Attribute dialog box, enter alt and click OK. Select the Required folder, and click Add. 10 In the Add Required Attribute dialog box, enter alt and click OK.
  • Page 144: Using The Cse Html Validator

    If something is wrong in the tag, an error message appears in red in the status bar. Using the CSE HTML Validator If you have installed this HTML validation tool, you can run it from HomeSite+ for Dreamweaver MX. The CSE Validator supports multiple languages and contains other useful features.
  • Page 145: Working With Tag Definitions

    \Extensions\TagDefs directory under the application root directory. When you use a tag editor or the Tag Inspector, or Tag Insight is enabled, HomeSite+ for Dreamweaver MX needs to know which tag definition to use. The list in the Options >...
  • Page 146: Editing Tag Definitions

    Chapter 7 Using Web Development Languages If you do not want to search a namespace at all, clear the Enabled option for it. If you want the current document’s type to receive the highest priority regardless of the precedence set in this pane, select Current document’s namespace receives highest priority.
  • Page 147 Working with tag definitions To create a tag definition, do one of the following: • Modify an existing VTM file and save it as the new tag. This is the best way to create a tag definition file. • Use the skeleton tag definition file, \Extensions\TagDefs\TagDefTemplate.vtm, as a starting point for creating your own tag.
  • Page 148 Chapter 7 Using Web Development Languages...
  • Page 149: Chapter 8 Accessing Data Sources

    Chapter 8 Accessing Data Sources This chapter describes how to use the visual tools in HomeSite+ for Dreamweaver MX to accelerate development of data-driven ColdFusion applications. Contents • Introduction to database tools................130 • Working with data sources ..................130 •...
  • Page 150: Introduction To Database Tools

    Connecting to a data source Data sources that are registered in the ColdFusion Administrator are automatically accessible from the Database tab in HomeSite+ for Dreamweaver MX. To access remote data sources, you can add remote ColdFusion Servers (RDS servers). To add a remote server: At the bottom of the Resources window, click the Database tab.
  • Page 151: Viewing A Data Source

    Viewing a data source As soon as a data source has been added in the ColdFusion Administrator, you can view it in HomeSite+ for Dreamweaver MX. To open a data source: In the Resources window, click the Database tab.
  • Page 152: Using Sql Builder For Database Queries

    Chapter 8 Accessing Data Sources Using SQL Builder for database queries SQL Builder is a powerful visual tool that you can use to build, test, and save SQL statements for use in application data queries. You can copy a SQL code block directly into your application or insert it into a tag.
  • Page 153: The Sql Builder User Interface

    Using SQL Builder for database queries The SQL Builder user interface The following graphic shows the SQL Builder user interface: The SQL Builder is divided into these sections: • Toolbar Contains toolbuttons for SQL keywords and commands • Table pane Provides a view of the tables in a query and lets you create joins between tables •...
  • Page 154: Building A Select Statement

    Chapter 8 Accessing Data Sources To change the type of SQL statement: Open SQL Builder. For instructions, see the opening SQL Builder procedure earlier in this section. Select a statement type from the SQL Builder toolbar. Building a SELECT statement SQL SELECT statements let you specify data from which to build a recordset.
  • Page 155: Inserting Sql Into A Page

    SQL Builder. • To insert just the SQL statement from SQL Builder, click Copy SQL to Clipboard and close SQL Builder. HomeSite+ for Dreamweaver MX prompts you to save the query. Then you can paste the statement into your page.
  • Page 156: Testing And Editing A Query

    To test a query in SQL Builder: Click Run Query. HomeSite+ for Dreamweaver MX prompts you to enter values for the variables in the query. If you save a query, you can edit it later. However, pages containing the query are not automatically updated.
  • Page 157: Chapter 9 Managing Projects

    Chapter 9 Managing Projects This chapter describes how to use a HomeSite+ for Dreamweaver MX project to manage the files in a website. Contents • Understanding projects ..................138 • Creating a project ....................140 • Working with a project.................... 144 •...
  • Page 158: Understanding Projects

    Chapter 9 Managing Projects Understanding projects This section describes the following topics HomeSite+ for Dreamweaver MX projects and how to structure them to fir your requirements. What is a project? A project is a collection of files that you use to develop and maintain your website.
  • Page 159: About The Project File

    The project (.apf ) file controls the project folders and files that appear on the Projects resource tab for a project. It is the only element that HomeSite+ for Dreamweaver MX creates when you create a project. When you double-click a file on the Projects tab, the project file locates and opens the file.
  • Page 160: Creating A Project

    Chapter 9 Managing Projects Creating a project This section describes the following topics: • Setting project options • Creating a project • Populating a project Setting project options Before creating a project, you can set options to apply to all new projects. To set default options for new projects: In the Options >...
  • Page 161: Creating A Project

    Click OK. HomeSite+ for Dreamweaver MX creates the project APF file in the directory that you specified. Populating a project Once you have created a project, you can add folders and files to it.
  • Page 162 Chapter 9 Managing Projects Adding folders to a project You can add a folder to a project. Some restrictions apply, depending on the type of folder that you are adding, and where you are adding it. For more information, see “Populating a project”...
  • Page 163 On the Projects resource tab, right-click a folder and select Remove Folder. In the Warning dialog box, click Yes. HomeSite+ for Dreamweaver MX removes the folder from the project folders pane, and removes the reference to the folder in the project’s APF file. This does not delete the folder in your file system.
  • Page 164: Working With A Project

    Enter a list of file types, separated by semi-colons; for example, htm;html;css;png;gif;jpg;jpeg Click OK. HomeSite+ for Dreamweaver MX adds and removes files to the folder according to the option that you set. Working with a project The Projects resource tab contains every user interface element that you need to work with a project.
  • Page 165: Managing Project Files

    Working with a project Managing project files This section contains instructions for opening and closing a project and project files, editing a project’s properties, and deleting a project. For information on deploying a project and managing a project under source control, see “Performing other project-level tasks”...
  • Page 166: Managing Project Resources

    Chapter 9 Managing Projects HomeSite+ for Dreamweaver MX removes the project from the Projects tab and deletes the APF file. This does not delete or affect the actual files that were included in the project. Managing project resources The Resources tree provides a view of the files in your project based on file type. This is useful for isolating application files, media files, and other content.
  • Page 167: Performing Other Project-Level Tasks

    Working with a project (Optional) Remove the resource from the list of default project resources, as follows: Selecting the resource in the resource table and click Delete. The resource is removed immediately without asking you for a confirmation. Click Apply. To add a resource for a project: On the Projects resource tab, in the project folder pane, right-click Resources and select Add Resource.
  • Page 168: Adding A Project To Source Control

    Chapter 9 Managing Projects Adding a project to source control With HomeSite+ for Dreamweaver MX projects, you can manage project files in a source control system. You can establish a relationship between a source control application and your project, so that you can manage check-out, check-in, and other source control operations without opening the source control application.
  • Page 169 Control. You might be required to login to VSS. In VSS, select File > Add Files, and add the files and folders in your HomeSite+ for Dreamweaver MX project to the VSS project folder. (Optional) In VSS, select Tools > Options, and set file handling rules, views, and other options.
  • Page 170: Using Source Control In Homesite+ For Dreamweaver Mx

    Chapter 9 Managing Projects Using source control in HomeSite+ for Dreamweaver MX You can control your source from within HomeSite+ for Dreamweaver MX or, if you must work directly in the source control application, you can open it from HomeSite+ for Dreamweaver MX.
  • Page 171: Chapter 10 Debugging Application Code

    Chapter 10 Debugging Application Code When debugging a basic page, you can use the debugging information that is reported from the application server. However, for complex development tasks, you need a robust and interactive debugging program. The interactive debugger runs against dynamic pages on the ColdFusion Server. You can set breakpoints and step through the code to isolate and correct problems.
  • Page 172: Overview Of The Interactive Debugger

    Chapter 10 Debugging Application Code Overview of the Interactive Debugger You can run the debugger against your application pages to find errors in your code, when Remote Development Services (RDS) is enabled and a server mapping is defined. Debugging is not supported on Windows 98. The debugger lets you perform these tasks: •...
  • Page 173: Setting Up A Debugging Session

    Dreamweaver MX, select the server in the Debug on RDS Server box, on the Debug Start tab. If ColdFusion Server is not installed on the same computer as HomeSite+ for Dreamweaver MX, perform the following steps: On the Debug Start tab, in the Debug on RDS Server box, select Add RDS...
  • Page 174 Chapter 10 Debugging Application Code The Configure RDS Server dialog box appears: b In the Remote Host box, enter the RDS server description, host name, and port. (Optional) Select the Use Secure Sockets Layer (SSL) option. In the Macromedia RDS Security box: if RDS Security is implemented on your system, enter a username and password to access the server.
  • Page 175 Dreamweaver MX uses to locate the page you are debugging. • ColdFusion Server If you debug against a local server, enter the same path as for HomeSite+ for Dreamweaver MX. If you debug against a remote server, enter its absolute path. The path must be the same as the alias or virtual mapping that your web server uses.
  • Page 176: Using The Debugger

    In the Debug toolbar, click the Start/Continue tool. The Remote Development Settings dialog box displays the default local server. Enter the Start URL, which is the page URL. Click OK. The list box displays the pages that are open in HomeSite+ for Dreamweaver MX.
  • Page 177: About The Debug Window

    Enter a fully qualified file path relative to your local ColdFusion Server; for example, http://127.0.0.1/SomeServerPath/index.cfm. HomeSite+ for Dreamweaver MX calculates URLs of open file using the RDS development mappings (which you set in the Mappings tab.) The mappings are also required to develop code on remote servers.
  • Page 178: Stepping Through Code

    Chapter 10 Debugging Application Code HTML and CFML pages. For example, you can test the submittal of an HTML form and its subsequent processing by a ColdFusion application page. Stepping through code To execute code in debug mode, you use these tools on the Debug toolbar: •...
  • Page 179: Chapter 11 Deploying Files

    Chapter 11 Deploying Files Deployment is the process of copying all of the files in your project to one or more host servers. You can specify a deployment path for the entire project or for individual folders and files. This chapter describes how to set default deployment options and how to deploy files to a server.
  • Page 180: Setting Default Deployment Options

    Chapter 11 Deploying Files Setting default deployment options Optionally, you can specify options to apply for every deployment by default. To set other project deployment options: In the Options > Settings > Projects > Deployment pane, specify logging options: • If you do not want to create a log file tracking a project’s deployment, select Disable Logging.
  • Page 181: Deploying A Single File Or Folder

    Deploying a single file or folder Deploying a single file or folder This section explains how to deploy a single folder or file to one or more servers. To deploy to a single location: On the Projects resource tab, open a project. For more information, see “Managing project files”...
  • Page 182: Performing A Custom Deployment

    Chapter 11 Deploying Files Performing a custom deployment This section describes the advanced method of deployment that offers maximum flexibility and functionality. This method involves building an absolute path for the product to deploy the files. This absolute path is comprised of three parts: Server + Project Path + Folder Level To build this deployment path, and to deploy, you must do the following steps: Select the folders and files to deploy.
  • Page 183 Typically, you do not include the server name for the host in the pathname. When you select a deployment server in the Deployment Wizard, HomeSite+ for Dreamweaver MX appends the server name to the path. If you do enter a server name as part of the path, and do not select the server in the Deployment Wizard, an error appears in the Results pane.
  • Page 184: Adding A Deployment Server

    Path to more than one server. Do Not Deploy Tell HomeSite+ for Dreamweaver MX to ignore the folder and its contents during deployment. Adding a deployment server Adding a deployment server is similar to configuring a remote server in the Files panel.
  • Page 185: Running The Deployment Wizard

    Performing a custom deployment Note When you deploy to multiple servers, the project files are copied to identical locations on each server. Make sure the servers contain the same directory structure. To view the deployment servers for a project: On the Projects resource tab, open a project. In the top pane of the tab, expand the Deployment Servers node.
  • Page 186 Chapter 11 Deploying Files Deploying directly When you deploy a project directly, you are copying the files to the host server(s) at the time of deployment. You can deploy to the same computer that you are currently using (localhost), or you can deploy to one or more remote servers. To deploy a project: On the Projects resource tab, open a project.
  • Page 187 In the Deployment Task Name box, enter a name for the script. In the Script Language box, select VBScript or JScript. In the Save Script to File box, modify the filename that HomeSite+ for Dreamweaver MX entered based on the project name, or click Browse to a enter the filename using the Save As dialog box.
  • Page 188 Chapter 11 Deploying Files Managing deployment scripts To edit a deployment script: On the Projects resource tab, in the top pane, expand the Deployment Scripts node. Right-click a script and select Open Script. Edit the script in the Editor and save your work. To run a deployment script: On the Projects resource tab, in the top pane, expand the Deployment Scripts node.
  • Page 189: Saving Deployment Results

    Saving deployment results Saving deployment results Regardless of your deployment method, you can review and save the results. The results can be saved in a log file and/or in HTML format. To review the results of the last deployment: Select View > Results > Deployment. To select display options, right-click in the Deployment pane and select the appropriate command.
  • Page 190 Chapter 11 Deploying Files...
  • Page 191: Web Pages

    Chapter 12 Testing and Maintaining Web Pages As your website develops, you must update it and test its accuracy, completeness, and efficiency. HomeSite+ for Dreamweaver MX provides a full set of tools to accomplish these necessary tasks. Contents • Working in the Results window ................172 •...
  • Page 192: Working In The Results Window

    Chapter 12 Testing and Maintaining Web Pages Working in the Results window The Results window is a section of the user interface that you can display if you want, but otherwise it only appears when you need it—when you must see the results of an operation such as an extended search or link verification.
  • Page 193: Saving Results

    Dreamweaver MX preserves the results of the operation on the appropriate tab, even when you move from one tab to another or close the Results window. However, results are discarded when you repeat the same operation or close HomeSite+ for Dreamweaver MX.
  • Page 194: Searching Documents

    This section describes each search capability. Selecting search text By selecting text in a document and invoking a search, HomeSite+ for Dreamweaver MX automatically inserts the selected text into the Find what text box. In a basic search or replace, if the selected text exceeds 100 characters, no text is inserted into the Find what box, and HomeSite+ for Dreamweaver MX searches the selected text instead of the entire document.
  • Page 195: Using Basic Search Commands

    Searching documents To use a saved search string in an extended search: In the Extended Find or Extended Replace dialog box, click the arrow next to the Find what box and select Open find text from the popup menu. In the Open find text dialog box, select the search string to use and click Open. Using basic search commands You can perform a basic search or replace operation on the current document, even if it is an untitled, unsaved document.
  • Page 196: Using Extended Search Commands

    Match case highlight a match only if it has identical uppercase and lowercase as the selection. • Regular expressions enables parsing of regular expression entries. For information on the specific syntax to use for regular expressions in HomeSite+ for Dreamweaver MX, see “Using regular expressions” on page 107.
  • Page 197 Exclude Binary Files skips binary files such as EXE, PDF, ZIP, and media file types. Searching these types of files would significantly slow down the search. HomeSite+ for Dreamweaver MX installs a list of excluded file extensions in the Windows Registry LinkVerifyExcludeExts key.
  • Page 198 Exclude Binary Files Skips over binary files such as EXE, PDF, ZIP , and media file types. Searching these types of files would significantly slow down the search. HomeSite+ for Dreamweaver MX installs a list of excluded file extensions in the Windows Registry LinkVerifyExcludeExts key.
  • Page 199 Because of the way that different operating systems treat carriage returns, text files saved on UNIX or Macintosh computers might be double-spaced when you open them in HomeSite+ for Dreamweaver MX. To make a double-spaced document single-spaced: Open the double-spaced document, if it is not already open.
  • Page 200: Searching With Regular Expressions

    Chapter 12 Testing and Maintaining Web Pages The double-spaced lines are collapsed to be single-spaced lines. Searching with regular expressions You can use regular expressions (or RegExp) to match patterns in character strings during Extended Find and Extended Replace operations. To search with regular expressions: Select Search >...
  • Page 201: Checking Spelling

    Checking spelling Checking spelling You can check the spelling of your document content and, optionally, code syntax. This section provides instructions for configuring and using the spelling checker. Configuring the spelling checker This section describes how to configure your spelling checker to best meet your needs.
  • Page 202 • Modify the file indirectly while checking spelling, by adding or removing a word in the Spelling dialog box. • Edit the file directly in HomeSite+ for Dreamweaver MX manually adding and deleting words from the file. The user dictionary is a text file with one word on...
  • Page 203 Skips words that contain unusual mixed USoA and THen case letters capitalization Ignore words with Skips words that contain characters other HomeSite+ non-alphabetic characters than alphabetic letters Perform OEM conversion Translates Windows ANSI characters to the Correctly identifies Chinese currently installed OEM character set...
  • Page 204: Using The Spelling Checker

    Chapter 12 Testing and Maintaining Web Pages Using the spelling checker You can mark spelling errors in the current document, run the spelling checker against the current document, or run the spelling checker against all open documents. To check spelling, do any of the following: •...
  • Page 205: Verifying Links

    HomeSite+ for Dreamweaver MX checks all links in a selection, but you can skip specific links. Tags in comments are skipped. If you have installed Linkbot 5.0 or later, you can use it within HomeSite+ for Dreamweaver MX. Select Tools > Verify Links with Linkbot to check links in specific files, or select Tools >...
  • Page 206 Chapter 12 Testing and Maintaining Web Pages HomeSite+ for Dreamweaver MX checks each link in order. The Status column displays OK for successful links and, for failed links, a File not found message or the server-generated code. To end the link validation before it completes, click Stop.
  • Page 207: Using Site View To Check Page Links

    Using Site View to check page links Using Site View to check page links Site View provides a graphic representation of each link, beginning in the current document. You can view the links in a tree or chart format. Each link is identified by a file type icon (internal, web, image, mailto, and so on), and the filename.
  • Page 208: Testing Page Download Times

    Public sites and intranets with remote users must achieve a balance between attractive content and tolerable page-loading times. HomeSite+ for Dreamweaver MX can help you find that balance by supplying values for document download times across a range of modem speeds.
  • Page 209 Testing page download times To set the root URL for an FTP server: In the Resources window, click a Files tab. In the Drive List, select Macromedia FTP & RDS. Right-click a server name and select Properties. In the Configure FTP Server dialog box, complete the Root URL field and click OK.
  • Page 210 Chapter 12 Testing and Maintaining Web Pages...
  • Page 211: Chapter 13 Extending The Help System

    Chapter 13 Extending the Help System Like the product, the Help system is fully extensible. You can add documents to the Help system by dragging and dropping them into the Help folder, either from the Files tab or Windows Explorer. Contents •...
  • Page 212: Introduction

    Chapter 13 Extending the Help System Introduction Like the product, the Help system is fully extensible. You can add documents to the Help system by dragging and dropping them into the Help folder, either from the Files tab or Windows Explorer. Help document files are generally in HTML, but you can include text files.
  • Page 213: Adding Content To The Help Tree

    Adding content to the Help tree Adding content to the Help tree You can add files or whole references (folders) to the Help tree. To create a new folder in the Help tree: In a Files tab, navigate to the Help folder in your installation. Right-click in the Files pane and select Create Folder.
  • Page 214: Changing The Order Of Items In The Help Tree

    In Windows Explorer, open the Help root directory, make a backup copy of the booktree.xml file, and copy the new folder into the Help root directory. In HomeSite, open the new Help folder. In the file list, double-click the booktree.xml file.
  • Page 215: Displaying Text Files In The Help Tree

    Displaying text files in the Help tree Displaying text files in the Help tree You can add text files to the Help tree. The Help browser default file type is HTML, so it looks for a title tag in each file. If it does not find one, or if the tag is empty, it displays the filename as the document's title in the Help tree.
  • Page 216 Chapter 13 Extending the Help System...
  • Page 217 This chapter introduces the Visual Tools Markup Language (VTML) and the Wizard Markup Language (WIZML), tag-based languages that are used internally by HomeSite+ for Dreamweaver MX. You can use VTML to generate tag-specific dialog boxes and other user interface elements for entering and editing HTML, XHTML, CFML, JSP, and all other supported language elements.
  • Page 218: About Visual Tools Markup Language (Vtml)

    About Visual Tools Markup Language (VTML) You can change the content and layout of tag editors by editing VTML files directly in HomeSite+ for Dreamweaver MX. You can also create your own editors. Many custom tag developers use VTML to build tag editors to distribute with their tags libraries.
  • Page 219: Using Tag Chooser

    Using Tag Chooser Using Tag Chooser Tag Chooser contains all supported tag sets and is the primary user interface for tag selection. The following screen shot shows Tag Chooser with an HTML tag highlighted and the embedded Help for that tag displayed. Press Select to open the tag editor for the highlighted tag.
  • Page 220: Exploring The New Vtml Structure

    Chapter 14 Customizing the Development Environment Exploring the new VTML structure If you modified existing language elements or added new elements, such as custom tags, in previous versions, you will notice a significant change in the Extensions folder and in the Extensions\MarkUpTags file. In previous releases, the MarkUpTags file was a repository of VTML coded information for all the supported languages.
  • Page 221: About Dialog Definition Files

    About dialog definition files About dialog definition files The structure of the included files that are referenced in MarkUpTag.vtm and in ExpressionElements.vtm is basic. The files contain a set of category and element tags. Category tags can contain any number of elements or other nested category tags, for example: <cat …...
  • Page 222: Creating A Tag Definition File

    Chapter 14 Customizing the Development Environment Creating a tag definition file User interfaces, such as Tag Insight and Tag Inspector require, tag-specific information to operate properly. For instance, Tag Inspector needs to know the attributes of the tag being entered, the type of each of those attributes, and, in some instances, the enumerated values of an attribute.
  • Page 223: Defining Attributes

    Creating a tag definition file You can create the definition file in one of the following ways: • Write it manually. • Create it from an existing tag definition file. • Use the Tag Definitions Library dialog box to add a tag and edit the generated file. The following sections describe how to define attribute categories Defining attributes block defines attributes inside the main...
  • Page 224: Building A Tag Editor

    Chapter 14 Customizing the Development Environment Building a tag editor Defining a tag editor is requires the following three tasks: Layout the dialog box controls. Specify how to populate the controls with tag attributes. Define the tag generation template. Open the \Extensions\TagDefs\mytag.vtm file to see how these tasks are coded. Defining controls tags represent graphical controls.
  • Page 225: Populating Dialog Boxes With Tag Data

    Building a tag editor ../VTML_Reference/control.html ../VTML_Reference/ control container.html in the VTML Reference for syntax and usage container information. Populating dialog boxes with tag data Once the layout of controls is completed, you must define the way in which the tag editor controls are populated when you are editing an existing tag.
  • Page 226 Chapter 14 Customizing the Development Environment A good way to get started is to have a look at the taglayout sections of existing HTML tag editors located in the \Extensions\TagDefs\HTML directory. ../VTML_Reference/taglayout.html in the VTML Reference for syntax taglaout and usage information. Variables passed to the layout template The value of each control of the tag editor is passed to the template using a variable with the same name, for example, a ColorPicker control named...
  • Page 227 Building a tag editor Maintaining tag indentation The variable contains an indentation string for the EditorTagIndentString currently selected tag. If the start tag is indented using tabs and characters, the string is represented as the corresponding combination of tabs and spaces. This variable can be used to correctly indent tag attributes, as well as tag body contents for tags which are already indented.
  • Page 228: Adding Tag Help

    Chapter 14 Customizing the Development Environment Adding tag Help You can associate an HTML-based Help document with a tag by embedding the Help text inside the block. tagdescription Here is an example of a block and the result in a tag editor: tagdescription <tagdescription height=100>...
  • Page 229: Container And Control Examples

    Container and Control examples Container and Control examples This section contains example code for VTML containers and controls. TabDialog <container name="MainTabDialog" type="TabDialog" width=maximum height=maximum> <container name="TabPage1" type="TabPage" caption="TEXTAREA Tag"> ... embedded controls </container> <container name="TabPage2" type="TabPage" caption="Content"> ... embedded controls </container>...
  • Page 230: Label

    Chapter 14 Customizing the Development Environment <item value="MIDDLE" caption="MIDDLE" selected/> <item value="BOTTOM" caption="BOTTOM" /> </control> </container> <container name="Panel2" type="Panel" caption=" Panel 2 " anchor="Panel1" corner="SW" down=5 width="maximum" height="maximum"> </container> </container> <container name="Advanced" type="TabPage" caption="Advanced"> </container> </container> </editorlayout> ../VTML_Reference/container.html#panel in the VTML Reference for panel syntax and usage information.
  • Page 231: Fontpicker

    Container and Control examples FontPicker <control name="lblFace" type="Label" caption="Font:" down=17 right=10 width=50/> <control name="fontFace" type="FontPicker" anchor="lblFace" corner="NE" width="maximum"/> ../VTML_Reference/control.html#fontpicker in the VTML fontpicker Reference for syntax and usage information. ColorPicker <control name="lblColor" type="Label" caption="Color:" anchor="lblFace" corner="SW" down=11 width=50/> <control name="colorColor" type="ColorPicker" anchor="lblColor" corner="NE"...
  • Page 232: Textarea

    Chapter 14 Customizing the Development Environment ../VTML_Reference/control.html#radiogroup in the VTML radiogroup Reference for syntax and usage information. TextArea <control name="txtContent" type="TextArea" down=5 right=5 width=maximum height=maximum MAXWIDTHPADDING=5 MAXHEIGHTPADDING=5/> ../VTML_Reference/control.html#textarea in the VTML Reference textarea for syntax and usage information. SQLTextArea <container name="TabPage1"...
  • Page 233: Filebrowser

    Container and Control examples FileBrowser <control name="lblSource" type="Label" caption="Source:" down=17 right=10 width=60/> <control name="txtSource" type="FileBrowser" anchor="lblSource" corner="NE" width="maximum" RELATIVE FILTER="*.htm;*.html;*.cfml;*.cfm;*.asp" /> ../VTML_Reference/control.html#filebrowser in the VTML filebrowser Reference for syntax and usage information. Image <control name="imgApplet" type="Image" filepath="Images/Applet.bmp" down=10 right=10 autosize="Yes"/> ../VTML_Reference/control.html#image in the VTML Reference for image...
  • Page 234: Building A Custom Wizard

    HomeSite+ for Dreamweaver MX includes a number of wizards, and you can create your own with the Wizard Markup Language (WIZML). If you have worked with VTML to create or edit tag dialog boxes, you are familiar with building user interface containers and controls and with defining page layout.
  • Page 235: Creating A Wizard Definition Page

    Creating a wizard definition page Creating a wizard definition page The first step in building a custom wizard is to write a VTML file to define the user interface and output parameters. This section describes the VTML tags used in this part of the process, and presents an example definition file.
  • Page 236 Chapter 14 Customizing the Development Environment <PARAM name="bMetaDescr" value="false"> <PARAM name="sMetaDescr" value=""> <PARAM name="bMetaKeywords" value="false"> <PARAM name="sMetaKeywords" value=""> <!--- WIZARD PAGE ---> <!--- attributes page ---> <PAGE name="DocAttribs" type="DYNAMIC" caption="HTML Document Attributes" IMAGE="..\\images\\main.bmp"> <PAGELAYOUT> <control name="lblDocType" type="label" down="10" right="10" width="90" caption="Document Type:"...
  • Page 237 Creating a wizard definition page </PAGELAYOUT> <INPUT name="ddDocType" PARAM="sDocType"> <INPUT name="tbTitle" PARAM="sTitle" REQUIRED="yes" VALIDATIONMSG= "Please enter a document title" or some equivalent message> <INPUT name="chkMetaDescr" PARAM="bMetaDescr"> <INPUT name="tbMetaDescr" PARAM="sMetaDescr"> </PAGE> <!--- attributes page ---> <PAGE name="MetaKeywords" type="DYNAMIC" caption="Meta Keywords" IMAGE="..\\images\\main.bmp"> <PAGELAYOUT>...
  • Page 238: Creating A Wizard Output Template

    Chapter 14 Customizing the Development Environment Creating a wizard output template The Wizard Markup Language (WIZML) enables the customization of files produced by the wizards. WIZML is used inside the templates to dynamically create files based on the data provided by the wizard. For example, if a wizard generates a tag called with a single attribute FILEPATH, the template could look like this: <GIZMO>...
  • Page 239: Wiz Tags

    Creating a wizard output template For syntax and usage information, see ../VTML_Reference/ functions.htmlExpressions and Functions/a in the VTML Reference. WIZ Tags The behavior of wizard output templates is controlled by the use of WIZ tags in the template. These tags are like ColdFusion tags except that they are prefixed with the characters WIZ instead of ColdFusion.
  • Page 240: Wizard Definition Page Library

    Chapter 14 Customizing the Development Environment Wizard definition page library A set of seven page definition files is available in HomeSite+ for Dreamweaver MX. The library can be used to quickly build data access capabilities into wizards. Examples Following are examples of each of the seven wizard definition pages available in the library.
  • Page 241 Wizard definition page library SelectTables <PAGE name="Tables" type="SelectTables" caption="Tables" image="..\\images\\SelectTable.bmp"> <PARAM name="DataSource" value="$${DataSource}"> <PARAM name="ListBoxLabel" value="Select database tables:"> <PARAM name="ListBoxDescription" value="Please specify the tables which will be involved in this application. This should include any tables against which you would like to search or tables containing data that will be displayed on either the Result or Detail pages.\n\nPress Ctrl or Shift together with the mouse click in order to select more than one table.
  • Page 242 Chapter 14 Customizing the Development Environment <INPUT name="lstJoins" param="Joins"> </PAGE> SelectFields <PAGE name="SearchFields" type="SelectFields" caption="Fields for Search page" image="..\\images\\SearchCriteria.bmp"> <PARAM name="DataSource" value="$${DataSource}"> <PARAM name="Tables" value="$${Tables}"> <PARAM name="ListBoxLabel" value="Select the search fields:"> <PARAM name="ListBoxDescription" value="Choose all fields that should be included as search criteria on the Search page.
  • Page 243: Chapter 15 Scripting The Visual Tools Object Model

    • Application developers can call HomeSite+ for Dreamweaver MX functionality for use in their applications. This chapter describes how to write and execute scripts in HomeSite+ for Dreamweaver MX. It also provides the syntax and examples of the objects in HomeSite+ for Dreamweaver MX.
  • Page 244: Writing And Executing Scripts

    Application.ActiveDocument.SaveAs(CurrentFolder + '\\' + sFile); Writing a script For a script to be executable from within HomeSite+ for Dreamweaver MX, it must contain a Main routine. In JScript, create a function Main; in VBScript, create a Sub Main routine. Without this routine, the script fails.
  • Page 245: Executing A Script

    If the file extension is BAS, VB, or VBS, the VBScript engine executes the script. Otherwise, the program uses the JScript engine. To automate HomeSite+ for Dreamweaver MX tasks, you must familiarize yourself with the Visual Tools Object Model (VTOM). The main object is the Application object.
  • Page 246: Creating A Custom Toolbutton Or Toolbar

    Chapter 15 Scripting the Visual Tools Object Model Creating a custom toolbutton or toolbar After you write a script, you can create a custom toolbutton to execute the script from within the program. If you intend to write multiple scripts, you can create a toolbar for them.
  • Page 247: Application Object

    Syntax ApplicationType: integer (read-only) Description The current application type. Sample ApplicationType script //**********************************// // Tests Application.ApplicationType property // 0 = HomeSite // 1 = CF Studio // 2 = JRun Studio //********************************// function Main(){ var iAppType; var sMessage; with (Application) {...
  • Page 248 Chapter 15 Scripting the Visual Tools Object Model default: { sMessage = 'an unknown application type'; }MessageBox('You are enjoying ' + sMessage + '.', 'Application Type', 0); AppPath Syntax AppPath: OleString (read-only) Description Path to application executable. Example function Main() { var sPath;...
  • Page 249 Application object Sample CurrentView script //**********************************************************// This script switches the views inside the application //*********************************************************// function Main () { var sMessage; with (Application) { CurrentView = 1; sMessage = "You are now in Edit View of your " + VersionText; MessageBox (sMessage, VersionText, 0);...
  • Page 250 Chapter 15 Scripting the Visual Tools Object Model DocumentCount Syntax DocumentCount: integer (read-only) Description Number of open documents. Example function Main() { Var sMessage; with (Application){ sMessage = "There are "; sMessage = sMessage + sDocumentCount + " open.\n"; // Get the number of open documents. sMessage = sMessage + sDocumentIndex + ".\n";...
  • Page 251 Handle to the main window. IsColdFusionStudio Syntax IsColdFusionStudio: WordBool (read-only) Description Boolean. Returns if the application is ColdFusion Studio or JRun Studio, True False if HomeSite. Example function Main(){ with (Application){ if (IsColdFusionStudio){ // Show CF Advanced toolbar ShowToolBar('CFML Advanced');...
  • Page 252 Chapter 15 Scripting the Visual Tools Object Model Left Syntax Left: integer Description Left (x-coordinate) of main window. Example function Main() { Var sMessage; with (Application){ sMessage = "Top-left corner of your Window has the following coordinates: \n"; sMessage = sMessage + "Top: " + Top + "\n"; // Get top sMessage = sMessage + "Left: "...
  • Page 253 Application name and version. Example function Main() { Var sMessage; with (Application){ If (IsColdFusionStudio){ sMessage = "You are running ColdFusionStudio - " + VersionText; MessageBox(sMessage,"Sample",0); Else{ sMessage = "You are running HomeSite - " + VersionText; MessageBox("You are Running HomeSite", "Sample", 0);...
  • Page 254: Methods

    Chapter 15 Scripting the Visual Tools Object Model Width Syntax Width: integer Description Width in pixels of the main application window. Use this property with the Height property to return the size of the main window as well as to resize the window. WindowState Syntax WindowState: integer...
  • Page 255 Application object BrowseText Syntax BrowseText(sText, BaseHREF: OleVariant); Description Displays the passed text in the internal browser. Use the parameter to BaseHREF interpret relative paths. For local files, is the folder that contains the file. BaseHREF Example function Main() { Var sMessage; sMessage = "You are viewing this text in the browse mode of your ";...
  • Page 256 Chapter 15 Scripting the Visual Tools Object Model ExtractFileName Syntax ExtractFileName(const wsFile: WideString): WideString; Description Returns only the file portion of the passed filename. Example function Main() { Var sFullFilePath; Var sFileName; sFullFilePath = "C:/Temp/MyScript.js" with (Application){ sFileName = ExtractFileName(sFullFilePath); // Returns 'MySript.js' ExtractFilePath Syntax...
  • Page 257 Application object ActiveDocument.InsertText('<p></p>', false); GetImageHeight Syntax GetImageHeight(const wsImageName: WideString): Integer; Description Returns the height in pixels of the passed image. Returns on error. Example Tests GetImageHeight, GetImageWidth Looks for first GIF image in current directory function Main(){ with (Application) { aFileObj= new ActiveXObject("Scripting.FileSystemObject");...
  • Page 258 Chapter 15 Scripting the Visual Tools Object Model GetImageSize Syntax GetImageSize(const wsImageFile: WideString; var nHeight, nWidth: Integer): WordBool; Description Boolean. Retrieves the size of the passed image. Returns on error. False Example function Main() { Var sFullImagePath; Var Height; Var Width; sFullImagePath = "C:/Temp/photos/MyPic.jpg";...
  • Page 259 Application object GetRelativePath Syntax GetRelativePath(const wsBaseURL, wsFolderURL: WideString): WideString; Description Returns the relative path of a folder given a base URL. For example, GetRelativePath ("http://www.macromedia.com/", "http:// www.macromedia.com/software/") returns "products/". Example function Main() { Var sFullPath1; Var sRelativePath; Var sFullPath2; sFullPath1 = "http://www.macromedia.com/"; sFullPath2 = "http://www.macromedia.com/software";...
  • Page 260 Chapter 15 Scripting the Visual Tools Object Model GetURL Syntax GetURL(const wsURL: WideString): WideString; Description Retrieves a URL and returns its contents. Example function Main() { Var sURL; Var sContents; sURL = "http://www.macromedia.com/"; with (Application){ sContents = GetURL(sURL); // Storing HTML code of the URL in sContents GetURLResponse Syntax GetURLResponse(const wsURL: WideString): WideString;...
  • Page 261 Application object GetURLStatus Syntax GetURLStatus(const wsURL: WideString; var vResponse: OleVariant): Integer; Description Returns the HTTP status code for the passed URL. The text of the server response is returned in the second parameter. GetURLStatusCode Syntax GetURLStatusCode(const wsURL: WideString): Integer; Description Returns the status code for the passed URL.
  • Page 262 Chapter 15 Scripting the Visual Tools Object Model HTMLGetAttribute Syntax HTMLGetAttribute(const wsInTag, wsAttr: WideString): WideString; Description Returns the value for a particular attribute of a tag. For example, HTMLGetAttribute("&lt;TABLE WIDTH=100&gt;", "WIDTH"); returns 100. Example function Main(){ var sWidth; with (Application){ // Get width attribute of a table tag sWidth = HTMLGetAttribute("<table width=100>", "width");...
  • Page 263 Application object with (Application) { sInput = InputBox(VersionText, "What is your name?", "Alex"); sOutput = "I know you, your name is " + sInput + "."; MessageBox (sOutput, VersionText, 0); InstallParserScript Syntax InstallParserScript(const wsScriptFile, wsFileExtAssoc: WideString): WordBool; Description Boolean. Returns on error.
  • Page 264 Chapter 15 Scripting the Visual Tools Object Model LogMemoryStatus Syntax LogMemoryStatus(const wsLogFile, wsDescrip: WideString); Description Writes the current memory status to a log file, Creates wsLogFile: logfilename. the file if it does not exist, otherwise appends status to the file. The description text for the entry is entered in wsDescrip: text Example...
  • Page 265 Application object Example function Main() { Var sInput; Var sOutput; with (Application) { sInput = InputBox(VersionText, "What is your name?", "Alex"); sOutput = "I know you, your name is " + sInput + "."; MessageBox (sOutput, VersionText, 0); NewDocument Syntax NewDocument(wbUseDefaultTemplate: WordBool);...
  • Page 266 Attempts to exit from or quit the program. Prompts the user to save any unsaved documents prior to quitting. Example function Main(){ var MB_YESNO = 4; var IDYES = 6; with (Application){ if (MessageBox('Exit HomeSite?', 'Confirmation Message', MB_YESNO) == 6){ Quit();...
  • Page 267 Application object RunCodeSweeper Syntax RunCodeSweeper(); Description Runs the CodeSweeper on the current document using the active CodeSweeper. To change the active CodeSweeper, use SetActiveCodeSweeper Example function Main() { with (Application) { RunCodeSweeper (); SaveAll Syntax SaveAll(): WordBool; Description Boolean. Saves all open documents. Returns if successful.
  • Page 268 Chapter 15 Scripting the Visual Tools Object Model SetActiveCodeSweeper Syntax SetActiveCodeSweeper(const wsFileName: WideString): WordBool; Description Changes the active CodeSweeper format file. Example function Main(){ var sCS_File = 'C:\\Program Files\\Macromedia\\ColdFusion Studio 5\\Extensions\\CodeSweepers\\WebXML.vtm'; with (Application){ SetActiveCodeSweeper(sCS_File); SetActiveResults Syntax SetActiveResults(resType: TCurrentResultsType); Description Boolean. Sets the active page in the Results tab. The following values are allowed: resSearch resValidator...
  • Page 269 Application object Example function Main(){ var sFolder1 = 'C:\\Program Files\\Bradbury\\TopStyle2'; var sFolder2 = 'C:\\InetPub\\wwwroot'; with (Application) { SetFileTabFolder(1, sFolder1); SetFileTabFolder(2, sFolder2); SetProgress Syntax SetProgress(nProgress: Integer); Description Sets the position of the progress bar in the status area. The values are allowed: 1-100 Example function Main() {...
  • Page 270 Chapter 15 Scripting the Visual Tools Object Model ShellToAppAndWait Syntax ShellToAppAndWait(const wsAppFileName: WideString); Description Boolean. Same as but waits for the external program to close before ShellToApp returning. The application is locked until returns, so use this ShellToAppAndWait method with caution. Example function Main(){ with (Application){...
  • Page 271 Application object Example function Main(){ with (Application){ if (ActiveDocument.Modified){ StatusError('Current document is modified'); StatusWarning Syntax StatusWarning(const wsMsg: WideString); Description Displays a warning message in the status bar. Message appears on a blue background and displays for at least 5 seconds. Example function Main(){ with (Application){...
  • Page 272: Toolbar And Toolbutton Methods

    Chapter 15 Scripting the Visual Tools Object Model Wait Syntax Wait(nMilliseconds: Integer); Description Pauses for given number of milliseconds. Use Wait to enable scripts to execute loops, yet still allow access to the UI. Without the call to Wait in the loop, the application appears locked and the user cannot change views.
  • Page 273 Application object AddScriptToolbutton Syntax AddScriptToolbutton(wsToolbarName, wsScriptFile, wsHint, wsCaption, wsImageFile: WideString): WordBool; Description Boolean. Adds a script toolbutton (executes passed JScript or VBScript file when clicked) to the passed toolbar. Fails if toolbar does not exist. Returns if a True toolbutton already exists, but does not add a duplicate toolbutton. Example function Main() { Var sToolBarName = "MyToolBar";...
  • Page 274 Chapter 15 Scripting the Visual Tools Object Model with (Application){ AddVTMToolbutton('Common', sVTM_File, 'Block quote', 'BQ', ''); CreateToolbar Syntax CreateToolbar(wsToolbarName: WideString): WordBool; Description Boolean. Creates a new, undocked toolbar of the passed name. Fails if the toolbar of the same name already exists. Example function Main() { Var sToolBarName = "MyToolBar";...
  • Page 275 Application object SetToolbarDockPos Syntax SetToolbarDockPos(wsToolbarName: WideString; nDockPos: Integer): Word- Bool; Description Boolean. Sets the docking position of the toolbar. Fails if the toolbar does not exist. The following values for are allowed: nDockPos 1 = Top 2 = Bottom 3 = Left 4 = Right Example function Main(){...
  • Page 276 Chapter 15 Scripting the Visual Tools Object Model Sample toolbar script 1 //******************************************************// // This script creates a toolbar named Apps if one does not exist, // then adds two custom toolbuttons to it. The first toolbutton // launches Windows Explorer, the second one opens Windows Explorer // at the current folder in the Editor.
  • Page 277 Application object Sample toolbar script 2 //*************************************************************// // This script creates a toolbar which is capable of executing // all of the scripts contained in the Document Cache //*************************************************************// function Main () { var sToolBarName; var Result; var count; var fname; var fnamepath;...
  • Page 278: Activedocument Object

    Chapter 15 Scripting the Visual Tools Object Model ActiveDocument object Use the object to refer to the document currently displayed in the ActiveDocument Editor. To access an open document that is not active, use the object. Application.DocumentCache Properties CanRedo Syntax CanRedo: WordBool (read-only) Description Boolean.
  • Page 279 ActiveDocument object CaretPosX Syntax CaretPosX: integer (read-only) Description The X-axis caret position. Example function Main(){ with (Application){ if (ActiveDocument.CaretPosX > 1){ ActiveDocument.CursorLineStart(false); CaretPosY Syntax CaretPosY: integer (read-only) Description The Y-axis caret position. Example function Main(){ with (Application){ if (ActiveDocument.CaretPosY > 1){ ActiveDocument.CursorDocStart(false);...
  • Page 280 Chapter 15 Scripting the Visual Tools Object Model LineCount Syntax LineCount: integer (read-only Description Number of lines in the current document. Example function Main() { var sMessage; sMessage = "Your file line count is: "; with (Application) { sMessage = sMessage + ActiveDocument.LineCount; MessageBox(sMessage, VersionText, 0);...
  • Page 281 ActiveDocument object MessageBox(sMessage, VersionText, 0); ReadOnly Syntax ReadOnly: WordBool (read-only) Description Boolean. Returns if the current document is read-only. True Example function Main(){ with (Application){ if (ActiveDocument.ReadOnly){ MessageBox('Current document is Read-Only', 'Information', 0); SelLength Syntax SelLength: integer Description Gets and sets the length of the current selection. Example function Main() { var sMessage;...
  • Page 282: Methods

    Chapter 15 Scripting the Visual Tools Object Model SelText Syntax SelText: OleString Description Gets and sets the text in the current selection. Example function Main() { var sMessage; sMessage = "The length of the selected text of your document is "; with (Application) { sMessage = sMessage + ActiveDocument.SelText;...
  • Page 283 ActiveDocument object Clear Syntax Clear(); Description Clears all text from the current document. Close Syntax Close(wbPromptToSave: WordBool): WordBool; Description Boolean. Closes the current document. If , the user is wbPromptToSave True prompted to save any changes. Returns if the document was closed (that is, the True user didn’t cancel saving changes).
  • Page 284 Chapter 15 Scripting the Visual Tools Object Model finally{ ActiveDocument.EndUpdate(); MessageBox('Total tags: ' + iTags, 'Tag Count', 0); GetCaretPos Syntax GetCaretPos(var x, y: integer); Description Returns the caret pos (x=column, y=line). GetCurrentChar Syntax GetCurrentChar(): OleVariant; Description Returns the current character. GetNextChar Syntax GetNextChar(): OleVariant;...
  • Page 285 ActiveDocument object GotoNextEndTag Syntax GotoNextEndTag(wbSelect: WordBool): WordBool; Description Boolean. Moves the next end tag, and selects it if . Returns wbSelect True False no tag found. GotoNextStartTag Syntax GotoNextStartTag(wbSelect: WordBool): WordBool; Description Boolean. Moves the next starting tag and selects it if .
  • Page 286 Chapter 15 Scripting the Visual Tools Object Model Description Boolean. Inserts the passed tag pair at the current cursor position, overwriting the selection if . The cursor is positioned between the wbOverwriteSelection True start and end tags after this operation. If , the tags wbOverwriteSelection False...
  • Page 287 ActiveDocument object Reload Syntax Reload(wbPromptToSave: WordBool); Description Boolean. Reloads the current document. If prompts the wbPromptToSave True, user to save changes. ReplaceAll Syntax ReplaceAll(strSearch, strReplace: OleVariant; bMatchCase: WordBool): Integer; Description Boolean. Replaces all occurrences of with , matching case if strSearch strReplace .
  • Page 288 Chapter 15 Scripting the Visual Tools Object Model SelectAll Syntax SelectAll(); Description Selects all the text in the current document. SelectCurrentLine Syntax SelectCurrentLine(); Description Highlights the current line. SelectLine Syntax SelectLine(Index: Integer); Description Highlights the passed line. SetCaretPos Syntax SetCaretPos(x, y: Integer); Description Sets the current column/line.
  • Page 289: Documentcache Object

    DocumentCache object It is very important to understand the DocumentCache object when using the VTOM. Although HomeSite+ for Dreamweaver MX enables you to open dozens of files at once, only the current document stays in memory. When a document becomes inactive, that is, when the user switches to a different document in the Document window, the previously current document is cached to conserve resources.
  • Page 290 Chapter 15 Scripting the Visual Tools Object Model Example function Main() { var sMessage; sMessage = "Your filename is: "; with (Application) { sMessage = sMessage + DocumentCache (0).Filename; Modified Syntax Modified: WordBool (read-only) Description Boolean. Returns if the cached document changed since it was last saved. True Example function Main() {...
  • Page 291 DocumentCache object Text Syntax Text: OleString (read-only) Description File contents of the cached document. Example function Main() { var sMessage; sMessage = "Your document contains the following text: \n"; with (Application) { sMessage = sMessage + DocumentCache (0).Text;...
  • Page 292: Project Object

    Chapter 15 Scripting the Visual Tools Object Model Project object object provides a basic set of properties and methods for scripting Project project maintenance tasks. objects extend the capabilities of the ProjectManager DeploymentManager object. For more information, see “ProjectManager object” on page 274 Project “DeploymentManager object”...
  • Page 293 Project object ShowLastProjectError Syntax ShowLastProjectError(); Description Displays an error message for the last project-related error. UploadProject Syntax UploadProject(const wsTargetDir: WideString; const wbForceLCase, wbUp- loadOnlyNewer, wbEncryptCFML: WordBool): WordBool; Description Boolean. Uploads a project based on the passed criteria. The wbEncryptCFML parameter is specific to ColdFusion Studio. UploadProjectDlg Syntax UploadProjectDlg(): WordBool;...
  • Page 294: Projectmanager Object

    Description The number of files in the project. IsDirty Syntax IsDirty: WordBool (read-only) Description Boolean. Differences exist between the project as viewed in HomeSite+ for Dreamweaver MX and the underlying disk structure. IsFileSelected Syntax IsFileSelected: WordBool (read-only) Description Boolean. Selects the file in the project.
  • Page 295 ProjectManager object AddFolder Syntax AddFolder(Folder: OleVariant; FolderType: TFolderType; FolderPath: Ole- Variant; Parent: OleVariant); Description Adds a new folder to the project root. To add a subfolder to an existing folder, use a folder-level method. CheckedIn Syntax CheckedIn: WordBool; Description Boolean. Checks a project into source control. CreateProject Syntax CreateProject(ProjectName: OleVariant;...
  • Page 296: Folder Methods

    Chapter 15 Scripting the Visual Tools Object Model RemoveFolder Syntax RemoveFolder(FolderName: OleVariant); Description Removes a folder from the project. Save Syntax Save; Description Saves the current project to disk in WDDX format. SelectFile Syntax SelectFile(Filename: OleVariant); Description Selects a file for source control operations. Folder methods FolderAddFile Syntax...
  • Page 297 ProjectManager object FolderDeployTarget Syntax FolderDeployTarget(Folder: OleVariant; FolderType: Integer; FolderTarget: OleVariant); Description Gets the folder deployment target and type. FolderFileCount Syntax FolderFileCount(Folder: OleVariant): Integer; Description Counts the number of files in the project folder. FolderRemoveFile Syntax FolderRemoveFile(Folder: OleVariant; Filename: OleVariant); Description Removes file from specified folder.
  • Page 298: Deployment Methods

    Chapter 15 Scripting the Visual Tools Object Model Deployment methods DeploymentScriptAdd Syntax DeploymentScriptAdd: OleVariant; Description Adds a deployment script to the project. DeploymentScriptCount Syntax DeploymentScriptCount: Integer; Description Returns the number of scripts. DeploymentScriptList Syntax DeploymentScriptList: OleVariant; Description Lists all project deployment scripts. DeploymentScriptRemove Syntax DeploymentScriptRemove(ScriptName: OleVariant);...
  • Page 299 ProjectManager object DeploymentServerRemove Syntax DeploymentServerRemove(ServerName: OleVariant); Description Removes a deployment server from a project.
  • Page 300: Deploymentmanager Object

    Chapter 15 Scripting the Visual Tools Object Model DeploymentManager object object is a scriptable interface to the Project Deployment DeploymentManager engine. The object provides a collection of methods and DeploymentManager properties that enable you to write highly customized scripts to control the deployment process.
  • Page 301: Methods

    DeploymentManager object ServerCount Syntax ServerCount: Integer (read-only) Description Counts the deployment servers associated with the current open project, including any new servers that were added temporarily using the method. AddServer UploadOnlyIfNewer Syntax UploadOnlyIfNewer: WordBool (read-write) Description Boolean. Determines whether the deployment engine only uploads a file if it has a newer date/time stamp than the target file.
  • Page 302 Chapter 15 Scripting the Visual Tools Object Model CopyFile Syntax CopyFile(const SourceFile: WideString; const TargetFile: WideString): Integer; Description Copies the source file to the target file location. CopyFileExtended Syntax CopyFileExtended(const SourceFile: WideString; const TargetFile: Wide- String; CreateFolder: WordBool; UploadOnlyIfNewer: WordBool; cryptCFML: WordBool): Integer;...
  • Page 303 DeploymentManager object such as "Rds://localhost/D:/main/images/TestImage.jpg" which you can pass as the second argument to the method. UploadFile GetFolderDeployPath Syntax GetFolderDeployPath(const wsFolderName:String): WideString; Description Returns the deployment path of the passed folder name. Use this path in conjunction with the methods. GetDeployServerName GetFolderName GetFolderFileCount...
  • Page 304 Description Changes the name of a generated deployment log file. The default name is Deployment.log and its default location is the main installation directory for HomeSite+ for Dreamweaver MX. Specify a fully qualified path and filename. SetLogging Syntax SetLogging(bDoLogging: WordBool);...
  • Page 305: Project Folder Names

    DeploymentManager object UploadFile Syntax UploadFile(const wsFile:Widestring, sTargetFile: WideString); Description Uploads an individual file to the server. The first represents the fully OleString qualified path of an individual file to upload. The second represents the OleString fully qualified target name, such as rds://localhost/main/index.html. UploadProject Syntax UploadProject(const wsProjectName: WideString);...
  • Page 306 Chapter 15 Scripting the Visual Tools Object Model // =================================================================== // Server List: // Local Deployment // =================================================================== function Main() var app = Application; var DeploymentManager = Application.DeploymentManager; var i,j,n, sServerName,sFolderName,sDeployPath,sFromFile,sTargetFile; //================================================================== // Logging Options //================================================================== DeploymentManager.SetLogging(true); DeploymentManager.SetLogFileName("C:\\Program Files\\Macromedia\\ColdFusion Studio 5\\Deployment.log"); //================================================================== // End Logging Options // ================================================================...
  • Page 307 DeploymentManager object // =========================================================== Iterate through Project Folders //=========================================================== for (j=0; j <= DeploymentManager.FolderCount-1; j++) { sFolderName = DeploymentManager.GetFolderName(j); sDeployPath = DeploymentManager.GetFolderDeployPath(j); //========================================================= isFolderDeployable reflects the Deployment Options you //chose for the folder //========================================================== if (DeploymentManager.IsFolderDeployable(sFolderName)) { // ===================================================== // Iterate through Folder Files //======================================================= for (n=0;...
  • Page 308: Httpprovider Object

    Chapter 15 Scripting the Visual Tools Object Model HTTPProvider object object is a general purpose HTTP protocol object. You can use it HTTPProvider in VTOM scripts for low-level HTTP operations. The object is an HTTPProvider alternative to simplified HTTP-related methods, such as the method of the GetURL main Application object, which has a limited number of customizable HTTP...
  • Page 309 HTTPProvider object Description Sets and gets the Content-Type entity-header field, which indicates the media type of the Entity-Body sent to the recipient. For the method, indicates the media HEAD type that is sent if the request is a Cookie Syntax Cookie: OleVariant Description Sets and gets the Cookie header element.
  • Page 310 Chapter 15 Scripting the Visual Tools Object Model MultiThreaded Syntax MultiThreaded: WordBool Description Boolean. Sets and gets whether the HTTPProvider uses multithreading when executing HTTP requests. NoCache Syntax NoCache: WordBool Description Boolean. Sets and gets the NoCache request-header field. Password Syntax Password: OleVariant Description...
  • Page 311 HTTPProvider object RcvdCount Syntax RcvdCount: Integer (read-only) Description The size of the content stream received from the server. Use this property to display progress during asynchronous operations. Use the property ContentLength value extracted from the document header to get the total length of the incoming content stream.
  • Page 312 Chapter 15 Scripting the Visual Tools Object Model Reference Syntax Reference: OleVariant Description Sets and gets the Referer request-header field. This field allows the client to specify, for the server’s benefit, the address (URI) of the resource from which the Request-URI was obtained.
  • Page 313: Methods

    HTTPProvider object StatusCode Syntax StatusCode: Integer (read-only) Description The HTTP request Status-Code element. This is a 3-digit integer result code of the attempt to understand and satisfy the request. Syntax URL: OleVariant Description Sets and gets the URL location of the resource on which an HTTP method is to be applied.
  • Page 314 Chapter 15 Scripting the Visual Tools Object Model httpPro.URL = "http://www.macromedia.com"; httpPro.Get(); app.MessageBox( httpPro.ReceivedHeaderAsString ,"Received HTTP Header", hsOKInfo); app.MessageBox( "URL=’ "+ httpPro.URL + "‘\n" + "ProxyUsername=’" + httpPro.Username + "‘\n" + "ProxyPassword=’" + httpPro.Password + "‘\n" + "Proxy=’" + httpPro.Proxy + "‘\n" + "ProxyPort=’"...
  • Page 315 HTTPProvider object HeadAsync Syntax HeadAsync(); Description Performs an HTTP method request asynchronously. HEAD Post Syntax Post(); Description Performs an HTTP method request. POST Sample POST script Example //*******************************************// // This script illustrates a POST method by which // three FORM variables are submitted to a ColdFusion page. //***********************************************// function Main () { var app = Application;...
  • Page 316 Chapter 15 Scripting the Visual Tools Object Model The following error messages are predefined. Check for the error strings to detect these error cases: • File already exits—Returned when file specified in FilePath exists and is set to bOverwrite False •...
  • Page 317 HTTPProvider object with (Application){ if (HTTPProvider.State == 0){ // Set the URL property of HTTPProvider Object. HTTPProvider.URL = InputBox(VersionText, "Please Enter the URL.", "http://www.yahoo.com"); // Perform HTTP Get Request HTTPProvider.Get(); sSource = ''; if (HTTPProvider.ReasonPhrase == "OK") // Check if the requested URL can be displayed sSource = HTTPProvider.ReceivedStreamAsString;...
  • Page 318: Zipprovider Object

    PKZIP services object used by ZIPProvider HomeSite+ for Dreamweaver MX for ZIP file composition and extraction. You can use this object in your VTOM scripts for low-level PKZIP operations from within HomeSite+ for Dreamweaver MX. Because Macromedia uses a licensed control for...
  • Page 319: Methods

    ZIPProvider object ZIPComment Syntax ZIPComment: OleVariant Description Sets and gets the comment for the archive file. Use this property to read a comment of an existing archive file, or set the comment for a new archive file that you created. ZIPFile Syntax ZIPFile: OleVariant...
  • Page 320 Chapter 15 Scripting the Visual Tools Object Model breaks. The function returns a status code that can be investigated to determine the success of the operation. Sample Add script Example function Main () { var hsOKInfo = 64; var app = Application; var ZIPPro = app.ZIPProvider;...
  • Page 321 ZIPProvider object else if (nStatusCode == 410){sMessage = "ErrorMultidisk";} else if (nStatusCode == 420){sMessage = "ErrorWrongDisk";} else if (nStatusCode == 430){sMessage = "ErrorMultidiskBadCall";} else if (nStatusCode == 440){sMessage = "ErrorCantOpenBinary";} else if (nStatusCode == 450){sMessage = "ErrorCantOpenSfxConfig";} else if (nStatusCode == 460){sMessage = "ErrorInvalidEventParam";} else if (nStatusCode == 470){sMessage = "ErrorCantWriteSfx";} else if (nStatusCode == 490){sMessage = "ErrorBinaryVersion";}...
  • Page 322 Chapter 15 Scripting the Visual Tools Object Model FileIsHidden Syntax FileIsHidden(nIndex: Integer): WordBool; Description Boolean. Use this function to determine whether a specific element in an archive is a hidden file. The value can be from index FileCount-1 FileIsReadOnly Syntax FileIsReadOnly(nIndex: Integer): WordBool;...
  • Page 323 ZIPProvider object // Loop through the contents of the ZIP file for ( x = 0; x &lt; ZIPPro.FileCount; x++ ) { if ( ZIPPro.FileName(x) == 'cfabort.vtm' ) { app.MessageBox( &quot;File found in the archive.&quot;,&quot;ZIPProvider&quot;, hsOKInfo); FileSize Syntax FileSize(nIndex: Integer): Double; Description Returns the size of an existing archive file element (file/directory/volume) by index.
  • Page 324: Activescripting Examples

    Chapter 15 Scripting the Visual Tools Object Model ActiveScripting examples JScript <html> <head> <title>JScript Example</title> </head> <body> <pre> //*****************************************************// // ActiveScripting example (JScript) //*****************************************************// // Generates a table of the filenames of all open documents, // listing their modified status and read-only property. //****************************************************// function Main (){ var newline;...
  • Page 325 ActiveScripting examples //Is this document Modified? if (DocumentCache (count).Modified) sTable = sTable + '<center> Yes'+'</td><td></center>'; else sTable = sTable + '<center> No' + '</td><td></center>'; //Is this document Read-Only? if (DocumentCache (count).ReadOnly) sTable = sTable + '<center>Yes'+ '</td><td></center> '; else sTable = sTable + '<center>No' + '</td><td></center> '; // close row.
  • Page 326: Vbscript

    = "<br>" tab = chr(9) ‘ create app reference. note that the Application object is only ‘ available from within HomeSite and Studio - to create the app object from an ‘ external script, use CreateObject("AllaireClientApp.TAllaireClientApp") set app = Application ‘...
  • Page 327 ActiveScripting examples ‘ is this document modified? if app.DocumentCache(idx).Modified then sTable = sTable + "Yes" sTable = sTable + "</td><td>" ‘ is this document read-only? if app.DocumentCache(idx).ReadOnly then sTable = sTable + "Yes" ‘ close row sTable = sTable + "</td></tr>" + newline next sTable = sTable + newline + "</table>"...
  • Page 328: Third-Party Add-Ins

    At start-up, the program executes any scripts it finds listed in this Windows Registry key: HKEY_CURRENT_USER\Software\Macromedia\HomeSite+\RunOnce You can create this key and enter the script name. After this key is read, the program deletes the entries so that they do not execute again.
  • Page 329 Third-party add-ins Toolbutton", "SC", "" ’ add VTM toolbutton app.AddVTMToolbutton TB_NAME, app.AppPath + "Extensions\TagDefs\HTML\div.vtm" , "VTM Toolbutton", "VT", "" End Sub...
  • Page 330 Chapter 15 Scripting the Visual Tools Object Model Table of CommandID values The following table lists the set of currently exposed commands. For backward compatibility, these values will not change, but some value might become obsolete and be removed from the set. Command ID Value CMDID_cmdNone...
  • Page 331 Table of CommandID values Command ID Value CMDID_cmdCursorDocStart CMDID_cmdCursorDocEnd CMDID_cmdCursorLineStart CMDID_cmdCursorLineEnd CMDID_cmdEditBackspace CMDID_cmdEditCut CMDID_cmdEditCopy CMDID_cmdEditPaste CMDID_cmdEditUndo CMDID_cmdEditRedo CMDID_cmdEditRepeatLastTag CMDID_cmdEditCodeFormat // CodeSweeper CMDID_cmdEditToggleInsertMode CMDID_cmdEditDelete CMDID_cmdEditDeleteLine CMDID_cmdEditDeleteToEOL CMDID_cmdEditDeleteWordLeft CMDID_cmdEditDeleteWordRight CMDID_cmdEditSelectAll CMDID_cmdEditConvertTagCase CMDID_cmdEditGotoLine CMDID_cmdEditGotoPreviousStartTag CMDID_cmdEditGotoNextStartTag CMDID_cmdEditGotoPreviousEndTag CMDID_cmdEditGotoNextEndTag CMDID_cmdEditCurrentTag CMDID_cmdEditWordWrap CMDID_cmdEditSetBookmark CMDID_cmdEditGotoNextBookmark CMDID_cmdEditTriggerCodeTemplates CMDID_cmdEditIndent CMDID_cmdEditUnindent CMDID_cmdSelectionConvertToUL CMDID_cmdSelectionConvertToOL...
  • Page 332 Chapter 15 Scripting the Visual Tools Object Model Command ID Value CMDID_cmdSelectionAddBR CMDID_cmdSelectionStripTags CMDID_cmdSelectionUCase CMDID_cmdSelectionLCase CMDID_cmdSearchFind CMDID_cmdSearchReplace CMDID_cmdSearchAgain CMDID_cmdSearchFindEx CMDID_cmdSearchReplaceEx CMDID_cmdSearchFindMatchingTag CMDID_cmdSearchReplaceDoubleSpacing CMDID_cmdSearchReplaceExtChars CMDID_cmdToolsTagChooser CMDID_cmdToolsSpellCheck CMDID_cmdToolsSpellCheckAll CMDID_cmdToolsSpellMark CMDID_cmdToolsDocumentWeight CMDID_cmdToolsThumbnails CMDID_cmdToolsVerifyLinks CMDID_cmdToolsValidateDoc CMDID_cmdToolsValidateTag CMDID_cmdToolsPalette CMDID_cmdToolsExecAsScript CMDID_cmdToolsStyleEditor CMDID_cmdToolsScriptWizard CMDID_cmdToolsTableSizer CMDID_cmdViewFullScreen CMDID_cmdViewToggleResTab CMDID_cmdViewToggleResTabFocus CMDID_cmdViewPreviousDocument CMDID_cmdViewNextDocument CMDID_cmdViewInternalBrowser...
  • Page 333 Table of CommandID values Command ID Value CMDID_cmdViewEditSource CMDID_cmdViewToggleEditPreview CMDID_cmdViewToggleEditDesign CMDID_cmdViewToggleTagInspectorFocus CMDID_cmdViewToggleSpecialChar CMDID_cmdViewTagInsight CMDID_cmdViewTagTip CMDID_cmdViewEditorToolbar CMDID_cmdViewEditorTab CMDID_cmdViewToggleQuickBar CMDID_cmdViewResults CMDID_cmdOptionsSettings CMDID_cmdOptionsCustomize CMDID_cmdOptionsOrganizeQuickBar CMDID_cmdOptionsCodeFormatSettings CMDID_cmdLinkBotVerifyPage CMDID_cmdLinkBotVerifyProject...
  • Page 334 Chapter 15 Scripting the Visual Tools Object Model Table of SettingID values The following table lists currently exposed setting IDs. For backward compatibility, these values will not change, but some might become obsolete and be removed from the set. Setting ID Value Description SET_FLAG_READONLY_FILES Flag read-only files in the file...
  • Page 335 Table of SettingID values Setting ID Value Description SET_MSIE_AUTO_REFRESH Automatically refresh MSIE after navigating (needed for IE3.x) SET_ANCHORDLG_NAMES Show named links in anchor dialog box SET_USE_SHORT_TEMPFILE_NAME Use short filename for temp files when shelling to external browser SET_RESTORE_FILES Restore files at startup SET_FILE_FILTER File filter for file list SET_REMOTE_FILE_FILTER...
  • Page 336 Chapter 15 Scripting the Visual Tools Object Model Setting ID Value Description SET_USE_CSE_VALIDATOR Use CSE validator for full-page validation.Never change the key for this setting, because Alsoft may update it during the CSE install SET_SHOW_EDITORTOOLBAR Show Editor toolbar SET_SHOW_EDITORTAB Show the tabset below the Editor SET_WARNING_BEEP Beep when a warning message...
  • Page 337 Table of SettingID values Setting ID Value Description SET_SHOW_SKIPPED_FILES dxSearchResults.AddSkipItem _IN_SEARCH SET_LOWERCASE_LINKS Lowercase IMG, A, and other dropped links SET_ALLOW_MULTIPLE_INSTANCES Only for debugging. Multiple instances use same reg settings and would conflict SET_CLOSE_PARA_TAGS Add </p> when <p> toolbutton is clicked SET_PROMPT_ON_UNKNOWN_FILES Show warning before opening unknown files...
  • Page 338 Chapter 15 Scripting the Visual Tools Object Model Setting ID Value Description SET_USE_VTM_IMAGE_DIALOG Use vtml image dialog SET_USE_VTM_ANCHOR_DIALOG Use vtml anchor dialog SET_USE_VTM_BODY_DIALOG Use vtml body dialog SET_TEMPFILE_PREFIX Prefix to use for temp files SET_FILELIST_COLS_ACTIVE Set local columns as active SET_FILELIST_COL_SIZES Local FileList Column Size Settings...
  • Page 339 Table of SettingID values Setting ID Value Description SET_DIR_WIZARDS Set location of wizard root directory SET_DIR_CUSTOM_TEMPLATES Set location of custom templates directory SET_DIR_OLD_TEMPLATES Set location of old templates directory SET_DIR_OLD_TAGEDITORS Set location of old tag editors directory SET_DIR_EXTENSIONS Set location of extensions directory SET_DIR_TAGDEFS Set location of tag definitions...
  • Page 340 Chapter 15 Scripting the Visual Tools Object Model Setting ID Value Description SET_QUICKBAR_DATA_FILE Set location of file containing data about what toolbars are in the QuickBar SET_INSIGHT_TAGLIST_FILE Set location of tag insight file SET_STYLE_EDIT_EXE Set location of styleedit executable SET_CODETEMPLATE_FILE Set location of code template file SET_AUTOREPLACE_FILE...
  • Page 341 Table of SettingID values Setting ID Value Description SET_EDITOR_AUTOCLOSE_ASP Add %> when <% entered SET_EDITOR_AUTOCOMMENT Add --> when <!-- is entered SET_EDITOR_HTML_DROP Allow HTML to be dragged-and-dropped from compliant apps (inserted as text otherwise) SET_EDITOR_SHOW_BROWSER Show web browser below editor SET_EDITOR_BROWSER_HEIGHT Set height for browser below editor...
  • Page 342 Chapter 15 Scripting the Visual Tools Object Model Setting ID Value Description SET_AUTOFORMAT_SHOW_PROMPT Show prompt when user clicks toolbutton SET_CFS_HELP_SERVER Server to map to in dxWebBrowser.DoMSIENewWi CFStudio only ndow when user browses snippets SET_CFS_ADJUST_HELP_EXAMPLES , then Help examples False are not adjusted. See CFStudio only dxWebBrowser.DoMSIENew Window.
  • Page 343 Glossary This section contains brief definitions of terms that you might encounter while learning to use the product. ASCII American Standard Code for Information Interchange, developed by the American National Standards Institute (ANSI). System of representing an alphabetic, numeric, or special character with a 7-bit binary number (string of seven 0s or 1s), which defines 128 possible characters.
  • Page 344 A computer that is requesting something from a server; for example, a computer that is asking for the results of a database query. code template User-defined text that is inserted by typing a user-defined keyword. HomeSite+ for Dreamweaver MX has a few pre-set code templates; for example, typing “scriptj” inserts a JavaScript block.
  • Page 345 Glossary entity name Also known as an entity reference. Code for a special or extended character. Entity names prevent browsers from misinterpreting these characters. For example, the lesser than and greater than signs (<, >) are used to form tags in the code. Using the entity names instead of <...
  • Page 346 They are smaller in file size and of higher quality than GIF files, but unlike GIFs they do not support animation. project In HomeSite+ for Dreamweaver MX, a project organizes the files in a Web site or Web application by grouping them in a central location.
  • Page 347 Glossary RGB value ) notation. The code is comprised of Code for a color, in hexadecimal ( [0-9A-Fa-f] three pieces, which signify the level of red, green, and blue in the color. Each of these pieces is either a 2-digit number from 00 to 99, or a 2-letter combination from AA to FF.
  • Page 348 Glossary Universal Naming Convention. A UNC path allows you to identify a shared file on a computer without specifying the storage device it is on. A UNC path only works within a specified network; for example, in your Network Neighborhood. The UNC format is: \\servername\sharename\path\filename;...
  • Page 349 Glossary information can be stored and retrieved from a database, rendered in a variety of formats, and used for a variety of purposes—for example on a Web page, hand-held computer, or cell phone; or for a cookbook, recipe card club, or book about cilantro.
  • Page 350 Glossary...
  • Page 351 Index removing 13 ColdFusion Administrator for data setting file saving behavior 13 sources 130 ActiveDocument Object 258 viewing list of 12 ColdFusion, web resources xv ActiveScript building SQL statements 134 collapsing text 72 configuring product for 101 color coding examples in VTOM 304 about 112 ActiveX 101 Cascading Style Sheets.
  • Page 352 Index web content 49 projects 145 using index 37 CSE HTML Validator, about 124 servers 19 using search engine 37 snippets 62 viewing xvi about 80 deploying DocumentCache Object 269 benefits of using 80 adding server for 164 double-spaced lines, classes 80 basic method 161 replacing 179...
  • Page 353 Index validating for XHTML 1.0 105 about 56 tags with Tag Insight 55 wizard definition pages 215 configuring 56 installing Expression Builder inserting arguments with 56 Mozilla 10 about 58, 199 newer version of HTML creating regular expressions Tidy 114 in 107 GMT time format 17 product 3...
  • Page 354 Index Netscape, integrating with of namespaces 125 product 10 organizing Macintosh, saving files formatted Network Neighborhood, using for favorite folders 49 for 45 mappings 22 QuickBar tabs 31 Macromedia non-ANSI file encoding 43 toolbars 31 headquarters xviii outline profiles sales xviii about 76 website xiv OLE-DB drivers 130...
  • Page 355 Index removing files from 144 deployment scripts 168 searching removing folders from 143 deployment servers 165 about 174 removing resources from 147 files from project folders 144 all open documents 176 setting defaults for 140 HTML Tidy profiles 115 current document, basic 175 types of folders in 138, 139 project folders 143 current document,...
  • Page 356 Index keyboard shortcuts for 64 editing with Tag Inspector 126 managing 63 inserting with Tag Insight 55 syntax and usage Help, sharing folders of 63 requiring attributes for 122 accessing 75 source control setting CodeSweeper rules system requirements 2 benefits of using 148 for 119 from within product 150 validating 123...
  • Page 357 Index requiring attributes when 122 tag editors, creating with 204 Windows Explorer rules for XHTML 106 tag Help, creating with 208 dragging files from 48 single tag 123 TAGDATAUnknownAttributes WIZ tag set, about 219 using default validator 120 tag 207 wizards XHTML 105 WIZ tags, about 219...
  • Page 358 Index...

This manual is also suitable for:

Homesite+ for dreamweaver mx

Table of Contents