US20020002628A1 - Method for enabling interaction with external computer programs from an editor environment - Google Patents
Method for enabling interaction with external computer programs from an editor environment Download PDFInfo
- Publication number
- US20020002628A1 US20020002628A1 US08/825,200 US82520097A US2002002628A1 US 20020002628 A1 US20020002628 A1 US 20020002628A1 US 82520097 A US82520097 A US 82520097A US 2002002628 A1 US2002002628 A1 US 2002002628A1
- Authority
- US
- United States
- Prior art keywords
- program
- lines
- currently selected
- command
- computer
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims abstract description 27
- 238000004590 computer program Methods 0.000 title abstract description 9
- 230000003993 interaction Effects 0.000 title abstract description 3
- 238000004519 manufacturing process Methods 0.000 claims abstract description 12
- 230000004044 response Effects 0.000 claims description 18
- 230000006870 function Effects 0.000 claims description 13
- 230000000977 initiatory effect Effects 0.000 claims 3
- 238000002592 echocardiography Methods 0.000 description 14
- 230000008569 process Effects 0.000 description 6
- 230000000903 blocking effect Effects 0.000 description 2
- 230000008859 change Effects 0.000 description 2
- 238000013500 data storage Methods 0.000 description 2
- 238000010586 diagram Methods 0.000 description 2
- 230000003213 activating effect Effects 0.000 description 1
- 230000004913 activation Effects 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000011156 evaluation Methods 0.000 description 1
- PWPJGUXAGUPAHP-UHFFFAOYSA-N lufenuron Chemical compound C1=C(Cl)C(OC(F)(F)C(C(F)(F)F)F)=CC(Cl)=C1NC(=O)NC(=O)C1=C(F)C=CC=C1F PWPJGUXAGUPAHP-UHFFFAOYSA-N 0.000 description 1
- 230000007246 mechanism Effects 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
- 230000000717 retained effect Effects 0.000 description 1
- 230000001360 synchronised effect Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/54—Interprogram communication
- G06F9/544—Buffers; Shared memory; Pipes
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/455—Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
- G06F9/45504—Abstract machines for programme code execution, e.g. Java virtual machine [JVM], interpreters, emulators
- G06F9/45508—Runtime interpretation or emulation, e g. emulator loops, bytecode interpretation
- G06F9/45512—Command shells
Definitions
- the present invention generally relates to command interpreters for computer systems, and in particular to a method for retrieving previous input commands to an external program from an editor environment.
- the present invention discloses a method, apparatus, and article of manufacture for enabling interaction with one or more external computer programs from within an editor environment.
- the method involves passing editor input to the external program, wherein the external program evaluates the input, produces either lines of output or zero lines of output, and transmits the output back to the editor.
- the editor receives the output, it stores the output in a file and displays it on a computer monitor.
- FIG. 1 is a block diagram that illustrates an exemplary hardware environment of the present invention
- FIG. 2 is a flowchart showing the steps performed by the computer when a user interacts with an external program
- FIG. 3A through FIG. 3I illustrate one possible embodiment of the user interface displayed on the monitor according to the present invention.
- FIG. 1 is a block diagram that illustrates an exemplary hardware environment of the present invention.
- the present invention is typically implemented using a personal computer 10 comprised of a microprocessor, random access memory (RAM), read-only memory (ROM), and other components. It is envisioned that attached to the personal computer 10 may be a monitor 12 , hard and/or floppy disk drives 14 , CD-ROM drives 16 , printer 18 , and other peripherals. Also included in the preferred embodiment may be input devices, for example, a mouse pointing device 20 and a keyboard 22 .
- FIG. 1 Those skilled in the art will recognize that the exemplary environment illustrated in FIG. 1 is not intended to limit the present invention. Indeed, those skilled in the art will recognize that other alternative hardware environments may be used without departing from the scope of the present invention.
- the personal computer 10 operates under the control of an operating system 24 , such as the OS/2TM, WindowsTM, or MacintoshTM operating systems, which is represented in FIG. 1 by the screen display on the monitor 12 .
- the personal computer 10 executes one or more computer programs 26 and 28 , which are represented in FIG. 1 by the “windows” displayed on the monitor 12 , operating under the control of the operating system 24 .
- the operating system 24 and the computer programs 26 and 28 are tangibly embodied in a computer-readable medium, e.g., one or more of the fixed and/or removable data storage devices 14 and 16 . Both the operating system 24 and the computer programs 26 and 28 may be loaded from the data storage devices 14 and 16 into the random access memory of the computer 10 for execution by the microprocessor. Both the operating system 24 and the computer programs 26 and 28 comprise instructions which, when read and executed by the microprocessor of the computer 10 , causes the computer 10 to perform the steps necessary to execute the steps or elements of the present invention.
- the computer programs 26 and 28 comprise an enhanced editor 26 and one or more programs 28 external to the editor 26 that communicate bidirectionally with the editor 26 , although other types of computer programs may be used.
- a command within the editor 26 is used to start the user-specified external program 28 as a peer process or dynamically linked routine under the editor 26 .
- the editor 26 then communicates bidirectionally with the external program 28 via, for example, OS/2 pipes or other similar mechanisms built into the operating system 24 .
- the editor 26 passes input lines to the external program 28 using a standard input and output interface or directly through an API.
- the external program 28 evaluates the input lines (which can comprise both commands and data), performs the functions indicated by the input lines, and generates one or more lines of corresponding output or perhaps generates no output.
- the external program 28 passes the output lines back to the editor 26 for subsequent storage and display. As a result, the full power and flexibility of the editor 26 environment is retained, yet the editor 26 also becomes a “session manager” for the external program 28 .
- a “LINK” command is used to set up the editor 26 environment in a mode for operating according to the present invention.
- a pull-down menu is marked by the LINK command, wherein the menu is used to initialize a session with a user-specified external program 28 and to provide access to certain commands described in more detail below.
- the menu is removed when an “UNLINK” command is used to remove the editor 26 from the mode for operating according to the present invention.
- the present invention redefines the following keys, key combinations, keywords, and/or menu selections during an active session with the external program 28 : INIT ⁇ pgm>, ALT-X, ENTER, CTL-ENTER, PAD-ENTER, CTL-PAD-ENTER, CTL-UP, CTL-DOWN.
- the user may assign key combinations in addition to the invention commands whose arguments are strings to evaluate. Input and output may thus be directed to the cursor lines or to the bottom of the file. This is similar to using a set-up macro for the commands of the editor 26 .
- the INIT ⁇ pgm> keywords initialize a new session by identifying the name “pgm” of the external program 28 . This command is also available as “Initialize session” command on the pull-down menu.
- ALT-X key combination exits from current session and returns to the default editor 26 key definitions. This command is also available as “Exit session” command on the pull-down menu.
- the ENTER key transmits the currently selected line or line block to the external program 28 , and adds the output lines from the external program 28 immediately following the corresponding selected line(s).
- This command transmits only input lines, not output lines, in the selected lines.
- Input lines are lines that have previously been sent as input and thus are preceded with a prompt.
- these lines can be lines from a previously identified input file.
- These lines can also include the arguments of a macro. For example, a pre-assigned key combination whose argument string is input lines. This command is also available as “Evaluate in place” on the pull-down menu. If no lines are selected, then the line at the cursor is sent as input. Otherwise all input (prompted) lines in the block are sent and the cursor position is ignored.
- the CTL-ENTER key combination transmits the currently selected line or line block to the external program 28 , echoes the currently selected line or line block to the bottom of the editor 26 file, and adds output from the external program 28 at the bottom of the editor 26 file.
- the currently selected lines and the output received from the external program can be directed to a pre-assigned alternate editor window. This command transmits only input lines, not output lines, in the selected lines. This command is also available as “Evaluate at bottom” on the pull-down menu.
- Input from a “main” editor 26 session may be sent to the external program 28 and be echoed with corresponding output to another editor 26 window rather than echoing the results to the main window, similar to the process performed by the CTL-ENTER command. There may be also be a user-selectable choice of alternate editor windows.
- the PAD-ENTER key combination transmits the currently selected line block to the external program 28 , and adds output from the external program 28 immediately following the selected lines. In essence, this command echoes the selected line block interleaved with output from the external program 28 at the original location in the editor 26 file. This command also transmits all of the lines, not just input lines, in the selected line block. As an alternative, these lines can be lines from a previously identified input file. These lines can also include the arguments of a macro. For example, a pre-assigned key combination whose argument string is input lines. If no lines are marked, then the input highlight is removed. This command is also available as “Evaluate block” on the pull-down menu.
- the CTL-PAD-ENTER key combination transmits the currently selected line block to the external program 28 , echoes the currently selected line block to the bottom of the editor 26 file, and adds output from the external program 28 at the bottom of the editor 26 file.
- this command echoes the selected line block interleaved with output from the external program 28 at the bottom of the editor 26 file.
- the currently selected lines and the output received from the external program can be added to a pre-assigned alternate editor window.
- This command also transmits all of the lines, not just input lines, in the selected line block. If no lines are marked, then the highlighted input line is reset at or near (above) the cursor. This command is also available as “Set retrieve” on the pull-down menu.
- the CTL-UP key combination changes the emphasis (using the reverse-video of the highlight color) to the first highlight line above the current emphasized input line and echoes the line to the bottom of the editor 26 file, In essence, this command moves the input focus or command prompt up one line in the editor 26 file and echoes the line at the input focus to the bottom of the editor 26 file. This command is also available as “Retrieve up” on the pull-down menu.
- the CTL-DOWN key combination similarly emphasizes and echoes the next highlighted line to the bottom of the editor 26 file. In essence, this command moves the input focus or command prompt down one line in the editor 26 file and echoes the line at the bottom of the editor 26 file. This command is also available as “Retrieve down” on the pull-down menu.
- the end-of-response tag is a string used by the editor 26 to determine when the output pipe of the external program 28 has the last response line for the previous input to the external program 28 .
- the editor 26 reads the output pipe of the external program 28 in a separate thread, waiting for either the total pipe contents to exactly match the tag, or for the final n+2 bytes in the pipe to match the tag preceded by a carriage return and line feed.
- the editor 26 then repeatedly prompts the user to ask whether to continue waiting on the read (retry) or stop waiting for output (cancel). If the user cancels, they should then change or remove the tag, and re-enter input (the response from which will include “lost” output from previous input) or stop the current session and then restart the external program 28 with the proper tag.
- the delay setting is used only to increase the time between prompts to continue reading.
- FIG. 2 is a flowchart illustrating the operation of the computer 10 in accordance with the present invention.
- Block 30 represents the computer 10 waiting for input.
- Block 32 is a decision block that represents the computer 10 determining whether the user has entered a LINK keyword command to enable the invention. If not, control transfers to Block 34 .
- Block 34 represents the computer 10 handling other processes and transferring control back to Block 30 .
- Block 36 represents the computer 10 activating the invention within the editor. After activation, control transfers to Block 38 .
- Block 38 is a decision block that represents the computer 10 determining whether the user has entered an UNLINK keyword command to disable the invention. If so, control transfers to Block 40 , which represents the computer 10 deactivating the invention.
- Block 42 is a decision block that represents the computer 10 determining whether the user has entered an INIT ⁇ pgm> command to begin a new session. If not, control transfers to Block 44 , which represents the computer 10 handling other processes.
- Block 46 represents computer 10 initializing a session and specifying the name of an external program.
- Block 48 is a decision block that represents the computer 10 determining whether the user has entered an ALT-X command to exit a session. If so, control transfers to Block 50 , which represents computer 10 terminating the current session.
- Block 52 represents the computer 10 waiting for data.
- Block 54 is a decision block that represents the computer 10 determining whether the user has selected a portion of the data displayed on the monitor 12 . If so, control transfers to Block 56 , which represents the computer 10 highlighting the desired data.
- Block 57 is a decision block that represents the computer 10 determining whether the user has typed in a CTL-UP or CTL-DOWN command to move the input highlight to the previous or next input line 74 . If a user does enter a CTL-UP or CTL-DOWN command, control transfers to Block 58 , which represents the computer 10 moving the highlighted portion in the editor 26 file and echoing the highlighted portion at the bottom of the screen.
- Block 59 is a decision block that represents the computer 10 determining whether the user has typed a command or key combination to transmit the block of lines or cursor line data to a previously defined external program 28 .
- the accelerator keys for transmitting data are ENTER, CTL-ENTER, PAD-ENTER, and CTL-PAD-ENTER. Comparing ENTER to PAD-ENTER, users hit ENTER when they want to transmit only prompted (previously input) lines. Otherwise, to transmit all lines as input, they hit PAD-ENTER.
- the CTL-UP and CTL-DOWN keys only shift the input focus up or down one input line 74 . Regarding the CTL prefix, CTL instructs the computer 10 to echo the currently selected portion to the bottom of the editor 26 file.
- Block 60 represents the computer 10 echoing the selected portion in the editor 26 file (if so indicated according to the type of transmit command entered) and performing the transmit function.
- Block 62 is a decision block that represents the computer 10 determining whether the external program produced output. If so, control transfers to Block 64 , which represents the computer 10 receiving that output into the editor 26 file.
- Block 66 represents the computer handling other processes and transferring control back to Block 52 .
- FIG. 3A illustrates a pull down menu 68 , wherein the menu is used (a) to set up the editor 26 environment using a “LINK” command; (b) to remove the pull down menu using the “UNLINK” command; (c) to initialize a new session using the “Initialize session” command; and (d) to exit a session using the “Exit session” command.
- FIG. 3B represents the computer 10 responding to a “ENTER” keyword command where there is no marked block of data.
- the “ENTER” key evaluates the cursor line to the external program 28 and adds the output 72 from the external program 28 immediately following the corresponding selected input lines.
- the highlighting is shown as bold text in FIG. 3B.
- the cursor position is shown as an underscore, “_”.
- a prompt is added to the line if it does not already have one.
- This command transmits only input line 74 .
- FIG. 3C represents the computer 10 responding to a “CTL-ENTER” keyword command where there is no marked block of input.
- the “CTL-ENTER” key transmits the current line to the external program 28 , echoes this line to the bottom of the editor 26 file, and adds output 72 from the external program 28 at the bottom of the editor 26 file immediately following the corresponding echoed lines 76 .
- This command transmits only input lines 74 .
- the fourth line of input was changed from “Print a:Print b” to “Print c*100”, after which the CTL-ENTER command acts on the new input to the external program 28 as shown in screen ( 5 ).
- FIG. 3D represents the computer 10 responding to an ENTER keyword command where there is a marked block of text in the input to the external program 28 .
- screen ( 2 ) the first five lines are marked by the editor 26 line-blocking facility.
- the change between screen ( 2 ) and screen ( 3 ) shows the effect of the ENTER command on the marked block input.
- the cursor is shown on line 4 in screen ( 2 )
- the cursor can appear on any line within the marked block.
- the resulting outputs replace the corresponding old outputs by interleaving the outputs as shown in screen ( 5 ).
- the line blocking remains until the user explicitly unblocks the input using the editor 26 line blocking facility.
- FIG. 3E represents the computer 10 responding to a CTL-ENTER keyword command where there is a marked block of input. From screen ( 1 ) to screen ( 2 ), the user changed some input lines and marked a block containing them. Screen ( 3 ) shows the result of a CTL-ENTER command, with the marked block moved to the bottom with the corresponding output to the marked input, where there is output to be displayed.
- FIG. 3F represents the computer 10 responding to a “PAD-ENTER” keyword command.
- the “PAD-ENTER” key transmits the currently highlighted data 70 to the external program 28 , and interleaves output 72 from the external program 28 with the selected lines. This command transmits all of the lines 74 .
- FIG. 3G represents the computer 10 responding to a “CTL-PAD-ENTER” keyword command.
- the “CTL-PAD-ENTER” key transmits the highlighted data 70 to the external program 28 , echoes the currently selected line block to the bottom of the editor 26 file, and interleaves output 72 from the external program 28 with the echoed lines 76 .
- This command transmits all of the lines 74 .
- FIG. 3H represents the computer 10 responding to a “CTL-UP” command.
- the CTL-UP key emphasizes the previous input line 74 (shown as bold and italicized text in screens ( 2 - 4 )), and echoes the line to the bottom of the editor 26 file. In essence, this command moves the input focus or cursor 78 up one line in the editor 26 file, and echoes the line at the bottom of the editor 26 file.
- the echoed line at the bottom of the screen may be evaluated as is, or it may be changed and evaluated by using the ENTER or CTL-ENTER key.
- FIG. 3I represents the computer 10 responding to a “CTL-DOWN” command.
- the CTL-DOWN key combination emphasizes the next input line 74 and echoes the line to the bottom of the editor 26 file. In essence, this command moves the input focus or cursor 78 down one line in the editor 26 file, and echoes the line at the bottom of the editor 26 file.
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Stored Programmes (AREA)
- User Interface Of Digital Computer (AREA)
Abstract
The present invention discloses a method, apparatus, and article of manufacture for enabling interaction with one or more external computer programs from within an editor environment. The method involves passing editor input to the external program, wherein the external program evaluates the input, produces corresponding output, and transmits the output back to the editor. When the editor receives the output, it stores the output in a file and displays it on a computer monitor. By using this method, a user can not only interact with the external program from within the editor environment, but can also create an editor file that stores a listing of the input and output provided to the external program.
Description
- This application is related to co-pending and commonly assigned patent application Ser. No. ______, filed on same date herewith, by Michael Golding, and entitled “A METHOD FOR RETRIEVING PREVIOUS INPUT COMMANDS TO AN EXTERNAL PROGRAM FROM AN EDITOR ENVIRONMENT”, which application is incorporated by reference herein.
- 1. Field of the Invention
- The present invention generally relates to command interpreters for computer systems, and in particular to a method for retrieving previous input commands to an external program from an editor environment.
- 2. Description of Related Art
- Most editor programs provide a variety of useful functions for computer users. These functions may include the ability to organize, store, retrieve, and print information. However, the scope of functions available to the computer user within the editor are limited.
- It would be useful, therefore, to make additional functions available within the editor by allowing the user to access one or more programs external to the editor. In the prior art, however, most typical editor input cannot operate as command input to another external program. This limitation prevents users from combining the power of the editor with the extra capabilities of the external program.
- Thus, there is a need in the art for a method that allows the computer user to access external programs from the editor environment.
- To overcome the limitations in the prior art described above, the present invention discloses a method, apparatus, and article of manufacture for enabling interaction with one or more external computer programs from within an editor environment. The method involves passing editor input to the external program, wherein the external program evaluates the input, produces either lines of output or zero lines of output, and transmits the output back to the editor. When the editor receives the output, it stores the output in a file and displays it on a computer monitor. By using this method, a user can not only interact with the external program from within the editor environment, but can also create an editor file that stores a listing of the input and output provided to the external program.
- Referring now to the drawings in which like reference numbers represent corresponding parts throughout:
- FIG. 1 is a block diagram that illustrates an exemplary hardware environment of the present invention;
- FIG. 2 is a flowchart showing the steps performed by the computer when a user interacts with an external program; and
- FIG. 3A through FIG. 3I illustrate one possible embodiment of the user interface displayed on the monitor according to the present invention.
- In the following description, reference is made to the accompanying drawings which form a part hereof, and in which is shown by way of illustration specific embodiments in which the invention may be practiced. It is to be understood that other embodiments may be utilized and structural changes may be made without departing from the scope of the present invention.
- FIG. 1 is a block diagram that illustrates an exemplary hardware environment of the present invention. The present invention is typically implemented using a
personal computer 10 comprised of a microprocessor, random access memory (RAM), read-only memory (ROM), and other components. It is envisioned that attached to thepersonal computer 10 may be amonitor 12, hard and/orfloppy disk drives 14, CD-ROM drives 16,printer 18, and other peripherals. Also included in the preferred embodiment may be input devices, for example, amouse pointing device 20 and akeyboard 22. - Those skilled in the art will recognize that the exemplary environment illustrated in FIG. 1 is not intended to limit the present invention. Indeed, those skilled in the art will recognize that other alternative hardware environments may be used without departing from the scope of the present invention.
- The
personal computer 10 operates under the control of anoperating system 24, such as the OS/2™, Windows™, or Macintosh™ operating systems, which is represented in FIG. 1 by the screen display on themonitor 12. Thepersonal computer 10 executes one ormore computer programs monitor 12, operating under the control of theoperating system 24. - Generally, the
operating system 24 and thecomputer programs data storage devices operating system 24 and thecomputer programs data storage devices computer 10 for execution by the microprocessor. Both theoperating system 24 and thecomputer programs computer 10, causes thecomputer 10 to perform the steps necessary to execute the steps or elements of the present invention. - In the preferred embodiment, the
computer programs editor 26 and one ormore programs 28 external to theeditor 26 that communicate bidirectionally with theeditor 26, although other types of computer programs may be used. A command within theeditor 26 is used to start the user-specifiedexternal program 28 as a peer process or dynamically linked routine under theeditor 26. Theeditor 26 then communicates bidirectionally with theexternal program 28 via, for example, OS/2 pipes or other similar mechanisms built into theoperating system 24. Theeditor 26 passes input lines to theexternal program 28 using a standard input and output interface or directly through an API. Theexternal program 28 evaluates the input lines (which can comprise both commands and data), performs the functions indicated by the input lines, and generates one or more lines of corresponding output or perhaps generates no output. Theexternal program 28 passes the output lines back to theeditor 26 for subsequent storage and display. As a result, the full power and flexibility of theeditor 26 environment is retained, yet theeditor 26 also becomes a “session manager” for theexternal program 28. - In the preferred embodiment, a “LINK” command is used to set up the
editor 26 environment in a mode for operating according to the present invention. A pull-down menu is marked by the LINK command, wherein the menu is used to initialize a session with a user-specifiedexternal program 28 and to provide access to certain commands described in more detail below. The menu is removed when an “UNLINK” command is used to remove theeditor 26 from the mode for operating according to the present invention. - Once activated within the
editor 26, the present invention redefines the following keys, key combinations, keywords, and/or menu selections during an active session with the external program 28: INIT <pgm>, ALT-X, ENTER, CTL-ENTER, PAD-ENTER, CTL-PAD-ENTER, CTL-UP, CTL-DOWN. - The user may assign key combinations in addition to the invention commands whose arguments are strings to evaluate. Input and output may thus be directed to the cursor lines or to the bottom of the file. This is similar to using a set-up macro for the commands of the
editor 26. - The INIT <pgm> keywords initialize a new session by identifying the name “pgm” of the
external program 28. This command is also available as “Initialize session” command on the pull-down menu. - Entering “=filename” as input to the
editor 26 scans a disk file for the prompted lines and sends them to the external program for evaluation. The input and corresponding result lines are written to theeditor 26 file as if the entire file were copied. An appropriate input file might be obtained by saving the file after a session communicating with an external program. - The ALT-X key combination exits from current session and returns to the
default editor 26 key definitions. This command is also available as “Exit session” command on the pull-down menu. - The ENTER key transmits the currently selected line or line block to the
external program 28, and adds the output lines from theexternal program 28 immediately following the corresponding selected line(s). This command transmits only input lines, not output lines, in the selected lines. Input lines are lines that have previously been sent as input and thus are preceded with a prompt. As an alternative, these lines can be lines from a previously identified input file. These lines can also include the arguments of a macro. For example, a pre-assigned key combination whose argument string is input lines. This command is also available as “Evaluate in place” on the pull-down menu. If no lines are selected, then the line at the cursor is sent as input. Otherwise all input (prompted) lines in the block are sent and the cursor position is ignored. - The CTL-ENTER key combination transmits the currently selected line or line block to the
external program 28, echoes the currently selected line or line block to the bottom of theeditor 26 file, and adds output from theexternal program 28 at the bottom of theeditor 26 file. As an alternative, the currently selected lines and the output received from the external program can be directed to a pre-assigned alternate editor window. This command transmits only input lines, not output lines, in the selected lines. This command is also available as “Evaluate at bottom” on the pull-down menu. - Input from a “main”
editor 26 session may be sent to theexternal program 28 and be echoed with corresponding output to anothereditor 26 window rather than echoing the results to the main window, similar to the process performed by the CTL-ENTER command. There may be also be a user-selectable choice of alternate editor windows. - The PAD-ENTER key combination transmits the currently selected line block to the
external program 28, and adds output from theexternal program 28 immediately following the selected lines. In essence, this command echoes the selected line block interleaved with output from theexternal program 28 at the original location in theeditor 26 file. This command also transmits all of the lines, not just input lines, in the selected line block. As an alternative, these lines can be lines from a previously identified input file. These lines can also include the arguments of a macro. For example, a pre-assigned key combination whose argument string is input lines. If no lines are marked, then the input highlight is removed. This command is also available as “Evaluate block” on the pull-down menu. - The CTL-PAD-ENTER key combination transmits the currently selected line block to the
external program 28, echoes the currently selected line block to the bottom of theeditor 26 file, and adds output from theexternal program 28 at the bottom of theeditor 26 file. In essence, this command echoes the selected line block interleaved with output from theexternal program 28 at the bottom of theeditor 26 file. As an alternative, the currently selected lines and the output received from the external program can be added to a pre-assigned alternate editor window. This command also transmits all of the lines, not just input lines, in the selected line block. If no lines are marked, then the highlighted input line is reset at or near (above) the cursor. This command is also available as “Set retrieve” on the pull-down menu. - The CTL-UP key combination changes the emphasis (using the reverse-video of the highlight color) to the first highlight line above the current emphasized input line and echoes the line to the bottom of the
editor 26 file, In essence, this command moves the input focus or command prompt up one line in theeditor 26 file and echoes the line at the input focus to the bottom of theeditor 26 file. This command is also available as “Retrieve up” on the pull-down menu. - The CTL-DOWN key combination similarly emphasizes and echoes the next highlighted line to the bottom of the
editor 26 file. In essence, this command moves the input focus or command prompt down one line in theeditor 26 file and echoes the line at the bottom of theeditor 26 file. This command is also available as “Retrieve down” on the pull-down menu. - When performing the above-described functions under the present invention, inputs to and responses from the
external program 28 need to be synchronized by theeditor 26, so that they can be interleaved in the file being edited by the editor 26 (only when an external program is seen as a separate process). Therefore, the user needs to set either a “delay” or (preferably) an “end-of-response tag” setting. If an external program is run synchronously through a direct API, then the delay and end-of-response tag are not used. The delay specifies a time (in milliseconds) for theeditor 26 to wait between writing to the input pipe of theexternal program 28 and reading from the output pipe of theexternal program 28. - The end-of-response tag is a string used by the
editor 26 to determine when the output pipe of theexternal program 28 has the last response line for the previous input to theexternal program 28. When the string is set, theeditor 26 reads the output pipe of theexternal program 28 in a separate thread, waiting for either the total pipe contents to exactly match the tag, or for the final n+2 bytes in the pipe to match the tag preceded by a carriage return and line feed. - If the tag is not seen 1 or 2 seconds after the output pipe of the
external program 28 stops filling, theeditor 26 then repeatedly prompts the user to ask whether to continue waiting on the read (retry) or stop waiting for output (cancel). If the user cancels, they should then change or remove the tag, and re-enter input (the response from which will include “lost” output from previous input) or stop the current session and then restart theexternal program 28 with the proper tag. When a tag is set, the delay setting is used only to increase the time between prompts to continue reading. - FIG. 2 is a flowchart illustrating the operation of the
computer 10 in accordance with the present invention. -
Block 30 represents thecomputer 10 waiting for input.Block 32 is a decision block that represents thecomputer 10 determining whether the user has entered a LINK keyword command to enable the invention. If not, control transfers to Block 34. -
Block 34 represents thecomputer 10 handling other processes and transferring control back toBlock 30. -
Block 36 represents thecomputer 10 activating the invention within the editor. After activation, control transfers to Block 38. -
Block 38 is a decision block that represents thecomputer 10 determining whether the user has entered an UNLINK keyword command to disable the invention. If so, control transfers to Block 40, which represents thecomputer 10 deactivating the invention. -
Block 42 is a decision block that represents thecomputer 10 determining whether the user has entered an INIT<pgm> command to begin a new session. If not, control transfers to Block 44, which represents thecomputer 10 handling other processes. -
Block 46 representscomputer 10 initializing a session and specifying the name of an external program. -
Block 48 is a decision block that represents thecomputer 10 determining whether the user has entered an ALT-X command to exit a session. If so, control transfers to Block 50, which representscomputer 10 terminating the current session. -
Block 52 represents thecomputer 10 waiting for data. Block 54 is a decision block that represents thecomputer 10 determining whether the user has selected a portion of the data displayed on themonitor 12. If so, control transfers to Block 56, which represents thecomputer 10 highlighting the desired data. -
Block 57 is a decision block that represents thecomputer 10 determining whether the user has typed in a CTL-UP or CTL-DOWN command to move the input highlight to the previous ornext input line 74. If a user does enter a CTL-UP or CTL-DOWN command, control transfers to Block 58, which represents thecomputer 10 moving the highlighted portion in theeditor 26 file and echoing the highlighted portion at the bottom of the screen. -
Block 59 is a decision block that represents thecomputer 10 determining whether the user has typed a command or key combination to transmit the block of lines or cursor line data to a previously definedexternal program 28. The accelerator keys for transmitting data are ENTER, CTL-ENTER, PAD-ENTER, and CTL-PAD-ENTER. Comparing ENTER to PAD-ENTER, users hit ENTER when they want to transmit only prompted (previously input) lines. Otherwise, to transmit all lines as input, they hit PAD-ENTER. The CTL-UP and CTL-DOWN keys only shift the input focus up or down oneinput line 74. Regarding the CTL prefix, CTL instructs thecomputer 10 to echo the currently selected portion to the bottom of theeditor 26 file. The CTL prefix also undoes the last set of changes to the original input lines. If a user does a transmit, control transfers to Block 60, which represents thecomputer 10 echoing the selected portion in theeditor 26 file (if so indicated according to the type of transmit command entered) and performing the transmit function. -
Block 62 is a decision block that represents thecomputer 10 determining whether the external program produced output. If so, control transfers to Block 64, which represents thecomputer 10 receiving that output into theeditor 26 file. -
Block 66 represents the computer handling other processes and transferring control back toBlock 52. - FIG. 3A illustrates a pull down
menu 68, wherein the menu is used (a) to set up theeditor 26 environment using a “LINK” command; (b) to remove the pull down menu using the “UNLINK” command; (c) to initialize a new session using the “Initialize session” command; and (d) to exit a session using the “Exit session” command. - FIG. 3B represents the
computer 10 responding to a “ENTER” keyword command where there is no marked block of data. The “ENTER” key evaluates the cursor line to theexternal program 28 and adds the output 72 from theexternal program 28 immediately following the corresponding selected input lines. The highlighting is shown as bold text in FIG. 3B. The cursor position is shown as an underscore, “_”. A prompt is added to the line if it does not already have one. This command transmits onlyinput line 74. Screen (5) shows aninput line 74 that has been changed from a=101″ to “Print a:Print a*10”; screen (6) shows that theexternal program 28 then responds to this changed line. If the cursor is at the bottom of the input screen as shown in screen (3), a new input prompt is added at the bottom of the screen as shown in screen (4) after the ENTER command is entered. - FIG. 3C represents the
computer 10 responding to a “CTL-ENTER” keyword command where there is no marked block of input. The “CTL-ENTER” key transmits the current line to theexternal program 28, echoes this line to the bottom of theeditor 26 file, and adds output 72 from theexternal program 28 at the bottom of theeditor 26 file immediately following the corresponding echoed lines 76. This command transmits only input lines 74. Between screen (3) and screen (4), the fourth line of input was changed from “Print a:Print b” to “Print c*100”, after which the CTL-ENTER command acts on the new input to theexternal program 28 as shown in screen (5). - FIG. 3D represents the
computer 10 responding to an ENTER keyword command where there is a marked block of text in the input to theexternal program 28. In screen (2), the first five lines are marked by theeditor 26 line-blocking facility. The change between screen (2) and screen (3) shows the effect of the ENTER command on the marked block input. Although the cursor is shown online 4 in screen (2), the cursor can appear on any line within the marked block. When a user replaces previously input lines as in screen (4), the resulting outputs replace the corresponding old outputs by interleaving the outputs as shown in screen (5). The line blocking remains until the user explicitly unblocks the input using theeditor 26 line blocking facility. - FIG. 3E represents the
computer 10 responding to a CTL-ENTER keyword command where there is a marked block of input. From screen (1) to screen (2), the user changed some input lines and marked a block containing them. Screen (3) shows the result of a CTL-ENTER command, with the marked block moved to the bottom with the corresponding output to the marked input, where there is output to be displayed. - FIG. 3F represents the
computer 10 responding to a “PAD-ENTER” keyword command. The “PAD-ENTER” key transmits the currently highlighteddata 70 to theexternal program 28, and interleaves output 72 from theexternal program 28 with the selected lines. This command transmits all of thelines 74. - FIG. 3G represents the
computer 10 responding to a “CTL-PAD-ENTER” keyword command. The “CTL-PAD-ENTER” key transmits the highlighteddata 70 to theexternal program 28, echoes the currently selected line block to the bottom of theeditor 26 file, and interleaves output 72 from theexternal program 28 with the echoed lines 76. This command transmits all of thelines 74. - FIG. 3H represents the
computer 10 responding to a “CTL-UP” command. The CTL-UP key emphasizes the previous input line 74 (shown as bold and italicized text in screens (2-4)), and echoes the line to the bottom of theeditor 26 file. In essence, this command moves the input focus or cursor 78 up one line in theeditor 26 file, and echoes the line at the bottom of theeditor 26 file. The echoed line at the bottom of the screen may be evaluated as is, or it may be changed and evaluated by using the ENTER or CTL-ENTER key. - FIG. 3I represents the
computer 10 responding to a “CTL-DOWN” command. The CTL-DOWN key combination emphasizes thenext input line 74 and echoes the line to the bottom of theeditor 26 file. In essence, this command moves the input focus or cursor 78 down one line in theeditor 26 file, and echoes the line at the bottom of theeditor 26 file.
Claims (30)
1. A method for interacting with an external program from within another program executed by a computer, comprising the steps of:
receiving a first command from a user into a first program and initiating execution of a second program in the computer in response to the first command, wherein the first program communicates with the second program in a bi-directional manner;
receiving a second command from a user into the first program and storing data in a retrieval buffer within the first program in response to the second command;
receiving a third command from a user into the first program, retrieving the data stored in the retrieval buffer, and passing the retrieved data from the first program to the second program in response to the third command, wherein the second program interprets the passed data, performs one or more functions in response to the interpretation of the passed data, and returns output to the first program as a result of the performed functions.
2. The method of claim 1 above, wherein the first command identifies a name of the second program.
3. The method of claim 1 above, further comprising the steps of transmitting one or more currently selected lines from the first program to the second program, and adding the output received within the first program from the second program immediately following the currently selected lines in an file.
4. The method of claim 3 , where the currently selected lines are selected lines from a previously identified input file.
5. The method of claim 3 above, further comprising the step of transmitting only input lines of the currently selected lines.
6. The method of claim 1 above, further comprising the steps of transmitting one or more currently selected lines from the first program to the second program, echoing the currently selected lines to the bottom of an file displayed by the first program, and adding the output received within the first program from the second program interleaved with the echoed lines.
7. The method of claim 6 above, further comprising the steps of:
changing the content of the currently selected line before transmitting it; and
undoing a last set of changes to the currently selected line after transmitting it.
8. The method of claim 5 above, wherein the currently selected lines and the output received from the second program are added to a pre-assigned alternate first program window.
9. The method of claim 5 above, wherein the adding step further comprises the step of interleaving the output received within the first program from the second program at the bottom with the echoed lines from the first program at the bottom of the file.
10. The method of claim 7 above, further comprising the step of transmitting only input lines of the currently selected lines.
11. A computerized apparatus for interacting with an external program from within another program executed by a computer, comprising:
a computer having a memory;
means, performed by the computer, for receiving a first command from a user into a first program and initiating execution of a second program in the computer in response to the first command, wherein the first program communicates with the second program in a bi-directional manner;
means, performed by the computer, for receiving a second command from a user into the first program and storing data in a retrieval buffer within the first program in response to the second command;
means, performed by the computer, for receiving a third command from a user into the first program, retrieving the data stored in the retrieval buffer, and passing the retrieved data from the first program to the second program in response to the third command, wherein the second program interprets the passed data, performs one or more functions in response to the interpretation of the passed data, and returns output to the first program as a result of the performed functions.
12. The computerized apparatus of claim 11 above, wherein the first command identifies a name of the second program.
13. The computerized apparatus of claim 11 above, further comprising the means for transmitting one or more currently selected lines from the first program to the second program, and adding the output received within the first program from the second program immediately following the currently selected lines in an file.
14. The computerized apparatus of claim 13 , where the currently selected lines are selected lines from a previously identified input file.
15. The computerized apparatus of claim 13 above, further comprising the means for transmitting only input lines of the currently selected lines.
16. The computerized apparatus of claim 11 above, further comprising the means for transmitting one or more currently selected lines from the first program to the second program, echoing the currently selected lines to the bottom of an file displayed by the first program, and adding the output received within the first program from the second program interleaved with the echoed lines.
17. The computerized apparatus of claim 16 above, further comprising the steps of:
changing the content of the currently selected line before transmitting it; and
undoing a last set of changes to the currently selected line after transmitting it.
18. The computerized apparatus of claim 15 , wherein the currently selected lines and the output received from the second program are added to a pre-assigned alternate first program window.
19. The computerized apparatus of claim 15 above, wherein the means for adding further comprises the means for interleaving the output received within the first program from the second program at the bottom with the echoed lines from the first program at the bottom of the file.
20. The computerized apparatus of claim 17 above, further comprising the means for transmitting only input lines of the currently selected lines.
21. An article of manufacture comprising a program storage medium readable by a computer having a memory, the medium tangibly embodying one or more programs of instructions executable by the computer to perform method steps for interacting with an external program from within another program executed by a computer, comprising the steps of:
receiving a first command from a user into a first program and initiating execution of a second program in the computer in response to the first command, wherein the first program communicates with the second program in a bi-directional manner;
receiving a second command from a user into the first program and storing data in a retrieval buffer within the first program in response to the second command;
receiving a third command from a user into the first program, retrieving the data stored in the retrieval buffer, and passing the retrieved data from the first program to the second program in response to the third command, wherein the second program interprets the passed data, performs one or more functions in response to the interpretation of the passed data, and returns output to the first program as a result of the performed functions.
22. The article of manufacture of claim 21 above, wherein the first command identifies a name of the second program.
23. The article of manufacture of claim 21 above, further comprising the steps of transmitting one or more currently selected lines from the first program to the second program, and adding the output received within the first program from the second program immediately following the currently selected lines in an file.
24. The article of manufacture of claim 23 , where the currently selected lines are selected lines from a previously identified input file.
25. The article of manufacture of claim 23 above, further comprising the step of transmitting only input lines of the currently selected lines.
26. The article of manufacture of claim 21 above, further comprising the steps of transmitting one or more currently selected lines from the first program to the second program, echoing the currently selected lines to the bottom of an file displayed by the first program, and adding the output received within the first program from the second program interleaved with the echoed lines.
27. The article of manufacture of claim 26 above, further comprising the steps of:
changing the content of the currently selected line before transmitting it; and
undoing a last set of changes to the currently selected line after transmitting it.
28. The article of manufacture of claim 25 , wherein the currently selected lines and the output received from the second program are added to a pre-assigned alternate first program window.
29. The article of manufacture of claim 25 above, wherein the adding step further comprises the step of interleaving the output received within the first program from the second program at the bottom with the echoed lines from the first program at the bottom of the file.
30. The article of manufacture of claim 27 above, further comprising the step of transmitting only input lines of the currently selected lines.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
US08/825,200 US6356954B2 (en) | 1997-03-27 | 1997-03-27 | Method for enabling interaction with external computer programs from an editor environment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
US08/825,200 US6356954B2 (en) | 1997-03-27 | 1997-03-27 | Method for enabling interaction with external computer programs from an editor environment |
Publications (2)
Publication Number | Publication Date |
---|---|
US20020002628A1 true US20020002628A1 (en) | 2002-01-03 |
US6356954B2 US6356954B2 (en) | 2002-03-12 |
Family
ID=25243356
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
US08/825,200 Expired - Fee Related US6356954B2 (en) | 1997-03-27 | 1997-03-27 | Method for enabling interaction with external computer programs from an editor environment |
Country Status (1)
Country | Link |
---|---|
US (1) | US6356954B2 (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20190095150A1 (en) * | 2017-09-27 | 2019-03-28 | Brother Kogyo Kabushiki Kaisha | Image Recording Apparatus |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6526453B2 (en) * | 1997-03-27 | 2003-02-25 | International Business Machines Corporation | Method for retrieving previous input commands to an external program from an editor environment |
US7069507B1 (en) * | 2000-09-29 | 2006-06-27 | Microsoft Corporation | Event routing model for an extensible editor |
US6717595B1 (en) * | 2000-12-29 | 2004-04-06 | Sun Microsystems, Inc. | Computer-based list editor |
Family Cites Families (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US4815029A (en) * | 1985-09-23 | 1989-03-21 | International Business Machines Corp. | In-line dynamic editor for mixed object documents |
US5142618A (en) * | 1986-11-21 | 1992-08-25 | Hitachi, Ltd. | Window management apparatus for a document creating apparatus |
US4896290A (en) * | 1987-08-24 | 1990-01-23 | Wang Laboratories, Inc. | Method for routing events from key strokes in a multi-processing computer systems |
JPH01234967A (en) * | 1988-03-16 | 1989-09-20 | Hitachi Ltd | Document forming device |
US5446896A (en) * | 1990-12-17 | 1995-08-29 | Next, Inc. | Method and apparatus for inter-program communication |
US5301326A (en) * | 1991-09-24 | 1994-04-05 | Microsoft Corporation | Method and system for controlling the execution of an application program |
FR2690260B1 (en) | 1992-04-17 | 1997-01-03 | Bull Sa | USE OF A VERY HIGH LEVEL BIDIRECTIONAL PROTOCOL FOR COMMUNICATION BETWEEN A HYPERMEDIA SYSTEM AND A PLURALITY OF EDITORS. |
WO1994027229A1 (en) * | 1993-05-10 | 1994-11-24 | Apple Computer, Inc. | Computer-human interface system which manipulates parts between a desktop and a document |
US5922054A (en) * | 1994-08-19 | 1999-07-13 | Canon Kabushiki Kaisha | System for managing external applications and files |
US5664208A (en) * | 1995-05-16 | 1997-09-02 | Apple Computer, Inc. | Methods and apparatuses for seamless compound document processing |
US5799314A (en) * | 1995-06-30 | 1998-08-25 | Sun Microsystems, Inc. | System and method of controlling mapping of data buffers for heterogenous programs in digital computer system |
US5835769A (en) | 1995-09-19 | 1998-11-10 | Sun Microsystems, Inc. | Apparatti and computer program products for integrating editors with applications |
-
1997
- 1997-03-27 US US08/825,200 patent/US6356954B2/en not_active Expired - Fee Related
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20190095150A1 (en) * | 2017-09-27 | 2019-03-28 | Brother Kogyo Kabushiki Kaisha | Image Recording Apparatus |
Also Published As
Publication number | Publication date |
---|---|
US6356954B2 (en) | 2002-03-12 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US7415696B2 (en) | Extensible help facility for a computer software application | |
JP2710188B2 (en) | Method and data processing apparatus for generating interaction between data processing system and user | |
US6212541B1 (en) | System and method for switching between software applications in multi-window operating system | |
EP3633535B1 (en) | Modal-less interface enhancements | |
US5220675A (en) | Method and system for customizing a user interface in an integrated environment | |
US5499335A (en) | Method and system for providing standard resources in different natural languages | |
US8099436B2 (en) | Methods and systems for automated searching | |
JP3950938B2 (en) | A system that combines document parts and editors in a computer human interface | |
US20060242591A1 (en) | File dialog user interfaces and creation of same | |
US20120084644A1 (en) | Content preview | |
US5621875A (en) | Method and system for automatic formatting of user selected text | |
US5982365A (en) | System and methods for interactively generating and testing help systems | |
US20050102258A1 (en) | Saving a file as multiple files | |
US7600199B2 (en) | Task-based interface with underlying extensible framework | |
US20070073713A1 (en) | Term search and link creation from a graphical user interface associated with presentation code | |
US5692198A (en) | Method for executing a process defined by a script by a plurality of types of description languages and an apparatus therefor | |
US8286073B2 (en) | Method for performing a load-on-demand operation on assigned graphic objects in a computer operating environment | |
US6356954B2 (en) | Method for enabling interaction with external computer programs from an editor environment | |
US6526453B2 (en) | Method for retrieving previous input commands to an external program from an editor environment | |
US20020007382A1 (en) | Computer having character input function,method of carrying out process depending on input characters, and storage medium | |
JPH04213730A (en) | Program converting system and method | |
KR100927348B1 (en) | Key User Interfacing Method and Key User Interfacing System | |
KR100824689B1 (en) | Method and system for providing website channel using short-key | |
JPH0981430A (en) | File system | |
JP3753780B2 (en) | Command processing method in information processing apparatus |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
AS | Assignment |
Owner name: INTERNATIONAL BUSINESS MACHINES CORPORATION, NEW Y Free format text: ASSIGNMENT OF ASSIGNORS INTEREST;ASSIGNOR:GOLDING, MICHAEL MORRIS;REEL/FRAME:008629/0204 Effective date: 19970325 |
|
FEPP | Fee payment procedure |
Free format text: PAYOR NUMBER ASSIGNED (ORIGINAL EVENT CODE: ASPN); ENTITY STATUS OF PATENT OWNER: LARGE ENTITY |
|
FPAY | Fee payment |
Year of fee payment: 4 |
|
REMI | Maintenance fee reminder mailed | ||
LAPS | Lapse for failure to pay maintenance fees | ||
STCH | Information on status: patent discontinuation |
Free format text: PATENT EXPIRED DUE TO NONPAYMENT OF MAINTENANCE FEES UNDER 37 CFR 1.362 |
|
FP | Lapsed due to failure to pay maintenance fee |
Effective date: 20100312 |