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 me whit get keystate plz

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Source
View previous topic :: View next topic  
Author Message
Xblade Of Heaven
Master Cheater
Reputation: 0

Joined: 16 Oct 2005
Posts: 395
Location: DEAD

PostPosted: Thu May 14, 2009 8:56 am    Post subject: help me whit get keystate plz Reply with quote

I try to make press NUMPAD 1 in trainer lisen sound "activated" and pressing again NUMPAD 1 sound "desactivated" but no work no can lisen the second sound prssing the same key 2 times, any can help me?

thanks

DELPHI CODE:

Code:
if HiWord(GetKeyState(VK_NUMPAD1)) <> 0 then
    PlaySound (PChar ('ACT'), Hinstance, SND_Resource Or SND_ASYNC)
    else
    PlaySound (PChar ('DEC'), Hinstance, SND_Resource Or SND_ASYNC);

_________________
Welcome to the Hell.
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
Dark Byte
Site Admin
Reputation: 470

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

PostPosted: Thu May 14, 2009 10:41 am    Post subject: Reply with quote

it's better to register your routine with RegisterHotKey2 thats defined in the hotkeyhandler unit instead of polling it yourself.

as for playsound, have you tested it under a normal button? Did that work? If not, I see you're using SND_Resource, which means ACT and DEC should be resources linked into the exe. Are they ?

_________________
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
Xblade Of Heaven
Master Cheater
Reputation: 0

Joined: 16 Oct 2005
Posts: 395
Location: DEAD

PostPosted: Thu May 14, 2009 11:34 am    Post subject: Reply with quote

Dark Byte wrote:
it's better to register your routine with RegisterHotKey2 thats defined in the hotkeyhandler unit instead of polling it yourself.

as for playsound, have you tested it under a normal button? Did that work? If not, I see you're using SND_Resource, which means ACT and DEC should be resources linked into the exe. Are they ?


hehe yes dark no see this, now work perfect using this variables Wink thanks

_________________
Welcome to the Hell.
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Source 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