home *** CD-ROM | disk | FTP | other *** search
- /*
- ** $VER: EditKeyMacro.edge 1.0 (Friday 22-Oct-93 12:59:14)
- **
- ** Edit a keyboard command's rexx macro
- **
- ** Written by Thomas liljetoft & Inovatronics
- */
-
- options results
-
- /* get the users error-report level */
- getenvvar _ge_errlevel
- errlevel = result
-
- /* ask for the key-description to edit */
- 'requestkey' title '"Enter key to edit"'
- if RC==0 then do
-
- /* ok, now get the command currently installed on the key */
- key = result
- 'keyboard' key ask
- if RC==0 then do
-
- /* is this a file? */
- if index(result,':')~=0 then do
-
- /* remember and see if the file is here */
- name=result
- if exists(name) then do
-
- /* is the current window empty? */
- getenvvar _fe_size
- if result>0 then do
-
- /* open a new window and then load the file */
- new
- if RC==0 then do
- address value result
- open '"'name'"'
- end
- end
- else do
- /* open into this window then */
- open '"'name'"'
- end
- end
-
- /* tell the user we could not find the file */
- else requestnotify 'Could not find' name
- end
- end
-
- if RC >= errlevel then do
-
- /* something went wrong enought to be reported so report */
- 'fault'
- 'requestnotify' result
- end
-
- exit(0)
-