PHP-GTK2 Cookbook Forum
Welcome, Guest
Please Login or Register.    Lost Password?
Re:php-gtk external app launch (1 viewing) (1) Guest
Go to bottom Post Reply Favoured: 0
TOPIC: Re:php-gtk external app launch


#48
wella (User)
Fresh Boarder
Posts: 4
graphgraph
User Offline Click here to see the profile of this user
php-gtk external app launch 4 Years, 3 Months ago Karma: 0  
Hi,
has anyone experience with launching external application under MS winXP? I mean exec("..."); and then the ext. app is waiting for something. During waiting php-gtk window freezes and is impossible move or resize it. Popen, add_io_watch does not help.
 
  The administrator has disabled public write access.

#49
kksou (Admin)
Admin
Posts: 1599
graph
User Online Now Click here to see the profile of this user
Re:php-gtk external app launch 4 Years, 3 Months ago Karma: 23  
Hi,

1. If your external app is another php program, then I would suggest you merge it into your PHP-GTK program, and use the following technique to display long task in progress:

Recipe 68: How to display progress bar while processing long task - Part 2 using_idle_add?

2. If your need to launch external app, then use the following:

Recipe 48: How to launch external app in winxp without the flashing of cmd window?

Regards,
/kksou
 
 
Last Edit: 2008/01/28 01:44 By kksou.
  The administrator has disabled public write access.

#51
wella (User)
Fresh Boarder
Posts: 4
graphgraph
User Offline Click here to see the profile of this user
Re:php-gtk external app launch 4 Years, 3 Months ago Karma: 0  
Uou, I forgot some important info.
php launchs $data=exec("listener.exe","r"). Listener is a program which waits for data on serial port(10s timeout) and if any then prints it to the std and exit. During 10s php-gtk window freezes(see my first question). And for some reasons I cannot use fopen("comx","r"). The question is how to exec listener without freezing main GtkWindow.
 
  The administrator has disabled public write access.
#52
wella (User)
Fresh Boarder
Posts: 4
graphgraph
User Offline Click here to see the profile of this user
Re:php-gtk external app launch 4 Years, 3 Months ago Karma: 0  
Thanks kksou,

it helps. I run listener via COM set in Run("listener > file",0,TRUE). Then in php only read content of this file. TRUE means that "Wait for the command to complete before continuing execution of the wsh script." During Run php is blocked due the TRUE however is possible to move window.
 
  The administrator has disabled public write access.



Go to top Post Reply
Powered by FireBoardget the latest posts directly to your desktop

Blog - Forum - Privacy Policy - Contact Us
Copyright © 2006-2012. kksou.com. All Rights Reserved