[Gambas-user] Gambas Scripting Language - Some Questions

Benoît Minisini gambas at ...1...
Mon May 18 17:35:47 CEST 2009


> Hello all,
> I have some questions about the scripting language. I need a little help.
> Question
>
> Thanks in advance, and have a nice weekend.
>

The scripter works by creating a temporary project from your script, by 
compiling it, and by running it. The compiled project is cached so that it is 
used immediately if you run the script again.

So:

> 1- The gbs2 scripter only have access to the gb. internal native class?

No, it can use any component.

> 2- How can I use other components as the gb.XML?

By using the special instruction USE. For example:

USE "gb.xml","gb.xml.rpc"

> 3- Why my scripts dont run directly even when I am including the first
> line #!/usr/bin/env gbs2?

Two possible reasons:

- The gbs2 symbolic link does not exist.

- It exists, but is not in a directory specified in your PATH environment 
variable.

> 4- How can I pass arguments to the script?

Just pass them:

$ MyScript A B C

Regards,

-- 
Benoît




More information about the User mailing list