 |
Cheat Engine The Official Site of Cheat Engine
|
| View previous topic :: View next topic |
| Author |
Message |
Deine Mutter Expert Cheater
Reputation: 1
Joined: 05 Apr 2006 Posts: 181
|
Posted: Sat Dec 19, 2009 5:13 am Post subject: [DELPHI] Sendin Input to a Java Applet in Firefox |
|
|
Hello,
For sending a click to a Java Applett in Firefox I use this code: | Code: | procedure TForm1.Button1Click(Sender: TObject);
var
wnd: HWND;
begin
wnd := FindWindow('MozillaUIWindowClass', '*** - Mozilla Firefox');
wnd := FindWindowEx(wnd, 0, 'MozillaWindowClass', nil);
wnd := FindWindowEx(wnd, 0, 'MozillaWindowClass', nil);
wnd := FindWindowEx(wnd, 0, 'MozillaWindowClass', nil);
wnd := FindWindowEx(wnd, 0, 'MozillaContentWindowClass', nil);
wnd := FindWindowEx(wnd, 0, 'MozillaWindowClass', nil);
wnd := FindWindowEx(wnd, 0, 'MozillaWindowClass', nil);
wnd := FindWindowEx(wnd, 0, 'MozillaWindowClass', nil);
wnd := FindWindowEx(wnd, 0, 'SunAwtFrame', nil);
wnd := FindWindowEx(wnd, 0, 'SunAwtCanvas', nil);
wnd := FindWindowEx(wnd, 0, 'SunAwtCanvas', nil);
wnd := FindWindowEx(wnd, 0, 'SunAwtCanvas', nil);
wnd := FindWindowEx(wnd, 0, 'SunAwtCanvas', nil);
if wnd <> 0 then
begin
PostMessage(wnd, WM_LBUTTONDOWN, MK_LBUTTON, MAKELPARAM(120, 220));
PostMessage(wnd, WM_LBUTTONUP, 0, MAKELPARAM(120, 220));
end;
end; |
But the click is not executed although the messages are sent:
There is absolutely no problem sending clicks to a normal firefox window, but when the applet comes into play it just does not work. I also tried setting a delay or sending WM_LBUTTONDOWN two times, which Ive read on other forums but it doesnt help. Maybe anybody of you has already made some experience with this kind of stuff, so any help would be great.
_________________
|
|
| Back to top |
|
 |
Slugsnack Grandmaster Cheater Supreme
Reputation: 71
Joined: 24 Jan 2007 Posts: 1857
|
Posted: Sat Dec 19, 2009 8:00 pm Post subject: |
|
|
| Try using an application like Spy++ to identify the correct window and then look at which specific messages it is handling
|
|
| Back to top |
|
 |
Deine Mutter Expert Cheater
Reputation: 1
Joined: 05 Apr 2006 Posts: 181
|
Posted: Sun Dec 20, 2009 2:55 pm Post subject: |
|
|
As I already said, that is what I have done and the messages are sent according to Winspector (picture in my first post).
_________________
|
|
| Back to top |
|
 |
MiLkz Newbie cheater
Reputation: 0
Joined: 22 Feb 2009 Posts: 20
|
Posted: Mon Dec 21, 2009 11:03 am Post subject: |
|
|
I am almost 100% sure send/post message will not work for java apps
if there is another method/function that does work for java i do not know
|
|
| Back to top |
|
 |
Jani Grandmaster Cheater
Reputation: 2
Joined: 29 Dec 2006 Posts: 804
|
Posted: Mon Dec 21, 2009 11:34 am Post subject: |
|
|
| You might want to try SendInput.
|
|
| Back to top |
|
 |
Deine Mutter Expert Cheater
Reputation: 1
Joined: 05 Apr 2006 Posts: 181
|
Posted: Mon Dec 21, 2009 12:57 pm Post subject: |
|
|
Thank you guys for your answers,
@MiLkz That is what I am thinking too, I don't think that this problem can be solved.
@Jani SendInput is what I am currently using but I don't really like it because when my bot is running I can't do anything else, which would be possible only by using Send/Postmessage.
Isn't there any way to find and handle Java controls?
_________________
|
|
| Back to top |
|
 |
hcavolsdsadgadsg I'm a spammer
Reputation: 26
Joined: 11 Jun 2007 Posts: 5801
|
Posted: Tue Dec 22, 2009 7:36 pm Post subject: |
|
|
I wrote a bot for Minecraft a while ago that used SendInput
I just used a hotkey to stop it where it was at in case I needed to take control again. It was simple and worked fine.
|
|
| Back to top |
|
 |
|
|
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
|
|