Re: php local application send mouse click

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 12 Apr 2008, at 00:13, Daniel Kolbo wrote:
In addition to the function i mentioned from winbinder wb_send_message() I have tried:

I tried loading in the user32.dll extension from within the php.ini, this failed.
I tried loading in the user32.dll from within the script, this failed.

dl("user32.dll")

The dl function is for loading PHP extensions, not any old DLL. The same goes for the extensions section of php.ini.

I tried loading in the php_w32api.dll from within the script (i copied the php_w32api.dll from php4 into my ext/ folder in php5.

dl("php_w32api.dll");

this worked; however, when I tried registering the functions from within the script it failed on me.

w32api_register_function("User32.dll",
                        "mouse_event",
                        "void");

I really am at a lose of how to even begin. How would I execute a mouse click from a php script on a console application?

1) You should be using SendInput not mouse_event unless you're on Windows 9x.

2) Why are you trying to do this in PHP? It would be much easier to develop and test in C# or VB or even C++. At the very least I'd recommend doing that to get the sequence of API calls worked out and then port it over to PHP.

-Stut

--
http://stut.net/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux