home *** CD-ROM | disk | FTP | other *** search
- /*
- Invoke scripts from a function key
-
- Put @do in a function key definition (Setup.Function Keys),
- and use that function key to run your scripts. DO.XWS will
- ask you for the name of the script you wish to run.
-
- You can also put the name of a script you frequently use (plus
- any arguments that script may need) in the function key defin-
- ition, i.e. '@do myscript', or '@do myscript arg1 arg2', so
- that DO.XWS will not have to ask you for this information.
-
- Copyright (C) 1989,1990 Digitial Communications Associates, Inc.
- All Rights Reserved.
-
- Version 1.00 07-01-89 PJL
- Version 1.01 09-06-89 PJL
- */
-
- xws = arg(1)
-
- label GET_XWS
- if null(xws) then
- {
- alert "Enter name of script to run:", OK, CANCEL, xws
- if choice = 2 then end
- }
-
- sfile = xws
- i = instr(sfile, ".")
- if i = 0 then sfile = xws + ".xws"
- else xws = left(sfile,i-1)
- sfile = DirXws + "\" + sfile
- cfile = sfile + ".xwc"
-
- if exists(sfile) or exists(cfile) then
- {
- chain xws
- end
- }
-
- alert "Error: no such script "+upcase(xws), OK, CANCEL
- if choice = 2 then end
- xws = ""
- goto GET_XWS
-
-