Move focus to next document.

Move focus to next document.

5
NewbieNewbie
5

    Sep 06, 2004#1

    First Question

    my code is:

    Code: Select all

    InsertMode
    ColumnModeOff
    HexOff
    UnixReOff
    ColumnModeOn
    GotoLine 1
    Key HOME
    StartSelect
    Key END
    Copy 
    NextDocument
    GotoLine 1
    Find "^c"
    IfFound
    NextDocument
    Paste 
    EndIf
    ColumnModeOff
    I have three open documents. In the first document i copy the first line to the clipboard. Then i change to the second document and search for the content of the clipboard. When the string is found, the macro should go to the third document and paste the clipboard content.
    But this does not happen, the content of the clipboard is pasted in the first document instead.

    Second Question:
    When i save a file from a macro, how can the "save dialog" be suppressed?

      Sep 06, 2004#2

      "NextWindow" instead of "NextDocument" is working. :)

      But what about the "save dialog" ?

      206
      MasterMaster
      206

        Sep 06, 2004#3

        Happy,

        Get rid of the "ColumnModeOn" line (which doesn't do anything useful in your macro anyway) and everything appears to work. Don't ask me why. 8O


        If your open files have names already, the Save command shouldn't call up a dialog.
        Software For Metalworking
        http://closetolerancesoftware.com

        5
        NewbieNewbie
        5

          Sep 06, 2004#4

          mrainey56 wrote:Get rid of the "ColumnModeOn" line (which doesn't do anything useful in your macro anyway) and everything appears to work.
          I've removed "ColumnModeOn". "NextWindow" is working, "NextDocument" not. :cry:

          206
          MasterMaster
          206

            Sep 06, 2004#5

            Don't know what to say. This works on my system.

            InsertMode
            ColumnModeOff
            HexOff
            UnixReOff
            GotoLine 1
            Key HOME
            StartSelect
            Key END
            Copy
            NextDocument
            GotoLine 1
            Find "^c"
            IfFound
            NextDocument
            Paste
            EndIf
            Software For Metalworking
            http://closetolerancesoftware.com

            5
            NewbieNewbie
            5

              Sep 06, 2004#6

              Maybe a version related problem. I have 10.10a.

              2
              NewbieNewbie
              2

                Sep 14, 2004#7

                Did you try this?

                InsertMode
                ColumnModeOff
                HexOff
                UnixReOff
                GotoLine 1
                Key HOME
                StartSelect
                Key END
                Copy
                NextWindow
                GotoLine 1
                Find "^c"
                IfFound
                NextWindow
                Paste
                EndIf