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] Questions

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
Flabbergasted
Expert Cheater
Reputation: 0

Joined: 11 Oct 2007
Posts: 231
Location: I have alzheimer's.

PostPosted: Sun May 04, 2008 5:22 pm    Post subject: [Delphi] Questions Reply with quote

Hi, it'd be great if someone could answer these questions for me.

1. How do you see the key that the user pressed. So far I got this (thanks to Snootae) and I have to do it for every key there is:

Code:
if odd(GetAsyncKeyState($41)) then
begin
AutoAttackKey := $41//you key variable
//Turn off timer
end;


2. Could someone tell me how to double click?

3. Could someone help me import

Code:
ShellExecute(0,
'OPEN',
LPCSTR('http://login.ijji.com/login.nhn?m=login&memberid='+Edit1.Text+'&password='+Edit2.Text+'&nextURL=http://sfront.ijji.com/common/prelaunch.nhn?gameId=u_sf&subId='),
nil,
nil,
SW_NORMAL);


into Webbrowser1.Navigate('');? Thanks a lot Very Happy.
Back to top
View user's profile Send private message
lurc
Grandmaster Cheater Supreme
Reputation: 2

Joined: 13 Nov 2006
Posts: 1900

PostPosted: Sun May 04, 2008 6:02 pm    Post subject: Reply with quote

1. If you want to see if the user actually pressed it you need to notify yourself somehow, be it OutputDebugString, MessageBox, or a TextBox
2. I don't think you can do double click... but you can do normal click which is just odd(GetAsyncKeyState(VK_LBUTTON))
3. eh... make a string/PChar/PAnsiChar (whatever it is, im not a delphi coder) to store

Code:
LPCSTR('http://login.ijji.com/login.nhn?m=login&memberid='+Edit1.Text+'&password='+Edit2.Text+'&nextURL=http://sfront.ijji.com/common/prelaunch.nhn?gameId=u_sf&subId=')


and then call Webbrowser1.Navigate(StringYouStoredItTo);

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

Joined: 16 Dec 2006
Posts: 969
Location: --->

PostPosted: Mon May 05, 2008 3:24 am    Post subject: Reply with quote

1. Full list of VK values and hex versions, add your own notification http://delphi.about.com/od/objectpascalide/l/blvkc.htm

2. If you mean checking a double click, check for a click, then wait for another one

If you mean clicking on a window or something then

Code:
mouse_event(MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0);
mouse_event(MOUSEEVENTF_LEFTUP, 0, 0, 0, 0);
GetDoubleClickTime;
mouse_event(MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0);
mouse_event(MOUSEEVENTF_LEFTUP, 0, 0, 0, 0);


3. AS lurc said or just
Code:
Webbrowser1.Navigate(LPCSTR('http://login.ijji.com/login.nhn?m=login&memberid='+Edit1.Text+'&password='+Edit2.Text+'&nextURL=http://sfront.ijji.com/common/prelaunch.nhn?gameId=u_sf&subId='));

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

Joined: 11 Oct 2007
Posts: 231
Location: I have alzheimer's.

PostPosted: Mon May 05, 2008 1:35 pm    Post subject: Reply with quote

Thanks Lurc and Snootae Smile. Yeah, for the first question I want to see what the user pressed and notify myself using a label, but I don't want to do it for every key. Isn't there a shorter way like - VKKeyscan?
Back to top
View user's profile Send private message
Snootae
Grandmaster Cheater
Reputation: 0

Joined: 16 Dec 2006
Posts: 969
Location: --->

PostPosted: Mon May 05, 2008 5:17 pm    Post subject: Reply with quote

i dont think there is, i just did it manually
_________________
Back to top
View user's profile Send private message
Anden100
Grandmaster Cheater
Reputation: 0

Joined: 20 Apr 2007
Posts: 668

PostPosted: Mon May 05, 2008 11:29 pm    Post subject: Reply with quote

Snootae wrote:
i dont think there is, i just did it manually


aww!, well, is there any chance, that i can have the piece of your code that checks if the key is pressed?, cas' that way seems pretty booring...
Back to top
View user's profile Send private message
NothingToShow
Grandmaster Cheater Supreme
Reputation: 0

Joined: 11 Jul 2007
Posts: 1579

PostPosted: Mon May 05, 2008 11:41 pm    Post subject: Reply with quote

Anden100 wrote:
Snootae wrote:
i dont think there is, i just did it manually


aww!, well, is there any chance, that i can have the piece of your code that checks if the key is pressed?, cas' that way seems pretty booring...

If you want to check for a single key, there's this easy way:
Make a timer.
Interval on 10, Enabled to True
And in the timer code, put this:
Code:
if odd(getasynckeystate(vk_f1)) then
begin
Showmessage('You pressed F1');
end;

Here's the key codes
http://delphi.about.com/od/objectpascalide/l/blvkc.htm
Back to top
View user's profile Send private message
DeletedUser14087
I post too much
Reputation: 2

Joined: 21 Jun 2006
Posts: 3069

PostPosted: Tue May 06, 2008 4:26 am    Post subject: Reply with quote

Snootae wrote:
1. Full list of VK values and hex versions, add your own notification http://delphi.about.com/od/objectpascalide/l/blvkc.htm

2. If you mean checking a double click, check for a click, then wait for another one

If you mean clicking on a window or something then

Code:
mouse_event(MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0);
mouse_event(MOUSEEVENTF_LEFTUP, 0, 0, 0, 0);
GetDoubleClickTime;
mouse_event(MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0);
mouse_event(MOUSEEVENTF_LEFTUP, 0, 0, 0, 0);


3. AS lurc said or just
Code:
Webbrowser1.Navigate(LPCSTR('http://login.ijji.com/login.nhn?m=login&memberid='+Edit1.Text+'&password='+Edit2.Text+'&nextURL=http://sfront.ijji.com/common/prelaunch.nhn?gameId=u_sf&subId='));


Webbrowser component Navigate() VCL is a WideChar, not a PWChar, so it can be used as a string, the LPCSTR isn't necessary (might cause warnings).
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
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