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 


[Tut] --{Setting Hotkeys in Delphi}-- [/Tut]
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
malfunction
Grandmaster Cheater Supreme
Reputation: 0

Joined: 30 Jan 2007
Posts: 1015
Location: http://www.behindthecorner.com/

PostPosted: Tue Jul 24, 2007 7:17 am    Post subject: [Tut] --{Setting Hotkeys in Delphi}-- [/Tut] Reply with quote

I posted this, because many ppl have asked how to do this.. Feel free to flame me oO
{im using delphi 7}

To start off launch delphi and make a new form.

Drop some buttons & panels and what ever you want. Rename the form, change the BGcolor, etc.

Next click the "system" tab, and drop a timer on to ur form (it looks like a white clock), place it anywhere u want (it really doesnt matter).
Click the timer, go to "events" in the "Object Inspector".


Next double clcik the timer, the code page should open up. Put this code there:
Quote:

if odd(GetAsyncKeyState (VK_RETURN)) then //RETURN = Enter Key
begin
button1.click; //This is the thing we made a hotkey for
end;

In this example I made a hotkey for the button1.click function = when enter is pressed, the program does the same thing as when button 1 is clicked. You can change the "button1.click" and the "RETURN" part to whatever you like, this is just an example, google "virtual keys" if u want to set the hotkey to something else. (F1-F12 = F1-F12 buttons)


Hope this helped
~Skylla~

_________________
Back to top
View user's profile Send private message
Reak
I post too much
Reputation: 0

Joined: 15 May 2007
Posts: 3496

PostPosted: Tue Jul 24, 2007 7:44 am    Post subject: Reply with quote

w00t w00t I use the same way Very Happy
nice tut Very Happy
btw Delphi 7 owns
Back to top
View user's profile Send private message
malfunction
Grandmaster Cheater Supreme
Reputation: 0

Joined: 30 Jan 2007
Posts: 1015
Location: http://www.behindthecorner.com/

PostPosted: Tue Jul 24, 2007 7:49 am    Post subject: Reply with quote

rEakW0n wrote:
w00t w00t I use the same way Very Happy
nice tut Very Happy
btw Delphi 7 owns

Agreed!!!
Yay, today 1 of my posts was stickied!!! check the stickies (in this section)
Kevin tought me this Wink

_________________
Back to top
View user's profile Send private message
oib111
I post too much
Reputation: 0

Joined: 02 Apr 2007
Posts: 2947
Location: you wanna know why?

PostPosted: Tue Jul 24, 2007 7:53 am    Post subject: Reply with quote

Nice tut, I just hope you don't get repped for this since everyone has been requested and answered and most people should know how to do it. But still great tut. D7SE OWNS D7
_________________


8D wrote:

cigs dont make people high, which weed does, which causes them to do bad stuff. like killing
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
UnLmtD
Grandmaster Cheater
Reputation: 0

Joined: 13 Mar 2007
Posts: 894
Location: Canada

PostPosted: Tue Jul 24, 2007 7:55 am    Post subject: Reply with quote

A GetAsyncKeyState tutorial!? AWESOME!!!! Sign my complier please.
_________________
Back to top
View user's profile Send private message
malfunction
Grandmaster Cheater Supreme
Reputation: 0

Joined: 30 Jan 2007
Posts: 1015
Location: http://www.behindthecorner.com/

PostPosted: Tue Jul 24, 2007 7:58 am    Post subject: Reply with quote

Rolling Eyes
D7SE, i have it!



111nooobjjhj.jpg
 Description:
 Filesize:  18.3 KB
 Viewed:  10307 Time(s)

111nooobjjhj.jpg



_________________
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: Tue Jul 24, 2007 7:59 am    Post subject: Reply with quote

nice even that i know it...
can i do call function of button1? and how do i call functions on delphi i havent learned it yet...
Back to top
View user's profile Send private message
malfunction
Grandmaster Cheater Supreme
Reputation: 0

Joined: 30 Jan 2007
Posts: 1015
Location: http://www.behindthecorner.com/

PostPosted: Tue Jul 24, 2007 8:02 am    Post subject: Reply with quote

