Results 1 to 10 of 10
  1. #1
    Womanizer`'s Avatar
    Join Date
    Apr 2008
    Gender
    male
    Posts
    1,438
    Reputation
    103
    Thanks
    1,593
    My Mood
    Angelic

    Change Hotkey via Button

    I would like to change a hotkey (from getasynckeystate) via button. Just like puush:

    How could I do this?


    anyone? /msg2short
    Last edited by Jorndel; 05-26-2013 at 08:03 AM.

  2. #2
    Biesi's Avatar
    Join Date
    Dec 2011
    Gender
    male
    Posts
    4,993
    Reputation
    374
    Thanks
    8,808
    My Mood
    Twisted
    Quote Originally Posted by ineedwarrockhack View Post
    anyone? /msg2short
    push the button to change the hotkey?

  3. #3
    Womanizer`'s Avatar
    Join Date
    Apr 2008
    Gender
    male
    Posts
    1,438
    Reputation
    103
    Thanks
    1,593
    My Mood
    Angelic
    Quote Originally Posted by Biesi View Post


    push the button to change the hotkey?
    Thats what I'm trying to do, yes.

  4. #4
    Jorndel's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    Norway
    Posts
    8,676
    Reputation
    905
    Thanks
    19,113
    My Mood
    Angelic
    Quote Originally Posted by ineedwarrockhack View Post


    Thats what I'm trying to do, yes.
    Why not apply the key_down event to the button?

    OR:
    Make a pop-up form with a text box, which will capture they keys down.

     
    Contributor 01.27.2012 - N/A
    Donator 07-17-2012 - Current
    Editor/Manager 12-16-12 - N/A
    Minion 01-10-2013 - 07.17.13
    Former Staff 09-20-2012 - 01-10-2013 / 07-17-2013 - Current
    Cocksucker 20-04-2013 - N/A

  5. #5
    Womanizer`'s Avatar
    Join Date
    Apr 2008
    Gender
    male
    Posts
    1,438
    Reputation
    103
    Thanks
    1,593
    My Mood
    Angelic
    Quote Originally Posted by Jorndel View Post


    Why not apply the key_down event to the button?

    OR:
    Make a pop-up form with a text box, which will capture they keys down.
    I guess I could do like "detect key" and then write the key pressed.

    Now I've encountered another problem. How would I be able to change the hotkey for getasynckeystate while the program running?
    This is the code that I have for getasynckeystate:
    Code:
            Dim firstkey As Boolean
            Dim secondkey As Boolean
            Dim thirdkey As Boolean
    
            firstlkey = GetAsyncKeyState(Keys.ControlKey)
            secondkey = GetAsyncKeyState(Keys.ShiftKey)
            thirdkey = GetAsyncKeyState(Keys.F12)
    
            If firstkey And secondkey And thirdkey = True Then
                captureAreaStart.Show()
            End If
    I was trying to do something like getasynckeystate("Keys." & blablabla.text") but that wouldn't work. Got any ideas?

  6. #6
    Cryptonic's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Location
    United Provinces of Canada
    Posts
    1,313
    Reputation
    44
    Thanks
    190
    My Mood
    Bored
    Sooo.. You're trying to change the hotkey to a specific key when you click the button or..?

  7. #7
    Jorndel's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    Norway
    Posts
    8,676
    Reputation
    905
    Thanks
    19,113
    My Mood
    Angelic
    Quote Originally Posted by ineedwarrockhack View Post


    I guess I could do like "detect key" and then write the key pressed.

    Now I've encountered another problem. How would I be able to change the hotkey for getasynckeystate while the program running?
    This is the code that I have for getasynckeystate:
    Code:
            Dim firstkey As Boolean
            Dim secondkey As Boolean
            Dim thirdkey As Boolean
    
            firstlkey = GetAsyncKeyState(Keys.ControlKey)
            secondkey = GetAsyncKeyState(Keys.ShiftKey)
            thirdkey = GetAsyncKeyState(Keys.F12)
    
            If firstkey And secondkey And thirdkey = True Then
                captureAreaStart.Show()
            End If
    I was trying to do something like getasynckeystate("Keys." & blablabla.text") but that wouldn't work. Got any ideas?
    So, do like me?

    Dim a varriable to hold the key value for you, and use that
    Code:
    getasynckeystate(FirstKey)

     
    Contributor 01.27.2012 - N/A
    Donator 07-17-2012 - Current
    Editor/Manager 12-16-12 - N/A
    Minion 01-10-2013 - 07.17.13
    Former Staff 09-20-2012 - 01-10-2013 / 07-17-2013 - Current
    Cocksucker 20-04-2013 - N/A

  8. #8
    Womanizer`'s Avatar
    Join Date
    Apr 2008
    Gender
    male
    Posts
    1,438
    Reputation
    103
    Thanks
    1,593
    My Mood
    Angelic
    Quote Originally Posted by Jorndel View Post


    So, do like me?

    Dim a varriable to hold the key value for you, and use that
    Code:
    getasynckeystate(FirstKey)
    I don't understand what you are trying to tell me o.O

  9. #9
    Jorndel's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    Norway
    Posts
    8,676
    Reputation
    905
    Thanks
    19,113
    My Mood
    Angelic
    Quote Originally Posted by ineedwarrockhack View Post


    I don't understand what you are trying to tell me o.O
    Erm... I'm a little shocked now
    We declare a variable inside the class, instead of the method/function/sub.
    -Meaning it can be accessed by everything within the form1 class.

    Meaning: If you assign a value to it, you just use that variable. To be the 'getkeyasnycstate' Key


    Well, made a short code then to show you:
    Last edited by Jorndel; 05-26-2013 at 10:00 AM.

     
    Contributor 01.27.2012 - N/A
    Donator 07-17-2012 - Current
    Editor/Manager 12-16-12 - N/A
    Minion 01-10-2013 - 07.17.13
    Former Staff 09-20-2012 - 01-10-2013 / 07-17-2013 - Current
    Cocksucker 20-04-2013 - N/A

  10. #10
    DawgiiStylz's Avatar
    Join Date
    Aug 2009
    Gender
    male
    Location
    Dawg House
    Posts
    7,811
    Reputation
    219
    Thanks
    2,896
    My Mood
    Tired
    Or Formkeydown event
    If e.keycode = Keys.sum
    blah
    End If

Similar Threads

  1. Changing hotkeys
    By dragonwiddd in forum Combat Arms Help
    Replies: 7
    Last Post: 01-02-2010, 12:24 AM
  2. NEED HELP FOR CHANGING HOTKEYS
    By imsonoob08 in forum Combat Arms Help
    Replies: 4
    Last Post: 01-01-2010, 11:56 PM
  3. ??change hotkeys in aimbot??
    By Djiin in forum CrossFire Hacks & Cheats
    Replies: 8
    Last Post: 09-17-2009, 04:24 PM
  4. How can i change the screenshot button
    By GibsonRocks231 in forum Combat Arms Hacks & Cheats
    Replies: 8
    Last Post: 01-22-2009, 03:39 AM
  5. Change XP Start button text
    By noregrets187 in forum Programming Tutorials
    Replies: 6
    Last Post: 08-18-2008, 09:46 PM