M
M
meytntery2011-06-08 17:35:11
PHP
meytntery, 2011-06-08 17:35:11

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

5 answer(s)
A
Alexander, 2011-06-08
@meytntery

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).

M
mark_ablov, 2011-06-08
@mark_ablov

write an extension module.

O
Oleg Matrozov, 2011-06-08
@Mear

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.

V
vinxru, 2011-06-08
@vinxru

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");

S
schastny, 2011-06-11
@schastny

I thought I was the only one such a pervert, to program the bill acceptor on the COM port through PHP. :))
But it turns out, no, they haven't died yet... :D

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question