[Gambas-user] Gambas Internet Cafe

Rob sourceforge-raindog2 at ...94...
Mon Mar 29 19:09:12 CEST 2004


On Monday 29 March 2004 12:25, Dimitri Bellini wrote:
> 	for your possible solution, after your suggest i want ask if
> is possible to start a mozilla session and after time period
> (credit left) kill from a main Gambas apps like a child proc?
> What do you think?

Absolutely.

PUBLIC MozProcess AS Process
PUBLIC cutofftime AS Long

sub StartMozilla()
	shell "mozilla-firefox" as MozProcess
	cutofftime = now + 3600 ' I don't know if this will work!
	' but the idea is, 1 hour from now... 
	' that's how I'd do it in perl :)
	' it might be more like now + (1.0/24.0)
	Timer1.interval = 30000 ' every 30 seconds
	Timer1.enabled = true	
end

sub Timer1_Timer()
	if now > cutofftime then MozProcess.Kill
end

or something like that....

Rob





More information about the User mailing list