home *** CD-ROM | disk | FTP | other *** search
- /*
- Run Windows apps from a function key
-
- Put @run in a function key definition (Setup.Function Keys),
- and use that function key to run Windows applications. RUN
- will ask you for the command line you wish to run, which is
- the name of the application program plus any arguments that
- application may need.
-
- You can also put the name (and arguments) of an application
- that you frequently use in the function key definition, for
- example '@run myapp', or '@run myapp arg1 arg2', and RUN.XWS
- will not have to ask you for this information.
-
- NOTES: Application names must include a file name extension.
- For example, if running the Windows CALC program,
- specify CALC.EXE.
-
- If the application is not in the Windows subdirectory
- (usually \WINDOWS), the name must contain the path.
- For example, if CALC is in the \WINDOWS\UTILS directory,
- specify \WINDOWS\UTILS\CALC.EXE.
-
- Copyright (C) 1989,1990 Digital Communications Associates, Inc.
- All Rights Reserved.
-
- Version 1.00 07-01-89 PJL
- Version 1.01 09-06-89 PJL
- Version 1.1 04-11-90 PJL
- */
-
- cmdline = arg
-
- label GET_CMD
-
- if null(cmdline) then
- {
- alert "Enter command line to run:", OK, CANCEL, cmdline
- if choice = 2 then end
- }
-
- if not instr(cmdline, ".") then
- {
- alert "RUN requires a full filename, i.e. 'NOTEPAD.EXE'", OK, CANCEL
- if choice = 2 then end
- cmdline = ""
- goto GET_CMD
- }
-
- if not exists(cmdline) then
- {
- alert "Error: cannot find "+upcase(cmdline), OK, CANCEL
- if choice = 2 then end
- cmdline = ""
- goto GET_CMD
- }
-
- run cmdline
- end
-