Page 1 of 2 12 LastLast
Results 1 to 10 of 11
  1. #1
    Moderator
    Kandor is offline

    Posts
    1,193

    Multiple Keyboard Inputs

    I'm trying my hand at making a simple AntiAFK in Visual Basic and would like to know how to use multiple keyboard inputs for it (E.G Pulse's and Sticky's bots) I currently am using these 'important' codes:
    Code:
    Public Class AntiAFK
        Private Declare Function GetAsyncKeyState Lib "user32.dll" (ByVal keyCode As Integer) As Short
    and
    Code:
        Private Sub Button2_Click(sender As System.Object, e As System.EventArgs) Handles Button2.Click
            If GetAsyncKeyState(17) And GetAsyncKeyState(83) Then
                Me.Close()
    I am told this works, but I am not sure I am using the function right. Any advice?

    Similar Threads:



    Big hugs and credit to Shady for my avatar!
    Kandor's PoE shop | $5/100k | Emerald & Meridian | [PP-RSGP-LR]



  2. #2
    Senior Member
    flashbang is offline

    Posts
    248
    PuzSol uses HotKeyPress. I don't know if I am allowed to show you the code of it but after a google search of only 10sec I found this:

    Code:
    // Alt = 1, Ctrl = 2, Shift = 4, Win = 8
    
    FrmStartup.RegisterHotKey(this.Handle, 
      this.GetType().GetHashCode(), 3, (int)'J');
    taken from this:
    Simple steps to enable Hotkey and ShortcutInput user control - CodeProject®

    however I think this is where the problem comes from that PuzSol sometimes starts without you having hit CTRL+A but something else with CTRL / ALT etc. Might look into fixing it or not... have no time atm. Hope this helps you, cheers.


  3. #3
    Moderator
    Kandor is offline

    Posts
    1,193
    Thank you, flashbang! The only problem is that the link you gave me was for C# yet I managed to find a .NET version of what you suggested. Thanks again




    Big hugs and credit to Shady for my avatar!
    Kandor's PoE shop | $5/100k | Emerald & Meridian | [PP-RSGP-LR]

  4. #4
    B-A-N-N-E-D
    ne0_sp00f3r is offline

    Posts
    0
    Kandor, brah, get off .NET now. It'll only hurt you more when you have to leave it later on.


  5. #5
    VIP Status
    wastedbro is offline

    Posts
    2,900
    The only AFK you need for YPP is a VB bot that constantly presses the LEFT key. Anything more complex is for the paranoid.


  6. #6
    Senior Member
    flashbang is offline

    Posts
    248
    Quote Originally Posted by Kandor View Post
    Thank you, flashbang! The only problem is that the link you gave me was for C# yet I managed to find a .NET version of what you suggested. Thanks again
    Sorry, my bad. I kinda must have mistaken it form the PuzSol example you used. But as far as I know those two are rather close to each other? Well if it helped you it was great anyway. And Navi and Wasted: Even if it might be stupid to use VB or use this method, it is about the learning effect. I made so many stupid programs which had nearly no use and tho it helped me a lot understanding how things work.


  7. #7
    B-A-N-N-E-D
    ne0_sp00f3r is offline

    Posts
    0
    Quote Originally Posted by flashbang View Post
    Sorry, my bad. I kinda must have mistaken it form the PuzSol example you used. But as far as I know those two are rather close to each other? Well if it helped you it was great anyway. And Navi and Wasted: Even if it might be stupid to use VB or use this method, it is about the learning effect. I made so many stupid programs which had nearly no use and tho it helped me a lot understanding how things work.
    I wasn't insulting the learning, simply recommending a faster method of going about it. VB is definitely not a language you want to work with for any kind of somewhat difficult program.


  8. #8
    VIP Status
    wastedbro is offline

    Posts
    2,900
    Well if you want to actually learn coding, YPP isn't the place to start.


  9. #9
    notion75 Guest
    GetAsyncKeyState will do the job fine. RegisterHotKey is esaier and tidier, but from what I understand, if another process is using said hotkey, it won't work. don't take my word on it though.


  10. #10
    Moderator
    Kandor is offline

    Posts
    1,193
    @Navi&Wasted
    Tbh I started even lower at MSDOS, I'm not that confident in Java, but understand it (newboston <3). So VB sounded the logically way to go, work my way up the coding ladder. Yet, I am still baffled about how people can make entire environments with just a few lines of code! I simply want to learn how it works. Oh well.

    By the way, thanks notion




    Big hugs and credit to Shady for my avatar!
    Kandor's PoE shop | $5/100k | Emerald & Meridian | [PP-RSGP-LR]

Page 1 of 2 12 LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Copyright © 2009-2012 BuyPoe.com All Rights Reserved.

Design Sites:
vBulletin Mods
Facebook Covers
| Free Facebook Covers
Google Covers | Google Plus Covers

Game Sites:
MMORPG
| MW3