Mar 28th, 2008 17:16
ha mo, raphael emportu, http://www.autohotkey.com
With a lot of knowledge in PHP programming I love to use it outside the
well known web context with it's CLI version. Major setback is of course
the lack of GUI functionality. A well known but not very fortunate
approach is using PHP-GTK. This involves a separate PHP version and not
very elegant windows programming.
Now I discovered AHK http://www.autohotkey.com and immediately saw the
advantages over GTK.
Here my first basic test that took about 5 minutes. Every PHP user
should be able to see what's happening and where the advantage over GTK
I use a php script to produce output that is displayed by a AHK message box.
The php script looks like:
echo "String displayed by AHK.\r\n";
just cut and paste and save as mytest.php
the AHK script looks like:
runwait %comspec% /c c:\php\php.exe mytest.php > test.txt,,hide
FileRead, phpoutput, test.txt
just cut and paste and save as mytest.ahk
now run the AHK script and if your php resides in c:\php all thing
should be fine and a message box should turn up.
Amazing what kind of wealth lies here in these few lines.
Now this might be old stuff for some of you but I think it's worth
emphasizing especially considering that the search 'PHP UI AHK' doesn't
bring up much usefull information on Google.