Question[Help]Hotkeys

Posts 16–29 of 29 · Page 2 of 2
Quote Originally Posted by Zoom View Post



Enable = true
interval = 1

[php]Private Sub Hotkeys_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Hotkey.Tick
Dim Hotkey As Boolean = GetAsyncKeyState(Keys.F5)
Dim hotkey1 As Boolean = GetAsyncKeyState(Keys.F6)

If hotkey = True Then
Hotkey.Start()
End if

If hotkey2 = True Then
Hotkey.Stop()
End If



End Sub

Are you on 64bit?[/php]


Yeah that's what we said, but then I checked what timer we're writing code for

[php]
Handles Hotkey.Tick
[/php]

The code we're writing is for the timer "Hotkey" as soon as he presses F6 this timer is turned off and therefore does not do anything until started again, you CANNOT turn it back on using F5 if the code to turn it back on is contained within the timer YOU JUST TURNED OFF (it won't check whether F5 is pressed because it's not ticking!)
w/E doesn't work. fail thread close
Quote Originally Posted by /b/oss View Post
w/E doesn't work. fail thread close
Dear, you need to start with the basics (No offense). You have to start with the forms designer and then you should move on to Coding. You are facing serious problems with GUI controls. I would suggest that you should play with them a bit. By playing with them, I mean mastering their properties. You cannot code if you don't have firm understanding of them. This will be of a greater help to you.
Why do not you two codes, 1.- Hotkeys .-, 2 .- Timer?

Hotkeys:
Code:
Private Sub Hotkeys_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Hotkey.Tick 
        Dim Hotkey As Boolean = GetAsyncKeyState(Keys.F5) 
        Dim hotkey1 As Boolean   = GetAsyncKeyState(Keys.F6) 

        If hotkey = True Then 
            Timer.Start() 
         End if 

            If hotkey2 = True Then 
                Timer.Stop() 
            End If 
    End Sub
Hotkeys:
Code:
Private Sub Timer_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer.Tick 

'Your Code Here       

    End Sub
Because if you use Hotkey when you go to stop it, then you cant check again if you press f5 or f6, since Hotkey shall, dont was initiated again
Quote Originally Posted by /b/oss View Post
yes.. aggain

[PHP]Private Sub Hotkeys_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Hotkey.Tick
Dim hotkey1 As Boolean
hotkey1 = GetAsyncKeyState(Keys.F5)
If hotkey1 = True Then
Hotkey.Start()
Dim hotkey2 As Boolean
hotkey2 = GetAsyncKeyState(Keys.F6)
If hotkey2 = True Then
Hotkey.Stop()
End If
End If
End Sub[/PHP]

when i press f6 timer1 (hotkey) doesn't stop! WHY?
why u are complicating the source??? i think that
If GetAsyncKeyState(Keys.F5) Then
'what u want
End If

it's better... why u use boolean??
Quote Originally Posted by Sixx93 View Post
why u are complicating the source??? i think that
If GetAsyncKeyState(Keys.F5) Then
'what u want
End If

it's better... why u use boolean??
That's not complicating the source, it's simplifying.

Assigning GetAsyncKeyState(Keys.F5) to Hotkey1 is a lot easier to use, especially if you name the variable "Start" or something. Especially when you have to use it repetitively.

Quote Originally Posted by /b/oss View Post
w/E doesn't work. fail thread close
The only reason it's a fail thread is because your too stupid to read what we're saying. All of our codes explain your problem correctly and fix it, but you don't fucking listen.
Also, watch the flame.
Yes indeed, please keep the flaming to VMs or PMs, and still it shouldn't be done.
If you are referring to me, then keep in mind that I ain't flaming. I am just giving him some useful advice !!!
I think their more referring to me *Points to VM from lolland*

I'll be good I pwomish
Flame in mpgh=normal
Quote Originally Posted by Snape View Post
Flame in mpgh=normal
true... i've seen it lot of times...some months ago i've released a hack for CA which had no-fog and wallhack only...in that time i had only 7 posts and one noob with 400 posts said that it wasn't my hack.... he flamed to me very hard. then he was banned... lol
Quote Originally Posted by Snape View Post
Flame in mpgh=normal
Orly? Since when?
/sarcasm

Anyways, no I was not referring to you Hassan, I actually find most of your posts extremely helpful.

Anyways, let's not derail this thread. Keep it on topic.
Flame in my section (and lol) = NO

Watch the flames, that's now a warning
Posts 16–29 of 29 · Page 2 of 2
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Talk with us