It is necessary that java can move the cursor in photoshop. Java can move the cursor and does it normally in other applications, but when the photoshop window is active, java cannot do anything for some reason. The cursor stands still and moves only from the mouse. windows.h in c ++ didn't help either. I guess I need to simulate input, but I don’t know how to do it. Ready to use another language if necessary ... Photoshop SDK is not an option.
2 answers
Your shoals:
1) You use the cross-platform software for writing a program that works with WinAPI - do not do this, use the pluses or delphi for this purpose better
2) Are you sure that the events of the mouse in photoshop coincide with the events in ordinary applications (I'm not sure, because there are several areas and panels that are somehow cleverly connected) Here Spy ++ (Messages) and its analogs will help you .
3)
There is a need to make a list of applications.
As you can see, even the creators recommend using only for tests ... Which is logical, because the program can, in addition to standard ones, process non-standard messages. (You shoul use SendMessage )
-
How would I do:
1) I would look for another way to solve the problem (plug-ins for photoshop or something else), since working with forms from under WinAPI is not reliable!
2) If there is no other way out, I would open Spy ++ and study the structure of the program, its Messages and logic. On the basis of the information received, I would build logical chains for the operations I need.
3) Choosing the most convenient PL.
4) Using the received chains would implement the interaction based on SendMessage
- Thank. But I am writing an application that will emulate a touchpad / graphics tablet. I would like to imitate input. Plugins are not very suitable. Is there a way to emulate a mouse? - Alex Sergeev
- @AlexSergeev, did you read or glance over my answer? - Alrott SlimRG
- There in black and white - Alrott SlimRG
- 1) For plug-in / graphics tablet emulation, plug-ins are great because support estates in 99% of program modules. I once wrote a plugin for photoshop port on xbox classic ... - Alrott SlimRG 7:43 pm
- 2) You can not emulate a mouse, because There is no such thing in WinAPI !!! BUT, you can emulate the messages that the mouse sends to the program (to do this, completely read my answer) - Alrott SlimRG
Understood. Because all applications with which problems arose were launched on behalf of the administrator, then the application had to be launched on behalf of the administrator