home *** CD-ROM | disk | FTP | other *** search
- !!Script
- // Copyright ⌐ 1998 - Modelworks Software
- // @Modified buile 304 cm19990621 - removed JDK initilization
-
- // This script lets you set your application
- // paths
-
- var gOutput = getOutput();
- var gHelpers = getMapFile("HelpPaths.map");
-
-
- function EditDirectory(path)
- {
- var directory = chooseDirectory("Locate your help folder", path, "");
- if (directory)
- {
- return directory;
- }
- return null;
- }
-
- function InitHelpPaths()
- {
- if (gHelpers.define("IDE Script Reference", File.getDocumentsPath() + "\\Ide\\Script Reference"))
- {
- gOutput.writeLine("Setting IDE Script Reference help path to " + gHelpers.lookup("IDE Script Reference", ""));
- }
-
- if (gHelpers.define("IDE Tools Reference",File.getDocumentsPath() + "\\Ide\\Tools Reference"))
- {
- gOutput.writeLine("Setting IDE Tools Reference help path to " + gHelpers.lookup("IDE Tools Reference", ""));
- }
-
- if (gHelpers.define("IDE FAQ", File.getDocumentsPath() + "\\Ide\\FAQ"))
- {
- gOutput.writeLine("Setting IDE FAQ help path to " + gHelpers.lookup("IDE FAQ", ""));
- }
-
- //if (gHelpers.define("IDE Notes", File.getToolsPath()))
- //{
- // gOutput.writeLine("Setting IDE Notes help path to " + gHelpers.lookup("IDE Notes", ""));
- //}
- }
-
- function DoCommand()
- {
- var propertyLabelList = newList();
- var propertyList = newList();
- var valueList = newList();
- var actionList = newList();
-
- var position = gHelpers.getHeadPosition();
- while (position && position.valid)
- {
- var item = gHelpers.getNext(position);
- propertyLabelList.addTail(item.key);
- propertyList.addTail(item.key);
- valueList.addTail("" + item.value);
- actionList.addTail(EditDirectory);
- }
-
- var results = editProperties("Help Paths", "Edit Help Paths",
- "Location", "Help Path or URL", propertyLabelList, valueList, actionList);
-
- if (results)
- {
- var propertyPostion = propertyList.getHeadPosition();
- var valuePosition = valueList.getHeadPosition();
- while (propertyPostion.valid && valuePosition.valid)
- {
- var property = propertyList.getNext(propertyPostion);
- var value = valueList.getNext(valuePosition);
-
- // Update the value of the property
- gHelpers.setValue(property, value);
- }
- }
- }
-
- !!/Script
-