Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #5502
    drcasa
    Member

    Hi all. If I have two different window tabs open, is it possible for me to search for text in one window tab, copy it, then paste it into the other window tab? When I try this using ctrl+tab to switch windows, the macro pastes the found text into the same window it copied it from.

    Thanks,
    Dave

    #5503
    Yutaka Emura
    Keymaster

    drcasa wrote:
    Hi all. If I have two different window tabs open, is it possible for me to search for text in one window tab, copy it, then paste it into the other window tab? When I try this using ctrl+tab to switch windows, the macro pastes the found text into the same window it copied it from.

    Thanks,
    Dave

    I am not sure exactly what you would like to do. Do you want to use a macro to paste one text in one tab to another text in another tab, and do you want to know how to write the macro?

    #5504
    drcasa
    Member

    Hi. What I am trying to accomplish is to search through an open document looking for a specific series of characters then copy that entire line into an open empty document. The macro should then go back to the first document and continue the search. I have been able to record the sequences of the macro that search for text, highlight the entire line then copy it but I have not been able to then swap to the other open document to perform the paste. I can manually swap to the other document via CTRL+TAB but that is not entered into the macro.

    Thanks,
    Dave

    #5505
    Yutaka Emura
    Keymaster

    drcasa wrote:
    Hi. What I am trying to accomplish is to search through an open document looking for a specific series of characters then copy that entire line into an open empty document. The macro should then go back to the first document and continue the search. I have been able to record the sequences of the macro that search for text, highlight the entire line then copy it but I have not been able to then swap to the other open document to perform the paste. I can manually swap to the other document via CTRL+TAB but that is not entered into the macro.

    Thanks,
    Dave

    Please refer to the Help, and you will find Next Document command in the Command section:
    http://www.emeditor.com/help/cmd/window/next_window.htm

    Then, you will find the corresponding macro will be:

    editor.ExecuteCommandByID(4245);

    which is missing because this command is not recorded by EmEditor automatically. You will need to insert this line at the missing place. Alternatively, you can use Documents Collection and Document Object to enumerate documents and activate a selected document.

    #5510
    drcasa
    Member

    Thanks, that works. Is there a reason that the next document command is not recorded?

    Thanks,
    Dave

    #5511
    Yutaka Emura
    Keymaster

    drcasa wrote:
    Thanks, that works. Is there a reason that the next document command is not recorded?

    Thanks,
    Dave

    Yes. Not all the commands are recorded. In this case, the macro will be interrupted if the Next Document command is executed when the Tab Bar is not enabled. I might consider adding more commands that can be recorded in the future.

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.