Need help with this function

This is a discussion on Need help with this function within the C Programming forums, part of the General Programming Boards category; I want a function which looks in the memory of a file. This is working and it regocnises the words. ...

  1. #1
    Registered User
    Join Date
    Jul 2003
    Posts
    3

    Need help with this function

    I want a function which looks in the memory of a file. This is working and it regocnises the words. The problem is (very dumb) I can't get it to type. It's a macro kind... With mouse moves it works but I have no idea how to do it with keystrokes.....
    ----
    if (...)

    SetCursorPos(370,215);
    mouse_event(MOUSEEVENTF_LEFTDOWN ,0,0,0,0);
    mouse_event(MOUSEEVENTF_LEFTUP ,0,0,0,0);

    ----
    That one works fine, but I want it to do something like...

    "enter"
    "hi how are you"
    "enter"

    Or

    "ctrl+5"


    I Hope anyone can help me

  2. #2
    Just because ygfperson's Avatar
    Join Date
    Jan 2002
    Posts
    2,493
    I don't understand what you're trying to do.

  3. #3
    Registered User
    Join Date
    Jul 2003
    Posts
    3
    I just want it to press enter, type "hi how are you" or whatever ;p, then press enter again.

    Or something like "ctrl+5", so a combination of ctrl with a digit.

  4. #4
    End Of Line Hammer's Avatar
    Join Date
    Apr 2002
    Posts
    6,231
    You can read about the console functions here:
    http://msdn.microsoft.com/library/de..._reference.asp

    There's an example here:
    http://msdn.microsoft.com/library/de...fer_events.asp

    Does this help?
    When all else fails, read the instructions.
    If you're posting code, use code tags: [code] /* insert code here */ [/code]

  5. #5
    Registered User
    Join Date
    Jul 2003
    Posts
    3
    Originally posted by Hammer
    You can read about the console functions here:
    http://msdn.microsoft.com/library/de..._reference.asp

    There's an example here:
    http://msdn.microsoft.com/library/de...fer_events.asp

    Does this help?
    No sorry, didn't find anything. It should just type a certain keystroke .... So say if F1 is pressed it will return the text "enter" "hi, how are you doing" "enter"

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Compiling sample DarkGDK Program
    By Phyxashun in forum Game Programming
    Replies: 6
    Last Post: 01-27-2009, 03:07 AM
  2. Seg Fault in Compare Function
    By tytelizgal in forum C Programming
    Replies: 1
    Last Post: 10-25-2008, 04:06 PM
  3. Another syntax error
    By caldeira in forum C Programming
    Replies: 31
    Last Post: 09-05-2008, 02:01 AM
  4. Replies: 28
    Last Post: 07-17-2006, 12:35 AM
  5. const at the end of a sub routine?
    By Kleid-0 in forum C++ Programming
    Replies: 14
    Last Post: 10-23-2005, 07:44 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21