Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Command Window: How to paste and execute?

    Hello everyone,
    I could not find online an answer to my doubt, but I'm pretty sure that it has been solved ages ago: Is there a shortcut to paste an instruction in the command window and run it? So far, I use <ctrl-v> and then hit enter to run the command, but I wonder if there's a shortcut to paste & run. Thank you.



  • #2
    Well, if you are working out of the do-editor, you can simply highlight the lines of code you want to run, and then press <ctrl-D> (or click on the do-button, which is the rightmost button on the do-editor toolbar). The code will not be copied into the results window, but it will be run.

    If you are copying code from some other source, I don't know of any shortcut method.

    Comment


    • #3
      Thank you, Clyde. I'm working on the do-editor, cleaning a database. I write the code in the editor and then copy-paste it on the command window. I'm working so because want to see step by step the changes in the data editor. If I use the do-button I can't track those changes in the data editor.

      Comment


      • #4
        If I use the do-button I can't track those changes in the data editor.
        Why not? If you want to execute a program line-by-line from the do-editor, you can just highlight one line at a time in the do-editor, click the do-button, see what happens in the data editor (or, better, the Browser), and then proceed to the next.

        There is one limitation to this process: local macros defined during one "click of the do-button" will not remain defined in future "clicks of the do button," so that can prove problematic. The workaround for that is to re-define the macros and run the redefinition at the same time as a new line (or small block of lines) of code. Of course, that is probably just as cumbersome as copy-pasting into the Command window. But if the code you are using makes little or no use of local macros, this should be a more convenient approach.

        Comment


        • #5
          Originally posted by Clyde Schechter View Post
          There is one limitation to this process: local macros defined during one "click of the do-button" will not remain defined in future "clicks of the do button," so that can prove problematic. The workaround for that is to re-define the macros and run the redefinition at the same time as a new line (or small block of lines) of code. Of course, that is probably just as cumbersome as copy-pasting into the Command window.
          Thank you again, Clyde. It does make a lot of sense.

          Comment

          Working...
          X