The web application on delf, as the browser I use the Tchromium component. I load into it a site in which there is a game on flash using the code:

var CI: TCursorInfo; begin CI.cbSize := SizeOf(CI); GetCursorInfo(CI); Image1.Picture.Icon.Handle := CI.hCursor; 

In image1 I get images of the cursor. But if the cursor is over Flash, and it is replaced with its cursor there, then nothing is displayed in image1. CI.hCursor is 351474505, and any drawn cursor from flash is equal to this value.

How can I get an exact image of the current cursor over flash or even track this change?

  • I did not see an exhaustive answer to my question, or is it all the same impossible in this case, I can only point out the best answer, to get around the problem in another way. - Sergei123

3 answers 3

The question is - is it necessary to write your own implementation, or can you use SCAR Divi? He just allows you to write your script. Hooks interface elements, flash too (for example, autoclickers for games are written on it, etc.).

Update

@ Sergei123
http://www.scar-divi.com/ - I personally liked this creation very much. The author understands the case of this project.

@ Sergei123 was pleased that it was possible to track the appearance of a picture in a flash-game and accordingly take some action (click on the coordinates of the place where the picture appears in the monitored area).

And further. The script - I got excited. The program allows you to create your application with a graphical interface (I simply tracked everything that happens in an infinite loop and performed actions according to the condition).

  • Thank you, for the first time I hear about this program, it will be necessary to study. - Sergei123
  • Updated the answer - smackmychi
  • Interestingly, of course, it’s just not clear why the scar divi Paskalevskaya development environment can do it, but delphi doesn’t? I think it is quite possible that the same module with functions is also filed for Delphi, which are used in scar divi. And then rewriting your application from scratch to scar divi is not an option, one Tchromium component costs a lot. - Sergei123
  • @ Sergei123 I understand that WinAPI is used. And I do not think that it is worth mixing, maybe, the variant of a third-party application on SCAR Divi and yours will suit you. Separately, there is. You would describe the essence of your application and what's what. - smackmychi 4:26

@vas , at the expense of "Probably nothing." very dubious argument. )

For everything that we see on our screen is already in our computer, and everything can be pulled out, there would be a desire.

But most likely in each case, the approach will be its own, universal, you are unlikely to find.

@ Sergei123 , this is not provided by the standard API, because the mouse hook is unlikely to help.

    Probably nothing.

    flash plugin is inherently hfepth? living by its own laws. His code is closed, and you can not get into it. The only thing is, if your game is yours, then you can give a drawing of the cursor across the bridge js out of the flash. But chrome has its own plugin Pepper, look, maybe it has open api.

    • Thanks for the answer, not mine, that’s the problem, I don’t want to get into it, just superficially to track down even a cursor change event over it. I can track it only by getting the value of CI.hCursor equal to 351474505. But this value is obtained over any object with a non-standard cursor, that it will not be possible to execute the necessary function logic, now I delve into the hook events and mouse events, I don’t know if it will solve my problem. - Sergei123