Loading ...
Sorry, an error occurred while loading the content.

List of open application windows?

Expand Messages
  • John Mitchell
    I see I can use ^$GetAppTitle$ to get the title of the current window. How can I loop through all windows to build a list of titles? What is need is NEXTAPP
    Message 1 of 10 , Jul 26, 2004
    • 0 Attachment
      I see I can use ^$GetAppTitle$ to get the title of the current window.
      How can I loop through all windows to build a list of titles? What is
      need is "NEXTAPP" command, or some mechanism for simulating it.

      Regards, John
    • Peter Stagg
      This may or may not be of use to you: ^$GetDosOutput(TASKLIST /FI USERNAME ne NT AUTHORITY SYSTEM /FI STATUS eq running /v)$
      Message 2 of 10 , Jul 27, 2004
      • 0 Attachment
        This may or may not be of use to you:

        ^$GetDosOutput(TASKLIST /FI "USERNAME ne NT AUTHORITY\SYSTEM" /FI "STATUS eq
        running" /v)$

        >
        > Message: 6
        > Date: Tue, 27 Jul 2004 12:48:30 +1000
        > From: "John Mitchell" <notetab@...>
        > Subject: List of open application windows?
        >
        > I see I can use ^$GetAppTitle$ to get the title of the current window.
        > How can I loop through all windows to build a list of titles? What is
        > need is "NEXTAPP" command, or some mechanism for simulating it.
        >
        > Regards, John
      • John Mitchell
        Peter Thanks. I wasn t familiar with the TASKLIST command but now that you have pointed me in the right direction I m sure I can take it from there. Something
        Message 3 of 10 , Jul 27, 2004
        • 0 Attachment
          Peter

          Thanks. I wasn't familiar with the TASKLIST command but now that
          you have pointed me in the right direction I'm sure I can take it
          from there.

          Something along the lines of ^!FocusNextApp, which could be used to
          cycle through open application windows, would be a nice to have in the
          next release.

          Regards, John

          ----- Original message -----
          From: "Peter Stagg" <peter.stagg@...>
          To: ntb-clips@yahoogroups.com, "'John Mitchell'"
          <notetab@...>
          Date: Wed, 28 Jul 2004 10:38:07 +1000
          Subject: RE: List of open application windows?

          This may or may not be of use to you:

          ^$GetDosOutput(TASKLIST /FI "USERNAME ne NT AUTHORITY\SYSTEM" /FI
          "STATUS eq running" /v)$

          >
          > Message: 6 Date: Tue, 27 Jul 2004 12:48:30 +1000 From: "John Mitchell"
          > <notetab@...> Subject: List of open application
          > windows?
          >
          > I see I can use ^$GetAppTitle$ to get the title of the current window.
          > How can I loop through all windows to build a list of titles? What is
          > need is "NEXTAPP" command, or some mechanism for simulating it.
          >
          > Regards, John
        • Jody
          Hi John, ... Does anybody know the syntax for XP? I tried putting my username in the above, but there was no output. ... If you can get your list, then format
          Message 4 of 10 , Jul 28, 2004
          • 0 Attachment
            Hi John,

            >Thanks. I wasn't familiar with the TASKLIST command but now that
            >you have pointed me in the right direction I'm sure I can take it
            >from there.

            Does anybody know the syntax for XP? I tried putting my username
            in the above, but there was no output.

            >Something along the lines of ^!FocusNextApp, which could be used to
            >cycle through open application windows, would be a nice to have in the
            >next release.

            If you can get your list, then format it into an array. I don't
            know exactly what you are doing, and the follow might have
            incorrect syntax, but maybe it will help...

            Have your Clip get the apps from the dosoutput and format it into
            ^?{==a|wizard|format}.

            ^!SetArray %OpenAppList%=^?{(T=A)Open Apps=^%Formatteddosoutput%}
            ^!Set %Count%=^%OpenAppList0%
            ^!Set %Index%=0

            :Loop
            ^!Inc %Index%
            ^!If ^%Index% = ^%Count% Next else End/or maybe reset and start again
            ^!FocusApp "^%OpenAppList^%Index%%"
            ; closes most apps
            ^!Keyboard Alt+F4
            ^!Goto Loop

            >^$GetDosOutput(TASKLIST /FI "USERNAME ne NT AUTHORITY\SYSTEM" /FI
            >"STATUS eq running" /v)$


            Happy Clip'n!
            Jody

            www.clean-funnies.com, http://www.fookes.us/maillist.htm

            Subscribe: mailto:ntb-Clips-Subscribe@yahoogroups.com
            UnSubscribe: mailto:ntb-Clips-UnSubscribe@yahoogroups.com
            Options: http://groups.yahoo.com/group/ntb-clips
          • John Zeman
            ... Try this Jody, it works on my XP Pro system. John ; Opened Program to look for ^!Set %PROG%=Outlook ; next line is long, watch for line breaks ^!Set
            Message 5 of 10 , Jul 28, 2004
            • 0 Attachment
              --- In ntb-clips@yahoogroups.com, Jody <kjv-av1611@e...> wrote:
              >
              > >Thanks. I wasn't familiar with the TASKLIST command but now that
              > >you have pointed me in the right direction I'm sure I can take it
              > >from there.
              >
              > Does anybody know the syntax for XP? I tried putting my username
              > in the above, but there was no output.
              >


              Try this Jody, it works on my XP Pro system.

              John



              ; Opened Program to look for

              ^!Set %PROG%=Outlook

              ; next line is long, watch for line breaks

              ^!Set %X%=^$GetDosOutput("tasklist|find /i "^%PROG%"||echo ^%PROG%
              NOT FOUND")$

              ; above line searches the output of tasklist
              ; and pipes it to the find command which
              ; looks for the program name
              ; if program name is not found the output
              ; is set to the program name followed by
              ; NOT FOUND

              ; from this notetab can process the results
              ; to do whatever is desired

              ^!InsertText Variable X is: ^%X%
            • Hugo Paulissen
              Peter, thank you for this... Jody, I simply copied the whole line, as it is (without specifying a USERNAME, I mean) and I got the list of open apps.
              Message 6 of 10 , Jul 28, 2004
              • 0 Attachment
                Peter, thank you for this...

                Jody, I simply copied the whole line, as it is (without specifying a
                USERNAME, I mean) and I got the list of open apps.

                ^$GetDosOutput(TASKLIST /FI "USERNAME ne NT
                AUTHORITY\SYSTEM" /FI "STATUS eq
                running" /v)$

                > Does anybody know the syntax for XP? I tried putting my username
                > in the above, but there was no output.
                >

                Hugo
              • R Shapp
                Hi John and Jody, I m trying to follow your clip, but I don t understand how you are getting TASKLIST to return anything useful.. It isn t recognized as a DOS
                Message 7 of 10 , Jul 28, 2004
                • 0 Attachment
                  Hi John and Jody,

                  I'm trying to follow your clip, but I don't understand how you are getting
                  TASKLIST to return anything useful.. It isn't recognized as a DOS command,
                  and Clip Help search doesn't find it. TASKLIST*.* is not found in a search of
                  my C drive.

                  If I understand correctly, you are invoking TASKLIST to display a list of all
                  the open applications. Is that right?

                  Ray Shapp
                • John Zeman
                  ... getting ... command, ... a search of ... list of all ... I suspect your version of Windows doesn t include this utility Ray. Tasklist (and its counterpart
                  Message 8 of 10 , Jul 28, 2004
                  • 0 Attachment
                    --- In ntb-clips@yahoogroups.com, R Shapp <ras45@o...> wrote:
                    > Hi John and Jody,
                    >
                    > I'm trying to follow your clip, but I don't understand how you are
                    getting
                    > TASKLIST to return anything useful.. It isn't recognized as a DOS
                    command,
                    > and Clip Help search doesn't find it. TASKLIST*.* is not found in
                    a search of
                    > my C drive.
                    >
                    > If I understand correctly, you are invoking TASKLIST to display a
                    list of all
                    > the open applications. Is that right?
                    >
                    > Ray Shapp


                    I suspect your version of Windows doesn't include this utility Ray.

                    Tasklist (and its counterpart taskkill) are command line utilities
                    that are included with Windows XP Pro. I'm not sure which other
                    versions of Windows they're in. I've heard taskkill (which lets you
                    close open programs from a command line) is only in XP Pro, but I
                    won't swear to that.

                    If you go to a DOS prompt and type

                    tasklist /?

                    then press ENTER and you see an error message, then tasklist is not
                    in your machine.

                    Same goes for taskkill /?

                    Tasklist by itself returns a listing of all open running programs.
                    Tasklist as I used it in the sample clip I sent to Jody, essentially
                    returns a yes or no answer as to whether one specific program is
                    running. (Although it doesn't really return "Yes" or "No" it just
                    returns different results depending on whether the program is running
                    or not. Granted, my clip is pretty crude and not really practical as
                    it is, I was in a bit of a hurry as I had to leave town for a few
                    hours so I just typed out the basics of one way to do it and then hit
                    the road..

                    I can go into more detail about it later if you want, but perhaps we
                    should move this to the scripts or off topic forum if we do.

                    John
                  • John Mitchell
                    Ray Tasklist is XP Pro only. A full syntax description may be found here..
                    Message 9 of 10 , Jul 28, 2004
                    • 0 Attachment
                      Ray

                      Tasklist is XP Pro only. A full syntax description may be found here..

                      http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/tasklist.mspx

                      Regards, John M

                      ----- Original message -----
                      From: "R Shapp" <ras45@...>
                      To: ntb-clips@yahoogroups.com
                      Date: Wed, 28 Jul 2004 17:28:45 -0400
                      Subject: Re: [Clip] RE: List of open application windows?

                      Hi John and Jody,

                      I'm trying to follow your clip, but I don't understand how you are
                      getting
                      TASKLIST to return anything useful.. It isn't recognized as a DOS
                      command,
                      and Clip Help search doesn't find it. TASKLIST*.* is not found in a
                      search of
                      my C drive.

                      If I understand correctly, you are invoking TASKLIST to display a list
                      of all
                      the open applications. Is that right?

                      Ray Shapp






                      Yahoo! Groups Links
                    • R Shapp
                      Hi Johns M and Z, That explains it. Thank you. Ray Shapp WinXP Home
                      Message 10 of 10 , Jul 28, 2004
                      • 0 Attachment
                        Hi Johns M and Z,

                        <<Tasklist is XP Pro only.>>

                        That explains it.

                        Thank you.

                        Ray Shapp
                        WinXP Home
                      Your message has been successfully submitted and would be delivered to recipients shortly.