Symbol wrote:
nice even that i know it...
can i do call function of button1? and how do i call functions on delphi i havent learned it yet...

hmm im not sure, but i think u can... You should ask Renkokuken/appalsap they know...

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

Joined: 07 Mar 2007
Posts: 1139
Location: Spiderman-World

PostPosted: Tue Jul 24, 2007 8:11 am    Post subject: Reply with quote

skyllakarean wrote:
rEakW0n wrote:
w00t w00t I use the same way Very Happy
nice tut Very Happy
btw Delphi 7 owns

Agreed!!!
Yay, today 1 of my posts was stickied!!! check the stickies (in this section)
Kevin tought me this Wink


Rolling Eyes hah ye, np. also great tutorial, even though it isnt so hard to get when its plain text.
Back to top
View user's profile Send private message MSN Messenger
appalsap
Moderator
Reputation: 0

Joined: 27 Apr 2006
Posts: 6753
Location: Pakistan

PostPosted: Tue Jul 24, 2007 1:59 pm    Post subject: Reply with quote

Totally redundant when you're using delphi. In delphi, it already sets up a keyboard hook and a mouse hook so you can respond to any sets of keys you choose, this is why you get KeyUp and KeyDown notifications, use those instead.
Back to top
View user's profile Send private message
Lorrenzo
Moderator
Reputation: 4

Joined: 02 Jun 2006
Posts: 3744

PostPosted: Tue Jul 24, 2007 8:34 pm    Post subject: Reply with quote

what if you wanna use like

Code:
Ctrl+F1

_________________
LAWLrrenzolicious
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: Tue Jul 24, 2007 8:54 pm    Post subject: Reply with quote

if keybd_event(keyeventf_ctrldown,0,0,0,0) then
if keybd_event(VK_F1,0,0) then
bla bla
bla bla
end;
Back to top
View user's profile Send private message
DeletedUser14087
I post too much
Reputation: 2

Joined: 21 Jun 2006
Posts: 3069

PostPosted: Wed Jul 25, 2007 5:26 am    Post subject: Reply with quote

Symbol wrote:
if keybd_event(keyeventf_ctrldown,0,0,0,0) then
if keybd_event(VK_F1,0,0) then
bla bla
bla bla
end;


lol you cant use "then" twice.
Back to top
View user's profile Send private message
malfunction
Grandmaster Cheater Supreme
Reputation: 0

Joined: 30 Jan 2007
Posts: 1015
Location: http://www.behindthecorner.com/

PostPosted: Wed Jul 25, 2007 6:11 am    Post subject: Reply with quote

Symbol wrote:

begin
if keybd_event(keyeventf_ctrldown,0,0,0,0) and
if keybd_event(VK_F1,0,0) then
begin
bla bla
bla bla
end;
end;

I corrected his code Rolling Eyes

_________________
Back to top
View user's profile Send private message
iRiot
Master Cheater
Reputation: 0

Joined: 03 Jul 2007
Posts: 395
Location: Aka RIOT

PostPosted: Wed Jul 25, 2007 10:04 pm    Post subject: Reply with quote

also u can do this

Code:
If odd(GetAsyncKeyState(65)) Then
begin
//What ever u want it to do


just erase the VK_ and put in 65 the 65 stands for A heres a list of Letters





Code:
65 - A
66 - B
67 - C
68 - D
69 - E
70 - F
71 - G
72 - H
73 - I
74 - J
75 - K
76 - L
77 - M
78 - N
79 - O
80 - P
81 - Q
82 - R
83 - S
84 - T
85 - U
86 - V
87 - W
88 - X
89 - Y
90 - Z


Oh yeah btw the Ctrl+ doesn't work u get a error so any1 mind fixing it? i tried a couple of stuff nothing worked

Quote:
begin
if keybd_event(keyeventf_ctrldown,0,0,0,0) and
if keybd_event(VK_F1,0,0) then
begin
bla bla
bla bla
end;
end;


[Error] Unit1.pas(2Cool: Undeclared identifier: 'keyeventf_ctrldown'

_________________
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