User Guide

Application Object 211
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";
with (Application){
sRelativePath = GetRelativePath (sFullPath1,sFullPath12);
}
}
GetTabIndexForFile
Syntax GetTabIndexForFile(const wsFile: WideString): Integer;
Description Returns the index in the document tab of the passed file. Returns -1 If the file is not
open.
Example
function Main(){
var iIndex;
with (Application){
// Switch to index.htm if it is open
iIndex = GetTabIndexForFile(’D:\\Test\\index.html’);
if (iIndex > 0){
DocumentIndex = iIndex;
}
}
}