| View previous topic :: View next topic |
| Author |
Message |
kb3z0n Grandmaster Cheater
Reputation: 0
Joined: 13 Mar 2007 Posts: 542
|
Posted: Mon Dec 01, 2008 11:59 pm Post subject: [Tutorial]Using GetAsyncKeyState With Shift, etc. {EASY} |
|
|
Really, not much of a tut, more like a release, but i just found this useful.
| Code: |
if (GetAsyncKeyState(VK_SHIFT) && GetAsyncKeyState(VK_F1))
|
Meaning, If you press SHIFT, and F1.
| Code: |
if (GetAsyncKeyState(VK_LCONTROL) && GetAsyncKeyState(VK_F1))
|
Left Control and F1,
| Code: |
if (GetAsyncKeyState(VK_RCONTROL) && GetAsyncKeyState(VK_F1))
|
Right control, i think you get the point.
|
|
| Back to top |
|
 |
Overload Master Cheater
Reputation: 0
Joined: 08 Feb 2008 Posts: 293
|
Posted: Tue Dec 02, 2008 12:25 am Post subject: |
|
|
Uhhh...Okay?
_________________
Blog
| Quote: | Rhys says:
you can be my maid
Rhys says:
ill buy you a french maid outfit
Tyler says:
Sounds good
Rhys says:
ill hold you to that |
|
|
| Back to top |
|
 |
FullyAwesome I post too much
Reputation: 0
Joined: 05 Apr 2007 Posts: 4438 Location: Land Down Under
|
Posted: Tue Dec 02, 2008 12:30 am Post subject: |
|
|
thankyou?
_________________
|
|
| Back to top |
|
 |
kb3z0n Grandmaster Cheater
Reputation: 0
Joined: 13 Mar 2007 Posts: 542
|
Posted: Tue Dec 02, 2008 12:38 am Post subject: |
|
|
| Sorry, i just figured it out lol.
|
|
| Back to top |
|
 |
SXGuy I post too much
Reputation: 0
Joined: 19 Sep 2006 Posts: 3551
|
Posted: Tue Dec 02, 2008 5:52 am Post subject: |
|
|
i dont get how this helps anyone, considering its all self evident, when you write any program that wishes to use getasynkeystate lol
please dont clutter the forum with crap.
|
|
| Back to top |
|
 |
Travis13 Expert Cheater
Reputation: 0
Joined: 17 Feb 2007 Posts: 199
|
Posted: Thu Dec 04, 2008 12:20 am Post subject: |
|
|
wow guys shut up, like seriously that's a prretty good tutorial and i found it useful......the && operators i didn't know it worked like that and stuff
and anyways guys, think of when u were learning this stuff, this would be helpful so thank you for putting this out there
(sorry im tired so i cant write well and stuff)
_________________
Learning C++, trying, failing, never gonna give up tho  |
|
| Back to top |
|
 |
Snootae Grandmaster Cheater
Reputation: 0
Joined: 16 Dec 2006 Posts: 969 Location: --->
|
Posted: Thu Dec 04, 2008 12:42 am Post subject: |
|
|
| Quote: | | wow guys shut up, like seriously that's a prretty good tutorial and i found it useful......the && operators i didn't know it worked like that and stuff |
1. already posted everywhere (internetz)
2. if you dont know about the && operator, you know bugger all
3. its not a tutorial, its a line of code
| Quote: | | and anyways guys, think of when u were learning this stuff, this would be helpful so thank you for putting this out there |
common sense is good even for people who know nothing
also, ill admit i have on occasion googled various operators, but thats because i use many languages, not hard to figure out what the hell they are used for
_________________
|
|
| Back to top |
|
 |
AlbanainRetard Master Cheater
Reputation: 0
Joined: 02 Nov 2008 Posts: 494 Location: Canada eh?
|
Posted: Thu Dec 04, 2008 6:29 pm Post subject: |
|
|
Ok? But good for begginers to learn the '&&' or '||' params.
_________________
|
|
| Back to top |
|
 |
kitterz Grandmaster Cheater Supreme
Reputation: 0
Joined: 24 Dec 2007 Posts: 1268
|
Posted: Thu Dec 04, 2008 7:09 pm Post subject: |
|
|
| AlbanainRetard wrote: | | Ok? But good for begginers to learn the '&&' or '||' params. |
&& and || are not params, fyi
_________________
|
|
| Back to top |
|
 |
sphere90 Grandmaster Cheater
Reputation: 0
Joined: 24 Jun 2006 Posts: 912
|
Posted: Thu Dec 04, 2008 7:21 pm Post subject: |
|
|
| kitterz wrote: | | AlbanainRetard wrote: | | Ok? But good for begginers to learn the '&&' or '||' params. |
&& and || are not params, fyi |
They are called operators.
|
|
| Back to top |
|
 |
kitterz Grandmaster Cheater Supreme
Reputation: 0
Joined: 24 Dec 2007 Posts: 1268
|
Posted: Thu Dec 04, 2008 7:30 pm Post subject: |
|
|
| sphere90 wrote: | | kitterz wrote: | | AlbanainRetard wrote: | | Ok? But good for begginers to learn the '&&' or '||' params. |
&& and || are not params, fyi |
They are called operators. |
Yep. The name of them slipped my mind while I was posting.
_________________
|
|
| Back to top |
|
 |
Hieroglyphics I post too much
Reputation: 0
Joined: 06 Dec 2007 Posts: 2007 Location: Your bedroom
|
Posted: Fri Dec 05, 2008 5:39 pm Post subject: |
|
|
Lol ok this was extremely random, you should also add that && is if you want both keys to be held but if you want one OR the other do ||
_________________
|
|
| Back to top |
|
 |
Anden100 Grandmaster Cheater
Reputation: 0
Joined: 20 Apr 2007 Posts: 668
|
Posted: Sat Dec 06, 2008 4:03 am Post subject: |
|
|
| Code: | | if (GetAsyncKeyState(VK_SHIFT) && GetAsyncKeyState(VK_F1)) |
Try to press "F1" and then let it go again, then press "Shift", and it will use the hotkeys, you dont need to press them at the same time
|
|
| Back to top |
|
 |
HolyBlah Master Cheater
Reputation: 2
Joined: 24 Aug 2007 Posts: 446
|
Posted: Sat Dec 06, 2008 7:18 am Post subject: |
|
|
| Anden100 wrote: | | Code: | | if (GetAsyncKeyState(VK_SHIFT) && GetAsyncKeyState(VK_F1)) |
Try to press "F1" and then let it go again, then press "Shift", and it will use the hotkeys, you dont need to press them at the same time  | That's because "GetAsyncKeyState" doesn't return true or false.
@threadstarter: You should add "&& 0x8000" to the if so it will return TRUE only when both keys are down .
|
|
| Back to top |
|
 |
rapion124 Grandmaster Cheater Supreme
Reputation: 0
Joined: 25 Mar 2007 Posts: 1095
|
Posted: Sat Dec 06, 2008 5:06 pm Post subject: |
|
|
| If you don't know the C++ operators, you don't deserve to be called a C++ programmer. I bet most of you don't know whether '&&' is bitwise or logical o_O
|
|
| Back to top |
|
 |
|