Bill Allombert on Fri, 20 Sep 2024 15:55:19 +0200


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: How to determine if Windows or Mac OS


On Fri, Sep 20, 2024 at 03:46:08PM +0200, Loïc Grenié wrote:
> Le ven. 20 sept. 2024 à 14:12, Jean-Luc Arnaud <jean-luc@filmsons.com> a
> écrit :
> 
> > Hi all,
> >
> > I'm writing GP scripts to be used on Windows or Mac OS.
> >
> > Is it possible (and how) to know if the script runs on Windows or Mac OS?
> >
> 
>     Maybe
> 
> extern("uname")

It is safer to use externstr in this case.

? externstr("uname")
%3 = ["Linux"]

Cheers,
Bill