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 


[Help] AsyncKeyState

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
I'm C.H.
Grandmaster Cheater Supreme
Reputation: 0

Joined: 02 Dec 2006
Posts: 1000
Location: Sweden

PostPosted: Wed Dec 03, 2008 12:51 pm    Post subject: [Help] AsyncKeyState Reply with quote

GetAsyncKeyState(112) for example, the 112 is for F1.
So how do you find the other values for other buttons?

_________________
Omg. I need something to do...

*-* My Flash Trainers *-*

*-* My Mouse Vac Tut *-*

Back to top
View user's profile Send private message
ElectroFusion
Grandmaster Cheater
Reputation: 0

Joined: 17 Dec 2006
Posts: 786

PostPosted: Wed Dec 03, 2008 12:54 pm    Post subject: Reply with quote

Here is a list of them.

http://msdn.microsoft.com/en-us/library/ms927178.aspx

_________________
qwerty147 wrote:

ghostonline wrote:

what world are you in?

bera

but i live in NZ
Back to top
View user's profile Send private message
I'm C.H.
Grandmaster Cheater Supreme
Reputation: 0

Joined: 02 Dec 2006
Posts: 1000
Location: Sweden

PostPosted: Wed Dec 03, 2008 12:55 pm    Post subject: Reply with quote

Thanks alot! Smile
Edit: F1 was 112 in the code I had, but 70 here? O.o

_________________
Omg. I need something to do...

*-* My Flash Trainers *-*

*-* My Mouse Vac Tut *-*



Last edited by I'm C.H. on Wed Dec 03, 2008 12:55 pm; edited 1 time in total
Back to top
View user's profile Send private message
ElectroFusion
Grandmaster Cheater
Reputation: 0

Joined: 17 Dec 2006
Posts: 786

PostPosted: Wed Dec 03, 2008 12:55 pm    Post subject: Reply with quote

Oh wait, that was the wrong list

Correct list:
http://msdn.microsoft.com/en-us/library/ms645540(VS.85).aspx

_________________
qwerty147 wrote:

ghostonline wrote:

what world are you in?

bera

but i live in NZ
Back to top
View user's profile Send private message
I'm C.H.
Grandmaster Cheater Supreme
Reputation: 0

Joined: 02 Dec 2006
Posts: 1000
Location: Sweden

PostPosted: Wed Dec 03, 2008 12:57 pm    Post subject: Reply with quote

Well, here it says 0x70 and in the code I got 112 lol. (For F1)
Is it still correct?

_________________
Omg. I need something to do...

*-* My Flash Trainers *-*

*-* My Mouse Vac Tut *-*

Back to top
View user's profile Send private message
kb3z0n
Grandmaster Cheater
Reputation: 0

Joined: 13 Mar 2007
Posts: 542

PostPosted: Wed Dec 03, 2008 12:58 pm    Post subject: Reply with quote

you could do
GetAsnycKeyState(VK_F1) which would be F1.
Back to top
View user's profile Send private message
I'm C.H.
Grandmaster Cheater Supreme
Reputation: 0

Joined: 02 Dec 2006
Posts: 1000
Location: Sweden

PostPosted: Wed Dec 03, 2008 1:00 pm    Post subject: Reply with quote

Gives me:
Name VK_F1 is not Declared.

_________________
Omg. I need something to do...

*-* My Flash Trainers *-*

*-* My Mouse Vac Tut *-*

Back to top
View user's profile Send private message
ElectroFusion
Grandmaster Cheater
Reputation: 0

Joined: 17 Dec 2006
Posts: 786

PostPosted: Wed Dec 03, 2008 1:00 pm    Post subject: Reply with quote

I'm pretty sure in VB you would have to define all of them, so just make a list like this:

Code:
#define VK_KEY 0x394
         #define VK_KEY 0x183


if VB supports includes, you could include windows.h and it already has all virtual key codes.

_________________
qwerty147 wrote:

ghostonline wrote:

what world are you in?

bera

but i live in NZ
Back to top
View user's profile Send private message
I'm C.H.
Grandmaster Cheater Supreme
Reputation: 0

Joined: 02 Dec 2006
Posts: 1000
Location: Sweden

PostPosted: Wed Dec 03, 2008 1:02 pm    Post subject: Reply with quote

Lol. It doesn't get define. It says: 'If', 'ElseIf', 'Else', 'End If', 'Const', or 'Region' expected.
_________________
Omg. I need something to do...

*-* My Flash Trainers *-*

*-* My Mouse Vac Tut *-*

Back to top
View user's profile Send private message
ElectroFusion
Grandmaster Cheater
Reputation: 0

Joined: 17 Dec 2006
Posts: 786

PostPosted: Wed Dec 03, 2008 1:07 pm    Post subject: Reply with quote

Code:
if(GetAsyncKeyState(VK_F1)){
             // do stuff
}

_________________
qwerty147 wrote:

ghostonline wrote:

what world are you in?

bera

but i live in NZ
Back to top
View user's profile Send private message
I'm C.H.
Grandmaster Cheater Supreme
Reputation: 0

Joined: 02 Dec 2006
Posts: 1000
Location: Sweden

PostPosted: Wed Dec 03, 2008 1:09 pm    Post subject: Reply with quote

Vb doesn't use } and {'s. I get like everything errors lol
_________________
Omg. I need something to do...

*-* My Flash Trainers *-*

*-* My Mouse Vac Tut *-*

Back to top
View user's profile Send private message
ElectroFusion
Grandmaster Cheater
Reputation: 0

Joined: 17 Dec 2006
Posts: 786

PostPosted: Wed Dec 03, 2008 1:13 pm    Post subject: Reply with quote

Eh, I don't know VB, I guess it would be

Code:
if GetAsyncKeyState(VK_F1)
do stuff
endif

_________________
qwerty147 wrote:

ghostonline wrote:

what world are you in?

bera

but i live in NZ
Back to top
View user's profile Send private message
I'm C.H.
Grandmaster Cheater Supreme
Reputation: 0

Joined: 02 Dec 2006
Posts: 1000
Location: Sweden

PostPosted: Wed Dec 03, 2008 1:13 pm    Post subject: Reply with quote

Nvm. I found the keycodes I was looking for now Very Happy.
Thx anyways.

_________________
Omg. I need something to do...

*-* My Flash Trainers *-*

*-* My Mouse Vac Tut *-*

Back to top
View user's profile Send private message
tombana
Master Cheater
Reputation: 2

Joined: 14 Jun 2007
Posts: 456
Location: The Netherlands

PostPosted: Wed Dec 03, 2008 1:39 pm    Post subject: Reply with quote

CheatingHacker wrote:
Well, here it says 0x70 and in the code I got 112 lol. (For F1)
Is it still correct?

112 = 0x70 Smile (decimal and hexadecimal)
Back to top
View user's profile Send private message
kb3z0n
Grandmaster Cheater
Reputation: 0

Joined: 13 Mar 2007
Posts: 542

PostPosted: Wed Dec 03, 2008 1:49 pm    Post subject: Reply with quote

CheatingHacker wrote:
Gives me:
Name VK_F1 is not Declared.


if(GetAsyncKeyState(VK_F1))
{

}
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
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