Results 1 to 4 of 4

Thread: program control api's required

  1. #1
    haris-raheem
    Guest

    Question program control api's required

    i want to control the execution of a program like we do when using wizards , through mouse and keyboard.
    can any one help me.

  2. #2
    Megatron
    Guest
    Your description is somwhat vague. Please be more specific in what you're trying to do.

    If responding to keyboard and mouse events is all you want, put some code in the control's MouseDown, MouseMove, MouseUp, Click, DblClick, KeyUp, KeyDown, KeyAscii etc. events.

  3. #3
    haris-raheem
    Guest

    Question description

    the description is that when you execute a program you interact
    with it by clicking the controls or entering text.
    i want to be capable of controling this program from another program apart from this and then through api calls navigate it
    by producing click and other events and do as a user do or in other words provide a simulation of a user.

    thanks
    haris rahim

  4. #4
    Megatron
    Guest
    You can interact with it by using the following messages and functions. First off, use FindWindowEx to get the handle of the parent and child windows. Once you have the handle, you can being controlling the App. For button clicks, send the BM_CLICK message. For mouse clicks, you need to use the PostMessage() (not SendMessage) and set the WM_LBUTTONDOWN then WM_LBUTTONUP message. Likewise, send WM_KEYDOWN and WM_KEYUP for keyboard messages. The WM_MOUSEMOVE (for memory) or SetCursor (for display) message/function can be used to move the mouse. The mouse_event can also be used to move/press the mouse. Likewise the keybd_event() function can be used to work with the keyboard. Lastly, to set the text of a control (e.g: an edit control) send the WM_SETTEXT message.

    There are probably many other ones out there as well.

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