Answer the question
In order to leave comments, you need to log in
Win application management using PHP
Colleagues, please help!
The task is to manage a window win application (pressing buttons and entering data into forms) through a website using PHP. Naturally, the application lies on the server and has all the necessary rights.
I understand that this is a somewhat perverted task, but these are the external conditions and there is no possibility to change them.
Can you suggest how to approach the task and what manuals to smoke? Googling hasn't yielded clear results. There are options for console applications, but it is not clear how to work with windows.
Answer the question
In order to leave comments, you need to log in
RTFM MSDN :)
FindWindow/PostMessage (WinAPI)
Further, we attach it to PHP in any way: either with an extension, or just a separate application with an interface to stdin/out (php launches it and passes the necessary data/commands).
Hmm… look towards php WinAPI (Keystroke emulation sent to the right windows, etc.) (this is if the application is not editable at all) or towards php + COM, if you can build the necessary interface on the application side.
In addition to FindWindow and PostMessage, there are also useful functions keybd_event, mouse_event.
The easiest option is to write the simplest program in a normal compiled language from a pair of FindWindow + PostMessage functions. Parameters for these functions will be taken from the command line of the program.
And from the PHP program we will call: system("FindWindowAndPostMessage.exe 'WinAmp' WM_LBUTTONDOWN 0 0");
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question