How to know the last two activated documents?

How to know the last two activated documents?

5
NewbieNewbie
5

    Jun 20, 2009#1

    Hi all,

    I need a function recording the last two activated documents. For example,

    Five open files by tab way:
    File1 File2 File3 File4 File5
    I first click File2, then File5. When the File5 is activated, I want to know which is the last activated document in five open files. The correct answer is File2.
    Anybody know how to do?

    Thanks.

    6,675585
    Grand MasterGrand Master
    6,675585

      Jun 20, 2009#2

      I think this is not possible in the script environment. The script environment works based on the document array (= open file tabs). The window history is not available in the script environment. In macros you can use NextWindow and PreviousWindow to cycle through the window history list and NextDocument and PreviousDocument to use the document array. But those 4 macro commands are not available in the script environment.
      Best regards from an UC/UE/UES for Windows user from Austria

      5
      NewbieNewbie
      5

        Jun 20, 2009#3

        Hi Mofi,

        I agree your viewpoints.
        But if possible, UE do better by scripts way, I think, we can fully make use of scripts power in our work.
        UE should expose more and more function interface by scripts way, which takes users huge benefits. :)