| View previous topic :: View next topic |
| Author |
Message |
Casboy How do I cheat?
Reputation: 0
Joined: 20 Jan 2008 Posts: 9 Location: localhost
|
Posted: Sun Jan 20, 2008 6:23 am Post subject: [Delphi] Hotkey that works Maple |
|
|
| 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 |
|
 |
Symbol I'm a spammer
Reputation: 0
Joined: 18 Apr 2007 Posts: 5094 Location: Israel.
|
Posted: Sun Jan 20, 2008 9:13 am Post subject: |
|
|
| Hotkeys works in MapleStory, do you mean sending virtual keys?
|
|
| Back to top |
|
 |
Casboy How do I cheat?
Reputation: 0
Joined: 20 Jan 2008 Posts: 9 Location: localhost
|
Posted: Sun Jan 20, 2008 9:41 am Post subject: |
|
|
| 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 |
|
 |
HomerSexual Grandmaster Cheater Supreme
Reputation: 5
Joined: 03 Feb 2007 Posts: 1657
|
Posted: Sun Jan 20, 2008 11:26 am Post subject: |
|
|
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 |
|
 |
NINTENDO Grandmaster Cheater Supreme
Reputation: 0
Joined: 02 Nov 2007 Posts: 1371
|
Posted: Sun Jan 20, 2008 11:33 am Post subject: |
|
|
| 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 |
|
 |
slippppppppp Grandmaster Cheater
Reputation: 0
Joined: 08 Aug 2006 Posts: 929
|
Posted: Sun Jan 20, 2008 1:34 pm Post subject: |
|
|
| GetAsyncKeyState
|
|
| Back to top |
|
 |
HomerSexual Grandmaster Cheater Supreme
Reputation: 5
Joined: 03 Feb 2007 Posts: 1657
|
Posted: Sun Jan 20, 2008 2:08 pm Post subject: |
|
|
RegisterHotKey is best...
_________________
|
|
| Back to top |
|
 |
Michel Expert Cheater
Reputation: 0
Joined: 16 May 2007 Posts: 214 Location: The Netherlands
|
Posted: Sun Jan 20, 2008 2:14 pm Post subject: |
|
|
| GetAsyncKeyState() should just work...
|
|
| Back to top |
|
 |
DeletedUser14087 I post too much
Reputation: 2
Joined: 21 Jun 2006 Posts: 3069
|
Posted: Mon Jan 21, 2008 4:30 am Post subject: |
|
|
| 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 |
|
 |
atom0s Moderator
Reputation: 205
Joined: 25 Jan 2006 Posts: 8586 Location: 127.0.0.1
|
Posted: Mon Jan 21, 2008 10:48 am Post subject: |
|
|
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 |
|
 |
Casboy How do I cheat?
Reputation: 0
Joined: 20 Jan 2008 Posts: 9 Location: localhost
|
Posted: Mon Jan 21, 2008 10:56 am Post subject: |
|
|
got it working with RegisterHoyKey, ty guys
|
|
| Back to top |
|
 |
Anden100 Grandmaster Cheater
Reputation: 0
Joined: 20 Apr 2007 Posts: 668
|
Posted: Mon Jan 21, 2008 1:26 pm Post subject: |
|
|
| 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 |
|
 |
Kalookakoo Expert Cheater
Reputation: 0
Joined: 03 Mar 2008 Posts: 117
|
Posted: Thu Mar 27, 2008 9:58 pm Post subject: |
|
|
| 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 |
|
 |
NothingToShow Grandmaster Cheater Supreme
Reputation: 0
Joined: 11 Jul 2007 Posts: 1579
|
Posted: Fri Mar 28, 2008 12:22 am Post subject: |
|
|
| 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 |
|
 |
Pseudo Xero I post too much
Reputation: 0
Joined: 16 Feb 2007 Posts: 2607
|
Posted: Fri Mar 28, 2008 2:39 am Post subject: |
|
|
| 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 |
|
 |
|