Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


[Tutorial]Using GetAsyncKeyState With Shift, etc. {EASY}
Goto page 1, 2  Next
 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
kb3z0n
Grandmaster Cheater
Reputation: 0

Joined: 13 Mar 2007
Posts: 542

PostPosted: Mon Dec 01, 2008 11:59 pm    Post subject: [Tutorial]Using GetAsyncKeyState With Shift, etc. {EASY} Reply with quote

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
View user's profile Send private message
Overload
Master Cheater
Reputation: 0

Joined: 08 Feb 2008
Posts: 293

PostPosted: Tue Dec 02, 2008 12:25 am    Post subject: Reply with quote

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
View user's profile Send private message MSN Messenger
FullyAwesome
I post too much
Reputation: 0

Joined: 05 Apr 2007
Posts: 4438
Location: Land Down Under

PostPosted: Tue Dec 02, 2008 12:30 am    Post subject: Reply with quote

thankyou?
_________________
Back to top
View user's profile Send private message MSN Messenger
kb3z0n
Grandmaster Cheater
Reputation: 0

Joined: 13 Mar 2007
Posts: 542

PostPosted: Tue Dec 02, 2008 12:38 am    Post subject: Reply with quote

Sorry, i just figured it out lol.
Back to top
View user's profile Send private message
SXGuy
I post too much
Reputation: 0

Joined: 19 Sep 2006
Posts: 3551

PostPosted: Tue Dec 02, 2008 5:52 am    Post subject: Reply with quote

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
View user's profile Send private message
Travis13
Expert Cheater
Reputation: 0

Joined: 17 Feb 2007
Posts: 199

PostPosted: Thu Dec 04, 2008 12:20 am    Post subject: Reply with 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

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 Razz
Back to top
View user's profile Send private message MSN Messenger
Snootae
Grandmaster Cheater
Reputation: 0

Joined: 16 Dec 2006
Posts: 969
Location: --->

PostPosted: Thu Dec 04, 2008 12:42 am    Post subject: Reply with quote

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
View user's profile Send private message
AlbanainRetard
Master Cheater
Reputation: 0

Joined: 02 Nov 2008
Posts: 494
Location: Canada eh?

PostPosted: Thu Dec 04, 2008 6:29 pm    Post subject: Reply with quote

Ok? But good for begginers to learn the '&&' or '||' params.
_________________
Back to top
View user's profile Send private message Send e-mail
kitterz
Grandmaster Cheater Supreme
Reputation: 0

Joined: 24 Dec 2007
Posts: 1268

PostPosted: Thu Dec 04, 2008 7:09 pm    Post subject: Reply with quote

AlbanainRetard wrote:
Ok? But good for begginers to learn the '&&' or '||' params.


&& and || are not params, fyi

_________________
Back to top
View user's profile Send private message Send e-mail
sphere90
Grandmaster Cheater
Reputation: 0

Joined: 24 Jun 2006
Posts: 912

PostPosted: Thu Dec 04, 2008 7:21 pm    Post subject: Reply with quote

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
View user's profile Send private message
kitterz
Grandmaster Cheater Supreme
Reputation: 0

Joined: 24 Dec 2007
Posts: 1268

PostPosted: Thu Dec 04, 2008 7:30 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
Hieroglyphics
I post too much
Reputation: 0

Joined: 06 Dec 2007
Posts: 2007
Location: Your bedroom

PostPosted: Fri Dec 05, 2008 5:39 pm    Post subject: Reply with quote

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
View user's profile Send private message AIM Address MSN Messenger
Anden100
Grandmaster Cheater
Reputation: 0

Joined: 20 Apr 2007
Posts: 668

PostPosted: Sat Dec 06, 2008 4:03 am    Post subject: Reply with quote

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 Wink
Back to top
View user's profile Send private message
HolyBlah
Master Cheater
Reputation: 2

Joined: 24 Aug 2007
Posts: 446

PostPosted: Sat Dec 06, 2008 7:18 am    Post subject: Reply with quote

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 Wink
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 Wink .
Back to top
View user's profile Send private message
rapion124
Grandmaster Cheater Supreme
Reputation: 0

Joined: 25 Mar 2007
Posts: 1095

PostPosted: Sat Dec 06, 2008 5:06 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites