home *** CD-ROM | disk | FTP | other *** search
- /*
- Edit a file from a function key
-
- This script will invoke your editor (NOTEPAD is used as a default)
- to edit a file. EDIT.XWS uses .XWS as a default file extension, so
- if you wish to edit a script file, you can just type in the name of
- the script when EDIT asks you what file you want to edit.
-
- Copyright (C) 1989, 1990 Digital Communications Associates, Inc.
- All rights reserved.
-
- Version 1.0 07-01-89 PJL
- */
-
- string fname
-
- fname = arg(1)
- if null(fname) then {
- alert "Enter name of file to edit: ", OK, CANCEL, fname
- if choice = 2 then end
- }
-
- if not instr(fname, ".") then {
- fname = fname + "."
- if not exists(fname) then {
- fname = fname + "xws"
- drive left(DirXws,2)
- chdir DirXws
- }
- }
- else if upcase(right(fname,3)) = "XWS" then {
- drive left(DirXws,2)
- chdir DirXws
- }
-
- if null(Editor) then run "notepad.exe " + fname
- else run Editor + " " + fname
-
- end
-