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

RE: [power-pro] Help with checking for Window

Expand Messages
  • Gardner, Paul G.
    What I would suggest is creating a command list that runs every time a window appears. In that list, you can specify the caption of the window (or exe name or
    Message 1 of 11 , Apr 2 4:34 AM
    View Source
    • 0 Attachment
      What I would suggest is creating a command list that runs every time a
      window appears. In that list, you can specify the caption of the window (or
      exe name or whatever) you want to perform an action on. If there is a hot
      key on the "No" button, use *Keys {alt}n (assuming the hot key is "n") to
      close the window or you can simulate a click event to click on the button if
      you can determine the location of the button.

      Check the help index for "auto run when a window opens" for more details.

      Paul


      -----Original Message-----
      From: power-pro@yahoogroups.com [mailto:power-pro@yahoogroups.com] On Behalf
      Of ehathgepiurhe
      Sent: Sunday, April 01, 2007 12:06 AM
      To: power-pro@yahoogroups.com
      Subject: [power-pro] Help with checking for Window



      Hi everyone,

      I was after a bit of help with getting PowerPro to detect a particular
      program window/dialog and to act on it. The window/dialog title is
      "Sygate Personal Firewall Pro {date} {time}" and the text is "NT
      Kernel System has changed...blah blah blah". What I want PowerPro to
      do is to detect if this window/dialog ever pops up, and if so, to
      click the "No" button in the window/dialog automatically. Can this be
      done with PowerPro? I've had a look through the helpfile, but I
      haven't been able to progress far. All I have so far is (in the
      HookWindowEvents group):
      wait.until (activewindow("*Sygate Personal Firewall Pro*"))
      --

      Regards,

      CM







      [Non-text portions of this message have been removed]
    • ehathgepiurhe
      ... time a ... window (or ... is a hot ... n ) to ... button if ... details. ... On Behalf ... particular ... be ... Hi Paul, Is it possible for PowerPro to
      Message 2 of 11 , Apr 3 2:17 AM
      View Source
      • 0 Attachment
        --- In power-pro@yahoogroups.com, "Gardner, Paul G." <p.gardner@...>
        wrote:
        >
        > What I would suggest is creating a command list that runs every
        time a
        > window appears. In that list, you can specify the caption of the
        window (or
        > exe name or whatever) you want to perform an action on. If there
        is a hot
        > key on the "No" button, use *Keys {alt}n (assuming the hot key is
        "n") to
        > close the window or you can simulate a click event to click on the
        button if
        > you can determine the location of the button.
        >
        > Check the help index for "auto run when a window opens" for more
        details.
        >
        > Paul
        >
        >
        > -----Original Message-----
        > From: power-pro@yahoogroups.com [mailto:power-pro@yahoogroups.com]
        On Behalf
        > Of ehathgepiurhe
        > Sent: Sunday, April 01, 2007 12:06 AM
        > To: power-pro@yahoogroups.com
        > Subject: [power-pro] Help with checking for Window
        >
        >
        >
        > Hi everyone,
        >
        > I was after a bit of help with getting PowerPro to detect a
        particular
        > program window/dialog and to act on it. The window/dialog title is
        > "Sygate Personal Firewall Pro {date} {time}" and the text is "NT
        > Kernel System has changed...blah blah blah". What I want PowerPro to
        > do is to detect if this window/dialog ever pops up, and if so, to
        > click the "No" button in the window/dialog automatically. Can this
        be
        > done with PowerPro? I've had a look through the helpfile, but I
        > haven't been able to progress far. All I have so far is (in the
        > HookWindowEvents group):
        > wait.until (activewindow("*Sygate Personal Firewall Pro*"))
        > --
        >
        > Regards,
        >
        > CM
        >
        >
        >
        >
        >
        >
        >
        > [Non-text portions of this message have been removed]
        >

        Hi Paul,

        Is it possible for PowerPro to detect particular bits of text in a
        window? In this case, I need to have that particular bit of text
        detected as when my firewall pops up windows other than the one for
        ntoskrnl.exe (and the windows title bar is always the same, no matter
        what the message), I want to see those (ie not have PowerPro
        automatically click No to them).

        Regards,

        CM
      • Gardner, Paul G.
        ... It depends on what is used to display the text. If you can reference the control by an id, then you can using the win plugin to retrieve the text. Some
        Message 3 of 11 , Apr 3 4:06 AM
        View Source
        • 0 Attachment
          >Hi Paul,

          >Is it possible for PowerPro to detect particular bits of text in a
          >window? In this case, I need to have that particular bit of text
          >detected as when my firewall pops up windows other than the one for
          >ntoskrnl.exe (and the windows title bar is always the same, no matter
          >what the message), I want to see those (ie not have PowerPro
          >automatically click No to them).

          >Regards,

          >CM

          It depends on what is used to display the text. If you can reference the
          control by an id, then you can using the win plugin to retrieve the text.
          Some times you can get that, and sometimes you can't. For example, the
          below is an older script I used to use to retrieve a value from a text label
          on a dialog box:

          CmdBtn = win.childtextbyindex("c=TWARNINGSCREEN",4)

          The CmdBtn variable would be filled by the text on the 4th control of the
          active window. See "win plugin" in the Help index for some more
          information.

          Below is an older script from Alan Martin ( I believe) that would retrieve
          all the text on a window and display it. The caption list is passed into
          the script. Try it to see if you can retrieve the text you want. If so,
          then you can replace the "4" above with the number associated to the text in
          the file. I have a hot key that calls the script. I pass in the active
          caption to this script. Watch for line breaks.

          Local HandleList = Win.HandleList(Arg(1), 1)
          If(Not(HandleList))
          Quit(MessageBox("Warning", "No windows match the given caption list:\n"
          ++ Arg(1), "Window Info"))
          Local Output
          For(Local HandleIter = 1; ; HandleIter = HandleIter + 1)
          Local Handle = Word(HandleList, HandleIter)
          If(Not(Handle))
          Break
          ;below is 1 line.
          Output = Output ++ HandleIter ++ ". " ++ Win.Caption(Handle) ++ "
          (Handle " ++ Handle ++ ", Class C=" ++ Win.Class(Handle)
          Output = Output ++ ", Owner =" ++ File.Name(Win.EXEPath(Handle)) ++
          ")\r\n"
          For(Local ControlIter = 1; ; ControlIter = ControlIter + 1)
          ;below is 1 line
          Local ControlText =
          ReplaceChars(ReplaceChars(ReplaceChars(Win.ChildTextByIndex(Handle,
          ControlIter), "\r\n", "¶"), "\r", "¶"), "\n", "¶")
          If(ControlText != "")
          Output = Output ++ " " ++ ControlIter ++ ". " ++ ControlText
          ++ "\r\n"
          If(_EOF_)
          Break
          EndFor
          Output = Output ++ "\r\n"
          EndFor

          File.WriteAll(Env("Temp") ++ "\\Window Info.txt", Output)
          "%Temp%\Window Info.txt"

          Paul
        • ehathgepiurhe
          On Tue, 3 Apr 2007 07:06:31 -0400, Gardner, Paul G. ... Hi Paul, Thanks for that. I have found a second way to do the same thing. I wrote an AutoIt script to
          Message 4 of 11 , Apr 4 9:23 PM
          View Source
          • 0 Attachment
            On Tue, 3 Apr 2007 07:06:31 -0400, "Gardner, Paul G."
            <p.gardner@...> wrote:

            >
            >It depends on what is used to display the text. If you can reference the
            >control by an id, then you can using the win plugin to retrieve the text.
            >Some times you can get that, and sometimes you can't. For example, the
            >below is an older script I used to use to retrieve a value from a text label
            >on a dialog box:
            >
            > CmdBtn = win.childtextbyindex("c=TWARNINGSCREEN",4)
            >
            >The CmdBtn variable would be filled by the text on the 4th control of the
            >active window. See "win plugin" in the Help index for some more
            >information.
            >
            >Below is an older script from Alan Martin ( I believe) that would retrieve
            >all the text on a window and display it. The caption list is passed into
            >the script. Try it to see if you can retrieve the text you want. If so,
            >then you can replace the "4" above with the number associated to the text in
            >the file. I have a hot key that calls the script. I pass in the active
            >caption to this script. Watch for line breaks.
            >
            >Local HandleList = Win.HandleList(Arg(1), 1)
            >If(Not(HandleList))
            > Quit(MessageBox("Warning", "No windows match the given caption list:\n"
            >++ Arg(1), "Window Info"))
            >Local Output
            >For(Local HandleIter = 1; ; HandleIter = HandleIter + 1)
            > Local Handle = Word(HandleList, HandleIter)
            > If(Not(Handle))
            > Break
            > ;below is 1 line.
            > Output = Output ++ HandleIter ++ ". " ++ Win.Caption(Handle) ++ "
            >(Handle " ++ Handle ++ ", Class C=" ++ Win.Class(Handle)
            > Output = Output ++ ", Owner =" ++ File.Name(Win.EXEPath(Handle)) ++
            >")\r\n"
            > For(Local ControlIter = 1; ; ControlIter = ControlIter + 1)
            > ;below is 1 line
            > Local ControlText =
            >ReplaceChars(ReplaceChars(ReplaceChars(Win.ChildTextByIndex(Handle,
            >ControlIter), "\r\n", "¶"), "\r", "¶"), "\n", "¶")
            > If(ControlText != "")
            > Output = Output ++ " " ++ ControlIter ++ ". " ++ ControlText
            >++ "\r\n"
            > If(_EOF_)
            > Break
            > EndFor
            > Output = Output ++ "\r\n"
            >EndFor
            >
            >File.WriteAll(Env("Temp") ++ "\\Window Info.txt", Output)
            >"%Temp%\Window Info.txt"
            >
            >Paul
            >

            Hi Paul,

            Thanks for that. I have found a second way to do the same thing. I
            wrote an AutoIt script to check for the window and to click the No
            button. The only thing is that I don't want the script to be running
            all the time, only when the window actually pops up. So, I thought of
            using PowerPro to detect the window, and then to run the script. The
            only problem is that when I put an entry in the HookWindowEvents
            group, PowerPro and AutoIt went crazy. I'm pretty sure it was due to
            the command I used:
            Wait in the Command field, and
            until (activewindow("Sygate*")) in the Command Parameters field.
            Anyway, the AutoIt script began opening tens of different instances of
            it, and PowerPro crashed (couldn't handle the load I guess)
            I then tried:
            Wait in the Command field, and
            for (activewindow("Sygate*")) in the Command Parameters field.
            Exact same thing. What would be the correct command to use within
            PowerPro to wait for a window titled "Sygate Personal Firewall Pro"?
            The script I wrote will actually check the text of the window, so if
            it isn't exactly what I want, the script will do nothing and exit. I
            just need to work out how to get PowerPro to run it when that window
            pops up.
            --

            Regards,

            CM
          • Gardner, Paul G.
            ... CM, What I ve used in the past is an auto-run command list. In the Help index, enter this : auto run when a window opens without the quotes. In short,
            Message 5 of 11 , Apr 5 3:58 AM
            View Source
            • 0 Attachment
              >Thanks for that. I have found a second way to do the same thing. I
              >wrote an AutoIt script to check for the window and to click the No
              >button. The only thing is that I don't want the script to be running
              >all the time, only when the window actually pops up. So, I thought of
              >using PowerPro to detect the window, and then to run the script. The
              >only problem is that when I put an entry in the HookWindowEvents
              >group, PowerPro and AutoIt went crazy. I'm pretty sure it was due to
              >the command I used:
              >Wait in the Command field, and
              >until (activewindow(,Sygate*,)) in the Command Parameters field.
              >Anyway, the AutoIt script began opening tens of different instances of
              >it, and PowerPro crashed (couldn't handle the load I guess)
              >I then tried:
              >Wait in the Command field, and
              >for (activewindow(,Sygate*,)) in the Command Parameters field.
              >Exact same thing. What would be the correct command to use within
              >PowerPro to wait for a window titled ,Sygate Personal Firewall Pro,?
              >The script I wrote will actually check the text of the window, so if
              >it isn't exactly what I want, the script will do nothing and exit. I
              >just need to work out how to get PowerPro to run it when that window
              >pops up.

              CM,

              What I've used in the past is an auto-run command list. In the Help index,
              enter this : "auto run when a window opens" without the quotes.

              In short, create a new command list. On the Command List tab in the
              configure dialog box, select the setup button. Go to the "Special List" tab
              and ensure that your new command list is the one listed in the "Open" drop
              down.

              Then, create a new list item. In the Name edit box put the caption
              "Sygate*" (without the quotes). Either put the call to the autoit script in
              the command list's "Enter Command" edit box, or create a PP script file with
              the AutoIt script file call and call the PP script from the "Enter Command"
              edit box. Usually, I use a win.debug('here') call first until I can get the
              Name right, then swap out the debug call with my real code. You might need
              to play with the caption some.

              If you need to use a wait call, then I recommend the script. My experience
              with the auto-run is that the additional check is unnecessary, but your
              machine might be different.

              I stay away from HookWindows. Every time I use it, I get in trouble, and I
              don't customize my machine so heavily that PP native abilities don't cover
              what I need.

              HTH
              Paul



              [Non-text portions of this message have been removed]
            • ehathgepiurhe
              On Thu, 5 Apr 2007 06:58:45 -0400, Gardner, Paul G. ... Hi Paul, Yes, hookwindowsevents is dangerous - I copied my script into this group once more after
              Message 6 of 11 , Apr 7 9:55 AM
              View Source
              • 0 Attachment
                On Thu, 5 Apr 2007 06:58:45 -0400, "Gardner, Paul G."
                <p.gardner@...> wrote:

                >
                >CM,
                >
                >What I've used in the past is an auto-run command list. In the Help index,
                >enter this : "auto run when a window opens" without the quotes.
                >
                >In short, create a new command list. On the Command List tab in the
                >configure dialog box, select the setup button. Go to the "Special List" tab
                >and ensure that your new command list is the one listed in the "Open" drop
                >down.
                >
                >Then, create a new list item. In the Name edit box put the caption
                >"Sygate*" (without the quotes). Either put the call to the autoit script in
                >the command list's "Enter Command" edit box, or create a PP script file with
                >the AutoIt script file call and call the PP script from the "Enter Command"
                >edit box. Usually, I use a win.debug('here') call first until I can get the
                >Name right, then swap out the debug call with my real code. You might need
                >to play with the caption some.
                >
                >If you need to use a wait call, then I recommend the script. My experience
                >with the auto-run is that the additional check is unnecessary, but your
                >machine might be different.
                >
                >I stay away from HookWindows. Every time I use it, I get in trouble, and I
                >don't customize my machine so heavily that PP native abilities don't cover
                >what I need.
                >
                >HTH
                >Paul
                >

                Hi Paul,

                Yes, hookwindowsevents is dangerous - I copied my script into this
                group once more after faling to get the open window thing working.
                This time, PowerPro opened up 453 instances of my script before I
                managed to get PowerPro responding so I could move the shortcut out of
                hookwindowsevents. Killing those 453 instances one at a time with Task
                Manager was painful, and I should have known better - everytime I do
                something with that hook group, something like this happens. Still,
                that helpfile entry you pointed me to made me realise one thing: that
                there are two ways to detect open windows. I had thought that
                hookwindows was the only way, so it was the only way I had ever tried
                to do stuff like this. Now I have my new group setup for open windows,
                I can use that instead. It's less dangerous.

                Anyway, I'll have to do some more experimenting with the new window
                thing you mentioned. I created a new group for it, went into setup and
                made sure that group was the one being used for new windows. I then
                added a shortcut like you suggested - 'Sygate*' as the name field, and
                then the path to the 'compiled into Windows .exe' AutoIt script.
                However, when that Sygate window appeared, the script did not trigger.
                It may be because the firewall loads before PowerPro in the Windows
                boot sequence (the window usually pops up shortly after booting). I'm
                not 100% sure (I have no way of telling), but I think the window
                appeared before PowerPro loaded, which would explain why it didn't
                work. While the window was still displayed, I opened up PowerPro
                config, just to see if that would get PowerPro to see the window. It
                didn't, and that's when I copied the shortcut into hookwindowsevent.
                And what happened next is what I described above. The script works
                fine - if I manually run the .exe when the Sygate window appears, the
                script gets rid of it. If I drag a shortcut to the script into the
                Windows startup folder, it gets rid of the window as soon as it
                appears (it looks like the startup folder entries are run before the
                firewall, which is a service). I could leave it at that, but I don't
                really want the .exe running all the time, I like to keep my PC lean
                and mean with background tasks. I just need to work out if it is
                possible to get PowerPro to detect this window with the boot sequence
                the way it is.
                --

                Regards,

                CM
              • ehathgepiurhe
                On Thu, 5 Apr 2007 06:58:45 -0400, Gardner, Paul G. ... Hm, just to add to my previous post, I m not sure that PowerPro can actually detect the Sygate
                Message 7 of 11 , Apr 7 10:09 AM
                View Source
                • 0 Attachment
                  On Thu, 5 Apr 2007 06:58:45 -0400, "Gardner, Paul G."
                  <p.gardner@...> wrote:

                  >
                  >I stay away from HookWindows. Every time I use it, I get in trouble, and I
                  >don't customize my machine so heavily that PP native abilities don't cover
                  >what I need.
                  >
                  >HTH
                  >Paul
                  >

                  Hm, just to add to my previous post, I'm not sure that PowerPro can
                  actually detect the Sygate windows. Maybe it's not a case of Sygate
                  loading before PowerPro after all. The reason why I say this is that
                  I've just been experimenting. Rather than having PowerPro run a script
                  when the Sygate window opens, I set it to "Position 1 1". I then
                  opened up the Sygate console itself (it's not the window I want the
                  AutoIt script to run against, however it has the word Sygate in the
                  window title, so I thought this would be a good test to see if the
                  command list actually worked).

                  Nothing happened. PowerPro did not re-position the window. I then
                  tried mintotray instead of position. Same thing - PowerPro did nothing
                  to the window. Is there any way of telling if a window is something
                  that PowerPro cannot detect? I know that AutoIt cannot detect all
                  Windows controls (for example, it cannot detect Windows Control Panel
                  windows), so I was thinking that maybe PowerPro had the same
                  limitation. My command was Sygate* in the name field. I also tried
                  with =smc.exe (the Sygate .exe file) in the name field. Same thing
                  happened - PowerPro did nothing to the Sygate window.
                  --

                  Regards,

                  CM
                • Gardner, Paul G.
                  CM, If the windows appears before PP is run, then it won t detect it using the Autorun command list. If the above is true, then the only other thing I can
                  Message 8 of 11 , Apr 10 3:44 AM
                  View Source
                  • 0 Attachment
                    CM,

                    If the windows appears before PP is run, then it won't detect it using the
                    Autorun command list.

                    If the above is true, then the only other thing I can think of is to have PP
                    check for the window being open when it starts.

                    Move your detection code into a script (or copy it for this experiment).

                    Open the config, go to the Scheduler tab and create a start up item (click
                    'new' and then at the top of the item dialog box, makes sure the startup
                    radio button is selected). Call your script from that item and see if it
                    picks up that window. You'll need to restart PP with the Sygate message
                    open in order to test if it works. I would recommend testing the script
                    itself first.

                    Paul


                    -----Original Message-----
                    From: power-pro@yahoogroups.com [mailto:power-pro@yahoogroups.com] On Behalf
                    Of ehathgepiurhe
                    Sent: Saturday, April 07, 2007 12:55 PM
                    To: power-pro@yahoogroups.com
                    Subject: [power-pro] Re: Help with checking for Window



                    On Thu, 5 Apr 2007 06:58:45 -0400, "Gardner, Paul G."
                    <p.gardner@stanleyas <mailto:p.gardner%40stanleyassociates.com>
                    sociates.com> wrote:

                    >
                    >CM,
                    >
                    >What I've used in the past is an auto-run command list. In the Help index,
                    >enter this : "auto run when a window opens" without the quotes.
                    >
                    >In short, create a new command list. On the Command List tab in the
                    >configure dialog box, select the setup button. Go to the "Special List" tab
                    >and ensure that your new command list is the one listed in the "Open" drop
                    >down.
                    >
                    >Then, create a new list item. In the Name edit box put the caption
                    >"Sygate*" (without the quotes). Either put the call to the autoit script in
                    >the command list's "Enter Command" edit box, or create a PP script file
                    with
                    >the AutoIt script file call and call the PP script from the "Enter Command"
                    >edit box. Usually, I use a win.debug('here') call first until I can get the
                    >Name right, then swap out the debug call with my real code. You might need
                    >to play with the caption some.
                    >
                    >If you need to use a wait call, then I recommend the script. My experience
                    >with the auto-run is that the additional check is unnecessary, but your
                    >machine might be different.
                    >
                    >I stay away from HookWindows. Every time I use it, I get in trouble, and I
                    >don't customize my machine so heavily that PP native abilities don't cover
                    >what I need.
                    >
                    >HTH
                    >Paul
                    >

                    Hi Paul,

                    Yes, hookwindowsevents is dangerous - I copied my script into this
                    group once more after faling to get the open window thing working.
                    This time, PowerPro opened up 453 instances of my script before I
                    managed to get PowerPro responding so I could move the shortcut out of
                    hookwindowsevents. Killing those 453 instances one at a time with Task
                    Manager was painful, and I should have known better - everytime I do
                    something with that hook group, something like this happens. Still,
                    that helpfile entry you pointed me to made me realise one thing: that
                    there are two ways to detect open windows. I had thought that
                    hookwindows was the only way, so it was the only way I had ever tried
                    to do stuff like this. Now I have my new group setup for open windows,
                    I can use that instead. It's less dangerous.

                    Anyway, I'll have to do some more experimenting with the new window
                    thing you mentioned. I created a new group for it, went into setup and
                    made sure that group was the one being used for new windows. I then
                    added a shortcut like you suggested - 'Sygate*' as the name field, and
                    then the path to the 'compiled into Windows .exe' AutoIt script.
                    However, when that Sygate window appeared, the script did not trigger.
                    It may be because the firewall loads before PowerPro in the Windows
                    boot sequence (the window usually pops up shortly after booting). I'm
                    not 100% sure (I have no way of telling), but I think the window
                    appeared before PowerPro loaded, which would explain why it didn't
                    work. While the window was still displayed, I opened up PowerPro
                    config, just to see if that would get PowerPro to see the window. It
                    didn't, and that's when I copied the shortcut into hookwindowsevent.
                    And what happened next is what I described above. The script works
                    fine - if I manually run the .exe when the Sygate window appears, the
                    script gets rid of it. If I drag a shortcut to the script into the
                    Windows startup folder, it gets rid of the window as soon as it
                    appears (it looks like the startup folder entries are run before the
                    firewall, which is a service). I could leave it at that, but I don't
                    really want the .exe running all the time, I like to keep my PC lean
                    and mean with background tasks. I just need to work out if it is
                    possible to get PowerPro to detect this window with the boot sequence
                    the way it is.
                    --

                    Regards,

                    CM







                    [Non-text portions of this message have been removed]
                  • Gardner, Paul G.
                    (this is a resend - I ve not seen my original, but have gotten other emails from the group. Apologize if my original comes up first). CM, If the windows
                    Message 9 of 11 , Apr 10 9:23 AM
                    View Source
                    • 0 Attachment
                      (this is a resend - I've not seen my original, but have gotten other emails
                      from the group. Apologize if my original comes up first).

                      CM,

                      If the windows appears before PP is run, then it won't detect it using the
                      Autorun command list.

                      If the above is true, then the only other thing I can think of is to have PP
                      check for the window being open when it starts.

                      Move your detection code into a script (or copy it for this experiment).

                      Open the config, go to the Scheduler tab and create a start up item (click
                      'new' and then at the top of the item dialog box, makes sure the startup
                      radio button is selected). Call your script from that item and see if it
                      picks up that window. You'll need to restart PP with the Sygate message
                      open in order to test if it works. I would recommend testing the script
                      itself first.

                      Paul


                      -----Original Message-----
                      From: power-pro@yahoogroups.com [mailto:power-pro@yahoogroups.com] On Behalf
                      Of ehathgepiurhe
                      Sent: Saturday, April 07, 2007 12:55 PM
                      To: power-pro@yahoogroups.com
                      Subject: [power-pro] Re: Help with checking for Window



                      On Thu, 5 Apr 2007 06:58:45 -0400, "Gardner, Paul G."
                      <p.gardner@stanleyas <mailto:p.gardner%40stanleyassociates.com>
                      sociates.com> wrote:

                      >
                      >CM,
                      >
                      >What I've used in the past is an auto-run command list. In the Help index,
                      >enter this : "auto run when a window opens" without the quotes.
                      >
                      >In short, create a new command list. On the Command List tab in the
                      >configure dialog box, select the setup button. Go to the "Special List" tab
                      >and ensure that your new command list is the one listed in the "Open" drop
                      >down.
                      >
                      >Then, create a new list item. In the Name edit box put the caption
                      >"Sygate*" (without the quotes). Either put the call to the autoit script in
                      >the command list's "Enter Command" edit box, or create a PP script file
                      with
                      >the AutoIt script file call and call the PP script from the "Enter Command"
                      >edit box. Usually, I use a win.debug('here') call first until I can get the
                      >Name right, then swap out the debug call with my real code. You might need
                      >to play with the caption some.
                      >
                      >If you need to use a wait call, then I recommend the script. My experience
                      >with the auto-run is that the additional check is unnecessary, but your
                      >machine might be different.
                      >
                      >I stay away from HookWindows. Every time I use it, I get in trouble, and I
                      >don't customize my machine so heavily that PP native abilities don't cover
                      >what I need.
                      >
                      >HTH
                      >Paul
                      >

                      Hi Paul,

                      Yes, hookwindowsevents is dangerous - I copied my script into this
                      group once more after faling to get the open window thing working.
                      This time, PowerPro opened up 453 instances of my script before I
                      managed to get PowerPro responding so I could move the shortcut out of
                      hookwindowsevents. Killing those 453 instances one at a time with Task
                      Manager was painful, and I should have known better - everytime I do
                      something with that hook group, something like this happens. Still,
                      that helpfile entry you pointed me to made me realise one thing: that
                      there are two ways to detect open windows. I had thought that
                      hookwindows was the only way, so it was the only way I had ever tried
                      to do stuff like this. Now I have my new group setup for open windows,
                      I can use that instead. It's less dangerous.

                      Anyway, I'll have to do some more experimenting with the new window
                      thing you mentioned. I created a new group for it, went into setup and
                      made sure that group was the one being used for new windows. I then
                      added a shortcut like you suggested - 'Sygate*' as the name field, and
                      then the path to the 'compiled into Windows .exe' AutoIt script.
                      However, when that Sygate window appeared, the script did not trigger.
                      It may be because the firewall loads before PowerPro in the Windows
                      boot sequence (the window usually pops up shortly after booting). I'm
                      not 100% sure (I have no way of telling), but I think the window
                      appeared before PowerPro loaded, which would explain why it didn't
                      work. While the window was still displayed, I opened up PowerPro
                      config, just to see if that would get PowerPro to see the window. It
                      didn't, and that's when I copied the shortcut into hookwindowsevent.
                      And what happened next is what I described above. The script works
                      fine - if I manually run the .exe when the Sygate window appears, the
                      script gets rid of it. If I drag a shortcut to the script into the
                      Windows startup folder, it gets rid of the window as soon as it
                      appears (it looks like the startup folder entries are run before the
                      firewall, which is a service). I could leave it at that, but I don't
                      really want the .exe running all the time, I like to keep my PC lean
                      and mean with background tasks. I just need to work out if it is
                      possible to get PowerPro to detect this window with the boot sequence
                      the way it is.
                      --

                      Regards,

                      CM







                      [Non-text portions of this message have been removed]
                    • paulggardner
                      (3rd resend - I entered this one from the Yahoo web email.) CM, If the windows appears before PP is run, then it won t detect it using the Autorun command
                      Message 10 of 11 , Apr 11 3:42 AM
                      View Source
                      • 0 Attachment
                        (3rd resend - I entered this one from the Yahoo web email.)

                        CM,

                        If the windows appears before PP is run, then it won't detect it
                        using the Autorun command list.

                        If the above is true, then the only other thing I can think of is to
                        have PP check for the window being open when it starts.

                        Move your detection code into a script (or copy it for this
                        experiment).

                        Open the config, go to the Scheduler tab and create a start up item
                        (click 'new' and then at the top of the item dialog box, makes sure
                        the startup radio button is selected). Call your script from that
                        item and see if it picks up that window. You'll need to restart PP
                        with the Sygate message open in order to test if it works. I would
                        recommend testing the script itself first.

                        Paul

                        --- In power-pro@yahoogroups.com, ehathgepiurhe <ehathgepiurhe@...>
                        wrote:
                        >
                        > On Thu, 5 Apr 2007 06:58:45 -0400, "Gardner, Paul G."
                        > <p.gardner@...> wrote:
                        >
                        > >
                        > >CM,
                        > >
                        > >What I've used in the past is an auto-run command list. In the
                        Help index,
                        > >enter this : "auto run when a window opens" without the quotes.
                        > >
                        > >In short, create a new command list. On the Command List tab in
                        the
                        > >configure dialog box, select the setup button. Go to the "Special
                        List" tab
                        > >and ensure that your new command list is the one listed in
                        the "Open" drop
                        > >down.
                        > >
                        > >Then, create a new list item. In the Name edit box put the caption
                        > >"Sygate*" (without the quotes). Either put the call to the autoit
                        script in
                        > >the command list's "Enter Command" edit box, or create a PP script
                        file with
                        > >the AutoIt script file call and call the PP script from the "Enter
                        Command"
                        > >edit box. Usually, I use a win.debug('here') call first until I
                        can get the
                        > >Name right, then swap out the debug call with my real code. You
                        might need
                        > >to play with the caption some.
                        > >
                        > >If you need to use a wait call, then I recommend the script. My
                        experience
                        > >with the auto-run is that the additional check is unnecessary, but
                        your
                        > >machine might be different.
                        > >
                        > >I stay away from HookWindows. Every time I use it, I get in
                        trouble, and I
                        > >don't customize my machine so heavily that PP native abilities
                        don't cover
                        > >what I need.
                        > >
                        > >HTH
                        > >Paul
                        > >
                        >
                        > Hi Paul,
                        >
                        > Yes, hookwindowsevents is dangerous - I copied my script into this
                        > group once more after faling to get the open window thing working.
                        > This time, PowerPro opened up 453 instances of my script before I
                        > managed to get PowerPro responding so I could move the shortcut out
                        of
                        > hookwindowsevents. Killing those 453 instances one at a time with
                        Task
                        > Manager was painful, and I should have known better - everytime I do
                        > something with that hook group, something like this happens. Still,
                        > that helpfile entry you pointed me to made me realise one thing:
                        that
                        > there are two ways to detect open windows. I had thought that
                        > hookwindows was the only way, so it was the only way I had ever
                        tried
                        > to do stuff like this. Now I have my new group setup for open
                        windows,
                        > I can use that instead. It's less dangerous.
                        >
                        > Anyway, I'll have to do some more experimenting with the new window
                        > thing you mentioned. I created a new group for it, went into setup
                        and
                        > made sure that group was the one being used for new windows. I then
                        > added a shortcut like you suggested - 'Sygate*' as the name field,
                        and
                        > then the path to the 'compiled into Windows .exe' AutoIt script.
                        > However, when that Sygate window appeared, the script did not
                        trigger.
                        > It may be because the firewall loads before PowerPro in the Windows
                        > boot sequence (the window usually pops up shortly after booting).
                        I'm
                        > not 100% sure (I have no way of telling), but I think the window
                        > appeared before PowerPro loaded, which would explain why it didn't
                        > work. While the window was still displayed, I opened up PowerPro
                        > config, just to see if that would get PowerPro to see the window. It
                        > didn't, and that's when I copied the shortcut into hookwindowsevent.
                        > And what happened next is what I described above. The script works
                        > fine - if I manually run the .exe when the Sygate window appears,
                        the
                        > script gets rid of it. If I drag a shortcut to the script into the
                        > Windows startup folder, it gets rid of the window as soon as it
                        > appears (it looks like the startup folder entries are run before the
                        > firewall, which is a service). I could leave it at that, but I don't
                        > really want the .exe running all the time, I like to keep my PC lean
                        > and mean with background tasks. I just need to work out if it is
                        > possible to get PowerPro to detect this window with the boot
                        sequence
                        > the way it is.
                        > --
                        >
                        > Regards,
                        >
                        > CM
                        >
                      Your message has been successfully submitted and would be delivered to recipients shortly.