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 


[Delphi] Hotkey that works Maple
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
Casboy
How do I cheat?
Reputation: 0

Joined: 20 Jan 2008
Posts: 9
Location: localhost

PostPosted: Sun Jan 20, 2008 6:23 am    Post subject: [Delphi] Hotkey that works Maple Reply with quote

I tried several things but it didn't managed to make a hotkey function that works in Maplestory. How do I do this?
Back to top
View user's profile Send private message
Symbol
I'm a spammer
Reputation: 0

Joined: 18 Apr 2007
Posts: 5094
Location: Israel.

PostPosted: Sun Jan 20, 2008 9:13 am    Post subject: Reply with quote

Hotkeys works in MapleStory, do you mean sending virtual keys?
Back to top
View user's profile Send private message
Casboy
How do I cheat?
Reputation: 0

Joined: 20 Jan 2008
Posts: 9
Location: localhost

PostPosted: Sun Jan 20, 2008 9:41 am    Post subject: Reply with quote

nope, just a hotkey. let's say, by pressing F5 in maplestory, an timer will be enabled. i tried it with the HotKey control, but i can't making it work.
Back to top
View user's profile Send private message
HomerSexual
Grandmaster Cheater Supreme
Reputation: 5

Joined: 03 Feb 2007
Posts: 1657

PostPosted: Sun Jan 20, 2008 11:26 am    Post subject: Reply with quote

RegisterHotKey

It sets a global hotkey so whether you press it in firefox or maple it will do what you say.

Thats Win32 api.

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

Joined: 02 Nov 2007
Posts: 1371

PostPosted: Sun Jan 20, 2008 11:33 am    Post subject: Reply with quote

blankrider wrote:
RegisterHotKey

It sets a global hotkey so whether you press it in firefox or maple it will do what you say.

Thats Win32 api.

Ye. The key must be global or the form must have focus.

_________________
Intel over amd yes.
Back to top
View user's profile Send private message Send e-mail AIM Address Yahoo Messenger MSN Messenger
slippppppppp
Grandmaster Cheater
Reputation: 0

Joined: 08 Aug 2006
Posts: 929

PostPosted: Sun Jan 20, 2008 1:34 pm    Post subject: Reply with quote

GetAsyncKeyState
Back to top
View user's profile Send private message AIM Address MSN Messenger
HomerSexual
Grandmaster Cheater Supreme
Reputation: 5

Joined: 03 Feb 2007
Posts: 1657

PostPosted: Sun Jan 20, 2008 2:08 pm    Post subject: Reply with quote

RegisterHotKey is best...
_________________
Back to top
View user's profile Send private message
Michel
Expert Cheater
Reputation: 0

Joined: 16 May 2007
Posts: 214
Location: The Netherlands

PostPosted: Sun Jan 20, 2008 2:14 pm    Post subject: Reply with quote

GetAsyncKeyState() should just work...
Back to top
View user's profile Send private message
DeletedUser14087
I post too much
Reputation: 2

Joined: 21 Jun 2006
Posts: 3069

PostPosted: Mon Jan 21, 2008 4:30 am    Post subject: Reply with quote

blankrider wrote:
RegisterHotKey

It sets a global hotkey so whether you press it in firefox or maple it will do what you say.

Thats Win32 api.


GetAsyncKeyState(); works like that too, not ?
Back to top
View user's profile Send private message
atom0s
Moderator
Reputation: 205

Joined: 25 Jan 2006
Posts: 8586
Location: 127.0.0.1

PostPosted: Mon Jan 21, 2008 10:48 am    Post subject: Reply with quote

They both work in similar ways. But there is a difference.

RegisterHotkey registers the key to the system overriding any other hotkey that is currently using the keypress while GetAsyncKeyState just monitors any key press on your keyboard. (Same with GetKeyState.)

RegisterHotKey is handled via the message pump of a program via the WM_HOTKEY message while GetAsyncKeyState is handled anywhere. (Mostly seen in timers or threads though.)

Also, RegisterHotKey's first param is the handle of the window creating and handling the key. When the key is pressed the system locates the match for the hotkey and sends the WM_HOTKEY message to the message stack of the given window.

RegisterHotKey:
http://msdn2.microsoft.com/en-us/library/ms646309.aspx

Quote:
When a key is pressed, the system looks for a match against all hot keys. Upon finding a match, the system posts the WM_HOTKEY message to the message queue of the thread that registered the hot key. This message is posted to the beginning of the queue so it is removed by the next iteration of the message loop.

This function cannot associate a hot key with a window created by another thread.

RegisterHotKey fails if the keystrokes specified for the hot key have already been registered by another hot key.

If the window identified by the hWnd parameter already registered a hot key with the same identifier as that specified by the id parameter, the new values for the fsModifiers and vk parameters replace the previously specified values for these parameters.

Windows NT4 and Windows 2000/XP: The F12 key is reserved for use by the debugger at all times, so it should not be registered as a hot key. Even when you are not debugging an application, F12 is reserved in case a kernel-mode debugger or a just-in-time debugger is resident.



GetAsyncKeyState:
http://msdn2.microsoft.com/en-us/library/ms646293.aspx

Simply checks the key state.

_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
Casboy
How do I cheat?
Reputation: 0

Joined: 20 Jan 2008
Posts: 9
Location: localhost

PostPosted: Mon Jan 21, 2008 10:56 am    Post subject: Reply with quote

