
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 {
Содержание COLDFUSION STUDIO 5-USING COLDFUSION 5...
Страница 18: ...xviii About This Book...
Страница 26: ...8 Chapter 1 Setting Up the Product...
Страница 42: ...24 Chapter 2 Configuring Browsers and Servers...
Страница 60: ...42 Chapter 3 Exploring the Workspace...
Страница 100: ...82 Chapter 6 Editing Pages...
Страница 126: ...108 Chapter 7 Using Web Development Languages...
Страница 212: ...194 Chapter 13 Customizing the Development Environment...
Страница 320: ...302 Glossary...