[Gambas-user] Two short questions

Benoît Minisini gambas at ...1...
Sat Mar 3 19:26:28 CET 2012


Le 03/03/2012 18:53, M. Cs. a écrit :
> Hi I have two short questions:
> 1. Is it a way to handle a curl request as process?
> I use to call :
> Shell "curl http://www.mysite.com" to $myvar
> This is a bit unsafe. If the net hangs, the program hangs too. Would I
> be able to kill the process, if I created it as:
> $hProcess=Exec["curl","http://www.mysite.com"]
> ?

Or you can use the gb.net.curl component, that does CURL request 
asynchronously.

>
> 2. I've created a PDF file, and I would like to include it to the
> project package, and let the user open it with a PDF browser. What's
> the path of the included myfile.pdf if I would like to open it with
> shell command in Okular or similar?
>
> Thanks for the fast answer!
>
> Csaba

You must copy it to a temporary location, because only the Gambas 
program can access files located inside its executable.

Regards,

-- 
Benoît Minisini




More information about the User mailing list