SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 8 of 8
  1. #1
    SQA Council
    Join Date
    Mar 2001
    Posts
    14,438
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Possible to move mouse to coordinates?

    User (cgendreau@act.com.nospam) posted:

    Is the a MoveMouse function anywhere? I can't seem to find one.
    What I want to do is just move the mouse (cursor) to a specific object or
    coordinate. I don't want to click that object, just position the mouse
    above the object. Basically so that I can get the tooltip to appear. (I
    can already get the tooltip data, just need to force it to appear.

    Similarly, is there a function that will return the current mouse
    coordinates on the screen? Again, something that would make life a little
    easier, but I cannot find.

    Thanks,
    Chris...

    ---

  2. #2
    SQA Council
    Join Date
    Mar 2001
    Posts
    14,438
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Possible to move mouse to coordinates?

    User Paysnoe, Jacob (jake.paysnoe@ips-sendero.com.nospam) posted:

    It's possible to capture mouse coordinates, but I haven't done it. All you
    have to do is generate robot code that directly manipulates the windows API.
    Heck, I could even get you the API functions that return mouse coordinates,
    if you want. I've written a small VB app in the past to capture the screen
    coordinates of a mouse action (click). I have NEVER EVER EVER succeeded in
    manipulating the API directly from Robot. Asked a couple of questions, and
    gotten back code samples that still just crash my machines.

    If you figure it out, you'll be my hero, and could you help me too?
    Maybe it's just a lack of time invested, but I've never gotten all of the
    'byval's and 'any's straightened out enough to get the conversion to all of
    the C data types. Not that I know any C anyhow....

    Anyhow, maybe someone could step up with more concrete help or code,
    but that's the most direct (note: probably not the easiest) way to achieve
    what you are trying to do. I'm pretty sure that you could move the mouse
    that way too, as the syntax/capabilities of some of the simpler macro tools
    I have used can certainly move the cursor to a specific point without a
    click action.

    No real help, only a tease...

    Jake


  3. #3
    SQA Council
    Join Date
    Mar 2001
    Posts
    14,438
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Possible to move mouse to coordinates?

    User (Paul_Downes@providian.com.nospam) posted:


    There are several Win API functions that you can utilize:

    GetCursorPos get current cursor position
    SetCursorPos set cursor position
    GetWindowRect get window object coordinates

    Cheers . . . Paul

    ------------------------------------------------------------------------------
    Warning : The information contained in this message may be privileged and confidential and protected from disclosure. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify us immediately by replying to this message and then delete it from your computer. All e-mail sent to this address will be received by the Providian Financial corporate e-mail system and is subject to archiving and review by someone other than the recipient.

    ================================================== ============================
    ---

  4. #4
    SQA Council
    Join Date
    Mar 2001
    Posts
    14,438
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Possible to move mouse to coordinates?

    User POSEY, BRUCE A [AG-Contractor/1000] (bruce.a.posey@monsanto.com.nospam) posted:

    It is also possible to use low-level recording and insert them into your
    main script. Low level recording specifically records mouse movements and
    actions.
    This may help you out.

    Bruce Posey
    MIDAS Project - Monsanto
    314-694-4911

  5. #5
    Member
    Join Date
    Oct 2001
    Location
    Staten Island
    Posts
    56
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Possible to move mouse to coordinates?

    an addition to Paul's reply, to make life easier for ya.
    Stick this is in a sbh file.

    Declare Function SetCursorPos& Lib "user32" (ByVal x As Long, ByVal y As Long)

    To call:

    ret = SetCursor ( x, y )

    ------------------

  6. #6
    SQA Council
    Join Date
    Mar 2001
    Posts
    14,438
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Possible to move mouse to coordinates?

    User Chris Gendreau (cgendreau@act.com.nospam) posted:

    Wow, this was easier than I thought...

    How to get the current mouse pointer position:
    -----------------------------------------------------------
    Type udtMousePointer 'Declare types
    x As Long
    y As Long
    End Type

  7. #7
    SQA Council
    Join Date
    Mar 2001
    Posts
    14,438
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Possible to move mouse to coordinates?

    User Kevin Petry (72627.2200@compuserve.com.nospam) posted:

    Use some stupid robot tricks ...

    In Html use HTMLDocument it performs a mouse action on the text of a Web
    page. Primarily used to position the cursor.

    Be tricky and use a middle click or right click to position the mouse.

    ---

  8. #8
    SQA Council
    Join Date
    Mar 2001
    Posts
    14,438
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Possible to move mouse to coordinates?

    User Paysnoe, Jacob (jake.paysnoe@ips-sendero.com.nospam) posted:

    Very Nice!

    Now can you get GetDriveFreeSpaceEx (I think that's it, from
    memory)working for me? I have yet to succeed.

    Thanks,

    Jake


 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Search Engine Optimisation provided by DragonByte SEO v2.0.36 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 12.00%
vBulletin Optimisation provided by vB Optimise v2.6.4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.2.8 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominate (Lite) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 12:01 PM.

Copyright BetaSoft Inc.