| View previous topic :: View next topic |
| Author |
Message |
Symbol I'm a spammer
Reputation: 0
Joined: 18 Apr 2007 Posts: 5094 Location: Israel.
|
Posted: Sun Jul 22, 2007 3:10 am Post subject: Virtual Keys Questions... yes another delphi question O_o |
|
|
there is the key check:
Odd(GetAsyncKeyState(vKey));
So, how can i make an event that press that key?
second question is what is the Odd for? is this makes the check?
like if ill change it to something else will it make a button press event?
or is the GetAsyncKeyState checks if the key was pressed?
so change it to...? so it'll make a key press event..?
thx
|
|
| Back to top |
|
 |
UnLmtD Grandmaster Cheater
Reputation: 0
Joined: 13 Mar 2007 Posts: 894 Location: Canada
|
Posted: Sun Jul 22, 2007 3:33 am Post subject: Re: Virtual Keys Questions... yes another delphi question O_ |
|
|
| Symbol wrote: |
So, how can i make an event that press that key? |
I recommend SendInput/SendMessage (Depends on what you want to do)
| Quote: | | Second question is what is the Odd for? is this makes the check? |
The Odd function returns true if the given Number is odd. So basically it checks if it's pressed or not. Never used since it's not needed in C all we do is (GetAsyncKeyState(VK_F5) and (!GetAsyncKeyState(VK_F5)
_________________
|
|
| Back to top |
|
 |
Symbol I'm a spammer
Reputation: 0
Joined: 18 Apr 2007 Posts: 5094 Location: Israel.
|
Posted: Sun Jul 22, 2007 4:38 am Post subject: |
|
|
like if the given number is 5 its false its if its z0mgArandomNumer its very odd O_o
thx
whats (!GetAsyncKeyState?) its the same like normal?
|
|
| Back to top |
|
 |
UnLmtD Grandmaster Cheater
Reputation: 0
Joined: 13 Mar 2007 Posts: 894 Location: Canada
|
Posted: Sun Jul 22, 2007 4:47 am Post subject: |
|
|
| Symbol wrote: |
whats (!GetAsyncKeyState(VK_F6)) its the same like normal? |
Means that F6 has not been pressed. But that's in C, I don't know if you can do that in Delphi.
Offtopic: Damn it corner store is closed and opens only at 8:30. And I need a energy drink, didn't sleep all night =\
_________________
|
|
| Back to top |
|
 |
Kevin Grandmaster Cheater Supreme
Reputation: 0
Joined: 07 Mar 2007 Posts: 1139 Location: Spiderman-World
|
Posted: Sun Jul 22, 2007 5:09 am Post subject: |
|
|
Example: A Autoclicker with GetAsyncKeyState
odd means if its pressed once. So if you press once, the autoclicker goes once. Therefor you need 2 timers, 1 for the procedure of it, and one for the GetAsyncKeyState which disables/enables the timer, with the procedure óf the autoclicker on it so it goes all the time, until the button is pressed again.
understand it? i had few troubles understanding it...
|
|
| Back to top |
|
 |
Symbol I'm a spammer
Reputation: 0
Joined: 18 Apr 2007 Posts: 5094 Location: Israel.
|
Posted: Sun Jul 22, 2007 8:33 am Post subject: |
|
|
| i knew that... but thx =)
|
|
| Back to top |
|
 |
|