| View previous topic :: View next topic |
| Author |
Message |
dnsi0 I post too much
Reputation: 0
Joined: 04 Jan 2007 Posts: 2674
|
Posted: Mon Nov 26, 2007 9:40 pm Post subject: Creating HotKeys In Delphi??? |
|
|
| Can some1 show me how? All I know is GetAscKey or something returns the key pressed. T.T |
|
| Back to top |
|
 |
sponge I'm a spammer
Reputation: 1
Joined: 07 Nov 2006 Posts: 6009
|
Posted: Mon Nov 26, 2007 10:58 pm Post subject: |
|
|
RegisterHotKey _________________
|
|
| Back to top |
|
 |
jongwee Moderator
Reputation: 0
Joined: 28 Jun 2006 Posts: 1388 Location: Singapore
|
Posted: Tue Nov 27, 2007 4:15 am Post subject: |
|
|
| Code: | procedure TForm1.HotKeyTimer(Sender: TObject);
begin
if odd(GetAsyncKeyState(VK_F9)) then
SpeedButton1.Click;
end; |
_________________
|
|
| Back to top |
|
 |
DeletedUser14087 I post too much
Reputation: 2
Joined: 21 Jun 2006 Posts: 3069
|
Posted: Tue Nov 27, 2007 4:49 am Post subject: |
|
|
| ObjectPascal, either call GetAsencKeyState(); or use THotKey (TObject) from the list. |
|
| Back to top |
|
 |
Acim Grandmaster Cheater Supreme
Reputation: 0
Joined: 04 Jun 2007 Posts: 1948 Location: If anyone has a GMS DK and they don't need it I'll have it!!
|
|
| Back to top |
|
 |
Reak I post too much
Reputation: 0
Joined: 15 May 2007 Posts: 3496
|
Posted: Tue Nov 27, 2007 3:26 pm Post subject: |
|
|
| Acim wrote: | | Kaspersky wrote: | | or use THotKey (TObject) from the list. |
There's a Hotkey tool thing?  |
Hey best friend.
No, there's only a tool/component to set a hotkey. |
|
| Back to top |
|
 |
Acim Grandmaster Cheater Supreme
Reputation: 0
Joined: 04 Jun 2007 Posts: 1948 Location: If anyone has a GMS DK and they don't need it I'll have it!!
|
Posted: Tue Nov 27, 2007 3:33 pm Post subject: |
|
|
Best friend...?
Umm, yeah... I don't know how to use it. Added to form but how do I set the event to happen when the hotkey is pressed? _________________
I'm alive and well, but I quit CEF for a while. Legitly playing since Novemberish 07. Starting hacking October 06. |
|
| Back to top |
|
 |
Reak I post too much
Reputation: 0
Joined: 15 May 2007 Posts: 3496
|
Posted: Tue Nov 27, 2007 3:40 pm Post subject: |
|
|
| Acim wrote: | Best friend...?
Umm, yeah... I don't know how to use it. Added to form but how do I set the event to happen when the hotkey is pressed? |
Don't you remember me from Akash's forum? lolz
Well add a timer with this:
| Code: | procedure TForm1.Timer1Timer(Sender: TObject);
begin
if odd(GetAsyncKeyState(VK_F9)) then
begin
//Here what it does if Key Pressed (F9 in this case)
end;
end; |
Or if you want to use the Hotkey-choose component:
| Code: | procedure TForm1.Timer1Timer(Sender: TObject);
begin
if odd(GetAsyncKeyState(Hotkey1.Hotkey)) then
begin
//Here what it does if key pressed (Hotkey1 setted hotkey)
end;
end; |
Don't forget to set timer interval to 20 or something around that.
Last edited by Reak on Tue Nov 27, 2007 4:25 pm; edited 1 time in total |
|
| Back to top |
|
 |
Acim Grandmaster Cheater Supreme
Reputation: 0
Joined: 04 Jun 2007 Posts: 1948 Location: If anyone has a GMS DK and they don't need it I'll have it!!
|
Posted: Tue Nov 27, 2007 4:21 pm Post subject: |
|
|
I remember you but... never mind. I'll try that, thanks.
EDIT: I got that working, thanks. But it seems
WebBrowser1.Navigate
doesn't work in Delphi. How do you navigate to a page in Delphi? _________________
I'm alive and well, but I quit CEF for a while. Legitly playing since Novemberish 07. Starting hacking October 06. |
|
| Back to top |
|
 |
|