All sentences entered into execution windows are stored in an input log. You can recall entries by either pressing the Ctrl up-arrow and Ctrl down-arrow keys to cycle backwards and forwards through the log; or by selecting an entry from the Input Log listbox obtained from menu Edit|Input Log or by pressing Ctrl+D.
When you recall an entry from the input log, it is read into the currently active execution window, or the most recently active execution window if the currently active window is a script window. Only one input log is maintained, even if there is more than one execution window.
The input log does not store duplicate entries. If you recall an item from the middle of the log and execute it, the item now only appears at the end of the log - the entry in the middle of the log is deleted.