faqts : Computers : Programming : Languages : PHP

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

4 of 4 people (100%) answered Yes
Recently 4 of 4 people (100%) answered Yes

Entry

Gui
CLI

Mar 28th, 2008 17:16
ha mo, raphael emportu, http://www.autohotkey.com


Hi guy's,
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
lies.
I use a php script to produce output that is displayed by a AHK message box.
The php script looks like:
 [code]
<?php
echo "String displayed by AHK.\r\n";
?> 
[/code]
just cut and paste and save as mytest.php
the AHK script looks like:
[code]
runwait %comspec% /c c:\php\php.exe mytest.php > test.txt,,hide
FileRead, phpoutput, test.txt
MsgBox, %phpoutput%
FileDelete test.txt
return
[/code]
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.
http://www.tantofa.com
http://www.fantofa.com
http://www.mantofa.com
http://www.tanpola.com
http://www.tampola.com
http://www.yamot.com
http://www.mozmar.com
http://www.templatestemp.com