Sending strings to RS with hotkeys

Discussion in 'Programming General' started by Maga, May 4, 2009.

Sending strings to RS with hotkeys
  1. Unread #1 - May 4, 2009 at 2:33 PM
  2. Maga
    Joined:
    May 4, 2009
    Posts:
    2
    Referrals:
    0
    Sythe Gold:
    0

    Maga Newcomer

    Sending strings to RS with hotkeys

    No no no, not like an auto-typer.

    I'm talking about having this application running in the background, or minimized, then whenever I press the hotkey, like Enter, or Q or whatever (while RS is the active window), the program sends a previously specified string to RS. So I never have to alt-tab to it or anything. I can just forget about it. And it doesn't have to press enter either. Just send the string.

    Is this possible at all?

    I've tried working it out but I'm quite a newb when it comes to coding. I've looked into tuts for auto-typers, etc, but they all just talk about pressing a button then it happens. I want it to happen while RS is the active window, so I don't have to switch back to the app.

    Thanks for any help, cheers.
     
  3. Unread #2 - May 4, 2009 at 4:41 PM
  4. matto
    Joined:
    Apr 2, 2007
    Posts:
    89
    Referrals:
    0
    Sythe Gold:
    0

    matto Member

    Sending strings to RS with hotkeys

    So you want a keylogger for Runescape?

    Don't think this is allowed here
     
  5. Unread #3 - May 4, 2009 at 5:39 PM
  6. Swan
    Joined:
    Jan 23, 2007
    Posts:
    4,957
    Referrals:
    0
    Sythe Gold:
    0
    Sythe's 10th Anniversary Member of the Month Winner

    Swan When They Cry...
    Retired Global Moderator

    Sending strings to RS with hotkeys

    He never said anything about logging keys. >_<

    Learn how to use the SendMessage API. That would be the best way you could do it.

    Otherwise, you could always use SendKeys, but that is deprecated. SendMessage is better, just more complicated.

    Info on SendMessage in .Net (VB declarations are down the page a little, after the C#): http://www.pinvoke.net/default.aspx/user32.SendMessage
     
  7. Unread #4 - May 5, 2009 at 1:47 AM
  8. Maga
    Joined:
    May 4, 2009
    Posts:
    2
    Referrals:
    0
    Sythe Gold:
    0

    Maga Newcomer

    Sending strings to RS with hotkeys

    Is it just me or does most people here think that newcomers want to break rules? :p.


    Thanks a lot for the info, Swan.
     
  9. Unread #5 - May 11, 2009 at 5:16 PM
  10. Blupig
    Joined:
    Nov 23, 2006
    Posts:
    7,145
    Referrals:
    16
    Sythe Gold:
    1,609
    Discord Unique ID:
    178533992981594112
    Valentine's Singing Competition Winner Member of the Month Winner MushyMuncher Gohan has AIDS Extreme Homosex World War 3 I'm LAAAAAAAME
    Off Topic Participant

    Blupig BEEF TOILET
    $5 USD Donor

    Sending strings to RS with hotkeys

    As for hotkeys, since your form will be minimized, you should look into the RegisterHotkey and UnregisterHotkey API.
     
< Auto mounting images | SYI Nulling >

Users viewing this thread
1 guest


 
 
Adblock breaks this site