Results 1 to 8 of 8

Thread: move mouse

  1. #1

    Thread Starter
    Lively Member smart_phil_dude1's Avatar
    Join Date
    Jun 2005
    Location
    Behind You!
    Posts
    125

    Unhappy move mouse

    how would you make the mouse move to a certain place into an active x control, then click, then type something?
    Please Help Us Save Ana or donate now by going to Oneana.com

    Visit my Website at http://www.therealfantasy.com

  2. #2
    Super Moderator manavo11's Avatar
    Join Date
    Nov 2002
    Location
    Around the corner from si_the_geek
    Posts
    7,171

    Re: move mouse

    To move the mouse you can use the SetCursorPos API.

    To get the position of the control I guess you'll need the get it's handle with the FindWindow and FindWindowEx APIs.

    Then to click you can use the mouse_event API.

    Then to type just SendKeys should work, but since I've mentioned so many APIs, the keyb_event API can work also


    Has someone helped you? Then you can Rate their helpful post.

  3. #3

    Thread Starter
    Lively Member smart_phil_dude1's Avatar
    Join Date
    Jun 2005
    Location
    Behind You!
    Posts
    125

    Re: move mouse

    i don't really get it, what's an API?
    Please Help Us Save Ana or donate now by going to Oneana.com

    Visit my Website at http://www.therealfantasy.com

  4. #4
    Banned Psychopathetica's Avatar
    Join Date
    Jan 2005
    Posts
    31

    Re: move mouse

    An API (Application Programming Interface) is a sub or a function that you can obtain through almost any DLL file, and allows you to do more in VB than ordinary VB code is capable of, or if it does, the API does it way faster and more efficient. Like for example:

    VB Code:
    1. Private Declare Sub Sleep Lib "kernel32.dll" (ByVal Milliseconds As Long)
    2.  
    3. Private Sub Form_Load()
    4.  
    5.      Sleep 5000
    6.  
    7.      'After 5 seconds, your form should load
    8.  
    9. End Sub

    Here's what it does. The Sleep API causes your program to halt a certain number of milliseconds. And this sub is obtained from the Kernel32.dll file located in your Windows/System directory (System32 if you are using Windows 2000/XP).

    You can find many more API's in here

    http://www.mentalis.org/apilist/apilist.php

    What's good about DLL files (when not an ActiveX dll) is that it can be created in any language and be used in any language. Like those dll files located in the System/System32 directory have been created in C or C++ yet can be used in VB.

  5. #5

    Thread Starter
    Lively Member smart_phil_dude1's Avatar
    Join Date
    Jun 2005
    Location
    Behind You!
    Posts
    125

    Re: move mouse

    thnx, now i understand what API is, but what do u type to do those digfferent API's?
    Please Help Us Save Ana or donate now by going to Oneana.com

    Visit my Website at http://www.therealfantasy.com

  6. #6
    Banned Psychopathetica's Avatar
    Join Date
    Jan 2005
    Posts
    31

    Re: move mouse


  7. #7
    PowerPoster
    Join Date
    Dec 2004
    Posts
    25,618

    Re: move mouse

    find api guide and api viewer
    from www.allapi.net

    pete

  8. #8

    Thread Starter
    Lively Member smart_phil_dude1's Avatar
    Join Date
    Jun 2005
    Location
    Behind You!
    Posts
    125

    Re: move mouse

    oh, i c, thnx guys
    Please Help Us Save Ana or donate now by going to Oneana.com

    Visit my Website at http://www.therealfantasy.com

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width