got it working with RegisterHoyKey, ty guys Very Happy
Back to top
View user's profile Send private message
Anden100
Grandmaster Cheater
Reputation: 0

Joined: 20 Apr 2007
Posts: 668

PostPosted: Mon Jan 21, 2008 1:26 pm    Post subject: Reply with quote

Quote:
procedure TForm1.Timer1Timer(Sender: TObject);
begin
if odd (GetAsyncKeyState(VK_F5)) then
//put ya code here
end;


and if you need to add more than one function to the hotkey it would look like:

Quote:
procedure TForm1.Timer1Timer(Sender: TObject);
begin
if odd (GetAsyncKeyState(VK_F5)) then
begin
//put ya code here
end;


you might also like to make one hotkey both disable and enable a Timer:



Quote:
procedure TForm1.Timer1Timer(Sender: TObject);
if odd (GetAsyncKeyState(VK_F5)
then
if timer1.enabled := false then
begin
timer1.enabled := true
end
else
begin
timer1.enabled := false;
end;
end;
Back to top
View user's profile Send private message
Kalookakoo
Expert Cheater
Reputation: 0

Joined: 03 Mar 2008
Posts: 117

PostPosted: Thu Mar 27, 2008 9:58 pm    Post subject: Reply with quote

This helps a lot as Im trying to learn how to make a bot. How exactly do I go about disabling/enabling it though? Do I just follow Anden100's last script and replace the timer parts with what my needs are?
Back to top
View user's profile Send private message
NothingToShow
Grandmaster Cheater Supreme
Reputation: 0

Joined: 11 Jul 2007
Posts: 1579

PostPosted: Fri Mar 28, 2008 12:22 am    Post subject: Reply with quote

Wiccaan wrote:
They both work in similar ways. But there is a difference.

RegisterHotkey registers the key to the system overriding any other hotkey that is currently using the keypress while GetAsyncKeyState just monitors any key press on your keyboard. (Same with GetKeyState.)

RegisterHotKey is handled via the message pump of a program via the WM_HOTKEY message while GetAsyncKeyState is handled anywhere. (Mostly seen in timers or threads though.)

Also, RegisterHotKey's first param is the handle of the window creating and handling the key. When the key is pressed the system locates the match for the hotkey and sends the WM_HOTKEY message to the message stack of the given window.

RegisterHotKey:
http://msdn2.microsoft.com/en-us/library/ms646309.aspx

Quote:
When a key is pressed, the system looks for a match against all hot keys. Upon finding a match, the system posts the WM_HOTKEY message to the message queue of the thread that registered the hot key. This message is posted to the beginning of the queue so it is removed by the next iteration of the message loop.

This function cannot associate a hot key with a window created by another thread.

RegisterHotKey fails if the keystrokes specified for the hot key have already been registered by another hot key.

If the window identified by the hWnd parameter already registered a hot key with the same identifier as that specified by the id parameter, the new values for the fsModifiers and vk parameters replace the previously specified values for these parameters.

Windows NT4 and Windows 2000/XP: The F12 key is reserved for use by the debugger at all times, so it should not be registered as a hot key. Even when you are not debugging an application, F12 is reserved in case a kernel-mode debugger or a just-in-time debugger is resident.



GetAsyncKeyState:
http://msdn2.microsoft.com/en-us/library/ms646293.aspx

Simply checks the key state.

But GetAsyncKeyState still works, right?
For a simple loot bot.
Back to top
View user's profile Send private message
Pseudo Xero
I post too much
Reputation: 0

Joined: 16 Feb 2007
Posts: 2607

PostPosted: Fri Mar 28, 2008 2:39 am    Post subject: Reply with quote

Moller wrote:
Wiccaan wrote:
They both work in similar ways. But there is a difference.

RegisterHotkey registers the key to the system overriding any other hotkey that is currently using the keypress while GetAsyncKeyState just monitors any key press on your keyboard. (Same with GetKeyState.)

RegisterHotKey is handled via the message pump of a program via the WM_HOTKEY message while GetAsyncKeyState is handled anywhere. (Mostly seen in timers or threads though.)

Also, RegisterHotKey's first param is the handle of the window creating and handling the key. When the key is pressed the system locates the match for the hotkey and sends the WM_HOTKEY message to the message stack of the given window.

RegisterHotKey:
http://msdn2.microsoft.com/en-us/library/ms646309.aspx

Quote:
When a key is pressed, the system looks for a match against all hot keys. Upon finding a match, the system posts the WM_HOTKEY message to the message queue of the thread that registered the hot key. This message is posted to the beginning of the queue so it is removed by the next iteration of the message loop.

This function cannot associate a hot key with a window created by another thread.

RegisterHotKey fails if the keystrokes specified for the hot key have already been registered by another hot key.

If the window identified by the hWnd parameter already registered a hot key with the same identifier as that specified by the id parameter, the new values for the fsModifiers and vk parameters replace the previously specified values for these parameters.

Windows NT4 and Windows 2000/XP: The F12 key is reserved for use by the debugger at all times, so it should not be registered as a hot key. Even when you are not debugging an application, F12 is reserved in case a kernel-mode debugger or a just-in-time debugger is resident.



GetAsyncKeyState:
http://msdn2.microsoft.com/en-us/library/ms646293.aspx

Simply checks the key state.

But GetAsyncKeyState still works, right?
For a simple loot bot.

Yes.

_________________
haxory' wrote:
can't VB do anything??
windows is programmed using VB right? correct me if im wrong.

so all things in windows you have like the start menu is a windows form too.
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