Thread: Passing Keys (macro program)

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

    Passing Keys (macro program)

    Hello, I would like to pass keys to a file while its open and running like a macro program does. I know enough C to understand a function, but Im not sure were to begin, this is only my 2nd year learning C and for some reason my book doesnt answer this.

    I would just like to send keys to a program like.

    I have a text file open called new.txt. Im SO lazy I would like to have a program I open up and click on, this will send the keys "ctrl+s" to my program.

    Is there a thread or keyword I could look up? Does anyone know?


    Coder87c

  2. #2
    End Of Line Hammer's Avatar
    Join Date
    Apr 2002
    Posts
    6,231
    Accessing special keys, like ctrl+ combos, is compiler specific. Say what you're using and someone will help you.

    If you have conio.h, you might find getch() which might do what you want.
    When all else fails, read the instructions.
    If you're posting code, use code tags: [code] /* insert code here */ [/code]

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

    Using

    Im using windows XP... my IDE is .net (or I can use 6.0)

  4. #4
    End Of Line Hammer's Avatar
    Join Date
    Apr 2002
    Posts
    6,231
    Look up the console function reference guide in MSDN.
    When all else fails, read the instructions.
    If you're posting code, use code tags: [code] /* insert code here */ [/code]

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Can someome help me with a program please?
    By WinterInChicago in forum C++ Programming
    Replies: 3
    Last Post: 09-21-2006, 10:58 PM
  2. Passing PIDs to another program
    By DarrenY in forum C Programming
    Replies: 3
    Last Post: 06-02-2006, 02:04 PM
  3. Need help with my program...
    By Noah in forum C Programming
    Replies: 2
    Last Post: 03-11-2006, 07:49 PM
  4. Dikumud
    By maxorator in forum C++ Programming
    Replies: 1
    Last Post: 10-01-2005, 06:39 AM
  5. Problem with simple XOR program
    By spike_ in forum C++ Programming
    Replies: 8
    Last Post: 08-17-2005, 12:09 AM