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

Re: [perlguitest] Re: Guitest. How to move a slider in a trackbar32

Expand Messages
  • kapil sharma
    Hi, The following piece of code will position the mouse to the middle of the trackbar. You can use Send mouse key down event and get the desired result. Here
    Message 1 of 7 , Apr 19 12:27 AM
    • 0 Attachment
      Hi,
      The following piece of code will position the mouse to
      the middle of the trackbar.
      You can use Send mouse key down event and get the
      desired result.

      Here the mid position / cordinates of the trackbar are
      being calculated heuristically, so ewven if the
      trackbar moves, it will still poistion the mouse at
      the middle.

      I hope this helps.

      Regards,
      Kapil

      Code Start
      my ( $left_Trackbar, $top_trackbar, $right_trackbar,
      $bottom_trackbar ) = GetWindowRect($Handle_trackbar);
      MouseMoveAbsPix( ((( $right_trackbar + $left_trackbar
      ) / 2)), (( $top_trackbar + $bottom_trackbar ) / 2));
      Code Ends

      --- basvanberkel <basvanberkel@...> wrote:

      > Is it possible to activate the window of a Trackbar?
      > Because I could do somehing like this:
      >
      > my @wndw = FindWindowLike( undef, undef, undef, 383,
      > 9 );
      >
      > EnableWindow( $wndw[ 0 ], 1 ); ??
      > SetActiveWindow( $wndw [ 0 ] ); ??
      >
      > Then I could do some Keybord input to the slider.
      > The advantage is that it doesn't matter where the
      > GUI is located.
      > But I can't get the enablewindow or SetActiveWindow
      > working.
      > Somebody knows?
      >
      > Bas
      >
      >
      >
      >
      > --- In perlguitest@yahoogroups.com, "basvanberkel"
      > <basvanberkel@...> wrote:
      > >
      > > Hi Chris,
      > >
      > > I don't want to use the mousemoveabs, becaute the
      > position of the
      > > GUI can change. I want to work with the control ID
      > of the button.
      > > If you want to push a button, u can also work with
      > the control id.
      > > For example:
      > > PushChildButton( $whnds[ 0 ], 126 (126 means
      > the control id)
      > >
      > > And I want to make somethink like this for moving
      > a slider. But it
      > > seems not possible :/
      > >
      > > Bas
      > >
      > >
      > >
      > >
      > > --- In perlguitest@yahoogroups.com, "Chris Hilton"
      > <chilton@>
      > > wrote:
      > > >
      > > > Here's how I do a click and drag. You should be
      > able to do
      > > something
      > > > similar.
      > > >
      > > > MouseMoveAbsPix($x, $y);
      > > >
      >
      SendMouse("{LEFTDOWN}{REL$xOffset,$yOffset}{LEFTUP}");
      > > >
      > > > Chris
      > > >
      > > >
      > > > ________________________________
      > > >
      > > > From: perlguitest@yahoogroups.com
      > > > [mailto:perlguitest@yahoogroups.com] On Behalf
      > Of basvanberkel
      > > > Sent: Friday, 13 April, 2007 08:23
      > > > To: perlguitest@yahoogroups.com
      > > > Subject: [perlguitest] Guitest. How to move a
      > slider in a
      > > > trackbar32
      > > >
      > > >
      > > >
      > > > Hi all,
      > > >
      > > > I am doing some experiments with Perl to do
      > some Guitesting.
      > > > My Gui excist for 90% off trackbars with
      > sliders.
      > > > Now I am trying to automaticcly move the
      > slider, but I can't
      > > get
      > > > it
      > > > working.
      > > >
      > > > Any suggestings?
      > > >
      > > > Tnx in advance,
      > > > Bas van Berkel
      > > > Testengineer
      > > >
      > > >
      > > >
      > > >
      > > >
      > > >
      > > >
      > > > [Non-text portions of this message have been
      > removed]
      > > >
      > >
      >
      >
      >



      The information in this message is confidential and may be legally
      privileged. It is intended solely for the addressee. Access to this message by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, or distribution of the message, or any action or omission taken by you in reliance on it, is prohibited and may be unlawful. Please immediately contact the sender if you have received this message in error.


      __________________________________________________
      Do You Yahoo!?
      Tired of spam? Yahoo! Mail has the best spam protection around
      http://mail.yahoo.com
    Your message has been successfully submitted and would be delivered to recipients shortly.