208
Chapter 14 Scripting the Visual Tools Object Model
ExtractFileName
Syntax
ExtractFileName(const wsFile: WideString): WideString;
Description
Returns only the file portion of the passed file name.
Example
function Main() {
Var sFullFilePath;
Var sFileName;
sFullFilePath = "C:/Temp/MyScript.js"
with (Application){
sFileName = ExtractFileName(sFullFilePath);
// Returns ’MySript.js’
}
}
ExtractFilePath
Syntax
ExtractFilePath(const wsFile: WideString): WideString;
Description
Returns the path of the passed file (includes trailing ‘\’).
Example
function Main() {
Var sFilePath;
Var sFullFilePath;
sFullFilePath = "C:/Temp/MyScript.js"
with (Application){
sFilePath = ExtractFilePath(sFullFilePath);
// Returns ’C:/Temp/’
}
}
GetApplicationSetting
Syntax
GetApplicationSetting(nSettingID: Integer);
Description
Retrieves a specific application setting based on a SettingID.
Example
function Main(){
var SET_CLOSE_PARA_TAGS = 80;
with (Application){
if (GetApplicationSetting(SET_CLOSE_PARA_TAGS) == 0){
ActiveDocument.InsertText(’<p>’, false);
}
else {
Summary of Contents for ColdFusion Server 5
Page 18: ...xviii About This Book...
Page 26: ...8 Chapter 1 Setting Up the Product...
Page 42: ...24 Chapter 2 Configuring Browsers and Servers...
Page 60: ...42 Chapter 3 Exploring the Workspace...
Page 100: ...82 Chapter 6 Editing Pages...
Page 126: ...108 Chapter 7 Using Web Development Languages...
Page 212: ...194 Chapter 13 Customizing the Development Environment...
Page 320: ...302 Glossary...