home *** CD-ROM | disk | FTP | other *** search
- !!Script
- // Copyright ⌐ 1998 - Modelworks Software
- // @Created build 228 cm19981017
-
- // This script lets you set your application
- // paths
-
- var gOutput = getOutput();
- var gHelpers = getMapFile("ApplicationHelpers");
-
-
- function EditExe(path)
- {
- var file = chooseFile("Locate your application", "*.exe", "*.exe", path, "choose application");
- if (file)
- {
- return file.path;
- }
- }
-
- function InitApplications()
- {
- }
-
- function DoCommand()
- {
- var propertyLabelList = newList();
- var propertyList = newList();
- var valueList = newList();
- var actionList = newList();
-
- var propertyName = "DefaultHtmlBrowser";
- var propertyValue = gHelpers.lookup(propertyName);
- propertyLabelList.addTail("Default Html Browser");
- propertyList.addTail(propertyName);
- if (propertyValue && propertyValue.exists)
- {
- valueList.addTail("" + propertyValue.path);
- }
- else
- {
- valueList.addTail("");
- }
- actionList.addTail(EditExe);
-
- var results = editProperties("Applications", "Edit Applications",
- "Location", "Application Path", 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, newFile(value));
- }
- }
- }
-
- !!/Script
-