I have installed sesame 2.5.3 . but unfortunately a subroutine does not work anymore.
Here is my subroutine: Subroutine GET_DOC() var vTemp as String var n as Int
IF Not fileexists("C:\sesame2\ichbinhier.txt") then vList = @ServerListDirectory(vpath) else vList = @LocalListDirectory(vPath)
// Isolate subfolders (items that have no "." in them) vFolders = @SearchStringArray(vList, "/..\...")
vTemp = ""
// Add boldface and "+" sign to folder names For n = 1 to @CountStringArray(vFolders) vTemp = @AppendStringArray(vTemp, "@b" + "+" + @AccessStringArray(vFolders, n)) Next
vFolders = vTemp
vFileTypes = @Replace(vExtensions, ".", "...")
// Isolate document type filenames vDocs = @SearchStringArray(vList, vFileTypes) vDocs = @SortStringArray(vDocs, 0)
PopupSelectPosition(4, @XPos(ThisElement), @YPos(ThisElement))
If vFolderFlag = 1 // User selected a subfolder { vItem = @PopupChoiceList("@b[BACK]" + ";" + vFolders + ";" + vDocs,"Select FOLDER or DOCUMENT") vFolderFlag = 0 } Else { vItem = @PopupChoiceList(vFolders + ";" + vDocs, "Select FOLDER or DOCUMENT") }
If vItem = "@b[BACK]" { SetStringArraySeparator("\") vPath = @TrimStringRight(@ReplaceStringArray(vPath, "", @CountStringArray(vPath)), "\") RestoreStringArraySeparator() If @Instr(vPath, "\") > 0 And vPath <> vStartPath Then vFolderFlag = 1 GET_DOC() } Else If vItem <> "" { // For .doc or .docx If @FindStringArray(vExtensions, @Right(vItem, 4)) < 0 and @FindStringArray(vExtensions, @Right(vItem, 5)) < 0 { vFolderFlag = 1 vPath = vPath + "\" + @Replace(vItem, "@b+", "") GET_DOC() } // user selected a document file }
End Subroutine
|