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 


check If key is pressed, explain this to me, WouldYouKindly

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking
View previous topic :: View next topic  
Author Message
NanoByte
Expert Cheater
Reputation: 1

Joined: 13 Sep 2013
Posts: 222

PostPosted: Fri May 23, 2014 4:29 pm    Post subject: check If key is pressed, explain this to me, WouldYouKindly Reply with quote

pushad //save all flags i think what ever that is
push 11 //hmm i know that 11 is the nr for the ctrl but why push it?
call GetAsyncKeyState //Does something
shr ax,#15 // shr? ax,#15? share?
cmp ax,1 // compare ax,1
popad //restore flags or restore something
jne exit // jmp
Back to top
View user's profile Send private message
Rissorr
Master Cheater
Reputation: 3

Joined: 17 Sep 2013
Posts: 273
Location: Israel!

PostPosted: Fri May 23, 2014 4:48 pm    Post subject: Reply with quote

i will not much help you but you helped me and i will try to give you what i know Wink

call GetAsyncKeyState

you can read about it by googling: "stackoverflow GetAsyncKeyState"

shr ax,#15

its a logical shift command that stifts ax by #15 to the right

you can read about this by googling: "shr in assembly"

but the flags i just NOT understand them... sry

hope i helped Smile[/i]
Back to top
View user's profile Send private message
NanoByte
Expert Cheater
Reputation: 1

Joined: 13 Sep 2013
Posts: 222

PostPosted: Fri May 23, 2014 5:17 pm    Post subject: Reply with quote

Thx mate

but i want to know why he does the things he does
shr ax,#15 // so he pushed ax bytes 15 times to the right ? if yes why?
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 470

Joined: 09 May 2003
Posts: 25804
Location: The netherlands

PostPosted: Fri May 23, 2014 5:27 pm    Post subject: Reply with quote

http://msdn.microsoft.com/en-us/library/windows/desktop/ms646293.aspx
Quote:

If the most significant bit is set, the key is down, and if the least significant bit is set, the key was pressed after the previous call to GetAsyncKeyState. However, you should not rely on this last behavior; for more information, see the Remarks.

It checks if the most significant bit is set. SHORT is a 16 bit value, so bit 15 is the most significant bit

_________________
Do not ask me about online cheats. I don't know any and wont help finding them.

Like my help? Join me on Patreon so i can keep helping
Back to top
View user's profile Send private message MSN Messenger
NanoByte
Expert Cheater
Reputation: 1

Joined: 13 Sep 2013
Posts: 222

PostPosted: Sat May 24, 2014 5:00 am    Post subject: Holy Shit its darkbyte!! Reply with quote

Thanks mate, i get it Very Happy
Back to top
View user's profile Send private message
Rissorr
Master Cheater
Reputation: 3

Joined: 17 Sep 2013
Posts: 273
Location: Israel!

PostPosted: Sat May 24, 2014 6:50 am    Post subject: Reply with quote

that's complicated for me... -_-
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 Gamehacking All times are GMT - 6 Hours
Page 1 of 1

 
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