home *** CD-ROM | disk | FTP | other *** search
- !!Script
- // Copyright ⌐ 1997-1998 - Modelworks Software
-
- /**
- @Tool: insertFilePath~displays a standard open file dialog to let you select a
- file to insert as a quoted full file path at the current selection.
- Note: a quoted file path uses '\\' as the directory separator.
- @See: openFilePath@Tools Reference/Tools/Misc.html#openFilePath
- @EndTool:
- @Summary: insertFilePath~inserts a quoted full file path
- */
-
- function DoCommand()
- {
- var file = chooseFile("Choose a File path to insert", "All Files", "*.*")
-
- var editor = getActiveEditor();
- if (file && editor)
- {
- var selection = editor.getSelection();
- editor.replace(file.getQuotedPath(), selection);
- editor.setActive("Insert Quoted File Path");
- }
- }
-
- !!/Script
-