hooking enter key in AIM

Sharky Forums


Results 1 to 5 of 5

Thread: hooking enter key in AIM

  1. #1
    Goldfish
    Join Date
    Apr 2001
    Posts
    53

    hooking enter key in AIM

    Hi, I have been working on a program to do some stuff to the text that is sent in AIM. I have figured out everything but how to hook the enter key when the user sends the message. I basicaly want to listen for when the user hits enter and then before the message is registered by the window i want to change the text in the textbox before it sends it. I will most likely be programming this in VB just because i am lazy lol.

    I have looked into windows hooks and subclassing but am not quite clear as to what the best method would be and how to impliment it.

    Any example code, info, or links would be greatly apreciated
    AMD 1900+ (1.6ghz)
    Abit KR7A-Raid
    1024MB PC2100 DDRRAM (1GB )
    60GB IBM HD
    ATI Radeon 8500 (Retail)
    SB Audigy Platinum
    MegaWorks 510D
    22" NEC Monitor
    Plextor 24/10/40A
    Windows 2k Advanced Server

  2. #2
    Goldfish
    Join Date
    Apr 2001
    Posts
    53
    nevermind i figured out how to do it.

    basicaly i subclassed the vb window and set a Hotkey so that whenever the user hits this key it sends the WM_HOTKEY message. From there i can see what window is active and then take the apropriate action.. then all i have to do is use sendkeys to forward the key to the window. It works great.
    AMD 1900+ (1.6ghz)
    Abit KR7A-Raid
    1024MB PC2100 DDRRAM (1GB )
    60GB IBM HD
    ATI Radeon 8500 (Retail)
    SB Audigy Platinum
    MegaWorks 510D
    22" NEC Monitor
    Plextor 24/10/40A
    Windows 2k Advanced Server

  3. #3
    Cartoon Shark jester22c's Avatar
    Join Date
    May 2001
    Location
    between my headphones
    Posts
    4,372
    you've got a PM
    #Download Firefox# Playing: TF2
    [Main Rig]
    [EVGA P55 SLI] [i7 860 @ 3.6] [Cooler Master Hyper 212 Plus] [8GB Corsair DDR3 1600]
    [Intel G2 80GB SSD] [MSI GTX260 OC] [NEC ea231wmi] [X-Fi > Z-Audio Lambda > Senn HD-580s]

    [Server]
    [MSI K8N Neo4 SLI] [Opteron 175 @ 2.9] [TT Big Typhoon] [2GB Corsair DDR]

  4. #4
    Hammerhead Shark
    Join Date
    Mar 2001
    Location
    New York
    Posts
    1,186
    This is in VB, in C++ I think its cin.get() or something, not too much help lol.

  5. #5
    Mako Shark dighn's Avatar
    Join Date
    Nov 2000
    Location
    Vancouver, BC Canada
    Posts
    3,171
    cin.get is for console

    to intercept the enter key i know of two ways: subclassing or windows hook. if it's my own program i use subclassing... if it's an external program i'd use windows hook b/c subclassing would be a pain.
    .

Posting Permissions

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