Hotkey Help?

Do you need something made? then ask in here.
Forum rules
Please LOCK your topics once you have found the solution to your question so we know you no longer require help with your query.
12 posts Page 1 of 2
Contributors
User avatar
upperdrag
Excellent Poster
Excellent Poster
Posts: 321
Joined: Fri Mar 12, 2010 12:05 pm

Hotkey Help?
upperdrag
-Solved-
Last edited by upperdrag on Tue Jan 17, 2012 6:24 am, edited 1 time in total.
User avatar
upperdrag
Excellent Poster
Excellent Poster
Posts: 321
Joined: Fri Mar 12, 2010 12:05 pm

Re: Hotkey Help?
upperdrag
How do i set User Defined Hotkeys too?
User avatar
Codex
Coding God
Coding God
Posts: 2028
Joined: Wed Mar 31, 2010 5:50 pm

Re: Hotkey Help?
Codex
You can use Form1_KeyDown
We shall let the revolution begin.. the revolution for freedom, freedom against censorship. We shall fight in the fields and in the streets, we shall fight in the hills; we shall never surrender
User avatar
Dummy1912
VIP - Donator
VIP - Donator
Posts: 1969
Joined: Sat Aug 21, 2010 2:17 pm

Re: Hotkey Help?
Dummy1912
Code: Select all
Private Sub form1_KeyUp(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles me.KeyUp
        If e.KeyCode = Keys.Enter Then 'do something
         If e.KeyCode = Keys.Delete Then 'do something

    End Sub
what about something like this?
visit us on:


http://www.softpedia.com/get/System/Lau ... -Run.shtml
Check it out ! http://www.softpedia.com/publisher/I-A- ... 90017.html
Check it out ! http://www.softpedia.com/get/Desktop-En ... lock.shtml
User avatar
upperdrag
Excellent Poster
Excellent Poster
Posts: 321
Joined: Fri Mar 12, 2010 12:05 pm

Re: Hotkey Help?
upperdrag
Will it work? I mean like the game is a full screen game so.... idk actually

*Edit* Tested it doesn't work the game just overlaps!
User avatar
Dummy1912
VIP - Donator
VIP - Donator
Posts: 1969
Joined: Sat Aug 21, 2010 2:17 pm

Re: Hotkey Help?
Dummy1912
hello,

this must work
Code: Select all
  
  ''' <summary>
    ''' Key hold down
    ''' </summary>
    Private Sub frmGame_KeyDown(ByVal sender As Object, ByVal e As KeyEventArgs) Handles MyBase.KeyDown
        e.Handled = True

        Select Case e.KeyData
            Case Keys.F10 : 'do something
            Case Keys.Escape : 'do something
        End Select

    End Sub

    ''' <summary>
    ''' Key hold up
    ''' </summary>
    Private Sub frmGame_KeyUp(ByVal sender As Object, ByVal e As KeyEventArgs) Handles MyBase.KeyUp
        e.Handled = True

        Select Case e.KeyData
            Case Keys.F10 : 'do something
        End Select

    End Sub
visit us on:


http://www.softpedia.com/get/System/Lau ... -Run.shtml
Check it out ! http://www.softpedia.com/publisher/I-A- ... 90017.html
Check it out ! http://www.softpedia.com/get/Desktop-En ... lock.shtml
User avatar
MrAksel
C# Coder
C# Coder
Posts: 1758
Joined: Fri Mar 26, 2010 12:27 pm

Re: Hotkey Help?
MrAksel
He wants the code to change the selected tool in the Warcraft game too. You would need to find the right position in the process' memory where the index of the selected tool is stored, then change that value to what you want. That offset may change too. I would be very careful with memory editing because if you edit at the wrong offset it could crash the process and eventually the system.
LMAOSHMSFOAIDMT
Laughing my a** of so hard my sombrero fell off and I dropped my taco lmao;


Over 30 projects with source code!
Please give reputation to helpful members!

Image
Image
User avatar
clanc789
Coding Guru
Coding Guru
Posts: 786
Joined: Tue Nov 02, 2010 4:45 pm

Re: Hotkey Help?
clanc789
MrAksel wrote:
He wants the code to change the selected tool in the Warcraft game too. You would need to find the right position in the process' memory where the index of the selected tool is stored, then change that value to what you want. That offset may change too. I would be very careful with memory editing because if you edit at the wrong offset it could crash the process and eventually the system.
And if im not wrong WoW has an hackshield? Edit procces is seen as hacking. Just FYI.
Practice makes perfect!

VIP since: 6-10-2011
User avatar
mandai
Coding God
Coding God
Posts: 2585
Joined: Mon Apr 26, 2010 6:51 pm

Re: Hotkey Help?
mandai
If you just want to make your own hotkeys for other key combinations then you can use RegisterHotKey. When the hotkey is pressed you can see if the game is the active window; if it is then you can use SendInput/SendKeys etc.
User avatar
upperdrag
Excellent Poster
Excellent Poster
Posts: 321
Joined: Fri Mar 12, 2010 12:05 pm

Re: Hotkey Help?
upperdrag
Whaaa....t? Im so sorry but i totally do not understand what are you guys talking! Could you please dumb it down for me? I'm not playing WoW, im playing a game called DotA which is like a map for warcraft frozen throne.. and i wanna know how to make user defined hotkeys like,

I set the hotkey as '1' and each time i press '1' it will automatically press for example, '7'

its like hotkey switching in the game
12 posts Page 1 of 2
Return to “Tutorial Requests”