SRL Archive - Delphi/FPC Help and Tutorials

Mouse events without actually moving cursor


marpis

2010-02-08 09:24:27

I know SendMessage and PostMessage can send mouse events to a specific handle to a specific cordinate, but I cant get it to work with TWebBrowser.

I have a TWebBrowser which has runescape running on it, but nothing happens when I SendMessage to it's handle.

I'm figuring out the basics of making a minimizeable rs bot.

weequ

2010-02-08 10:07:23

I can't ansver your question but goodluck with your bot! I think its less detectable if your bot is actually a browser, atleast if it pretendts to be firefox or ie. ;)

mastaraymond

2010-02-08 10:41:52

I've tried this before.. I couldn't get it to work with Runescape.. So yeah, good luck :p

EDIT: You must send a lot more messages than just WM_MouseMove, google for something that monitors the messages send to a window.

marpis

2010-02-08 11:00:48

From: mastaraymond
I've tried this before.. I couldn't get it to work with Runescape.. So yeah, good luck :p

EDIT: You must send a lot more messages than just WM_MouseMove, google for something that monitors the messages send to a window.


Tried WM_LBUTTONDOWN and then WM_LBUTTONUP or something like that too but didn't work :S

mastaraymond

2010-02-08 13:19:54

From: marpis
Tried WM_LBUTTONDOWN and then WM_LBUTTONUP or something like that too but didn't work :S

You have to send a sequence of events, like entering the window, activating etc..

However I don't think that java gets activated by those events, I think java just gets the raw-pointer data..

nielsie95

2010-02-08 14:38:39

Java doesn't like those messages =\, but it should work with other elements in the browser, just make sure you pass the right handle.

mastaraymond

2010-02-08 15:20:32

From: nielsie95
Java doesn't like those messages =\, but it should work with other elements in the browser, just make sure you pass the right handle.

Neither does flash :(

_ChArMz

2010-02-08 15:40:12

it works with flash, just not java

use

WM_LBUTTONDOWN, MK_LBUTTON
and
WM_RBUTTONDOWN, MK_RBUTTON

WM_LBUTTONUP
and
WM_RBUTTONUP

WM_MOUSEMOVE

mastaraymond

2010-02-08 15:55:31

From: _ChArMz
it works with flash, just not java

use

WM_LBUTTONDOWN, MK_LBUTTON
and
WM_RBUTTONDOWN, MK_RBUTTON

WM_LBUTTONUP
and
WM_RBUTTONUP

WM_MOUSEMOVE

Try it on "Dofus".. Flash game, but it clearly didn't want to cooperate :(.

_ChArMz

2010-02-08 16:00:16

From: mastaraymond
Try it on "Dofus".. Flash game, but it clearly didn't want to cooperate :(.


hmm maybe you have to do a weird hook or something…they may have something blocking it?…but on just a normal everyday browser flash game they work fine

Gu3st...

2010-02-08 16:43:25

From: mastaraymond
Try it on "Dofus".. Flash game, but it clearly didn't want to cooperate :(.
Even SCAR's MoveMouse wont work on Dofus :/

marpis

2010-02-08 17:17:03

What handle should I hook? WebBrowser1.Handle?