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

Re: Gambas script capabilities


On 10/9/26 11:29, Olivier Cruilles wrote:
Hello everyone,

I’m currently testing a little more Gambas Scripting capabilities and I would like to have your opinion please.

As I remember, it was possible to create simple graphic application into a *.gbs script but trying to convert a simple Graphic App ‘Hello world' into a simple Form + a button Quit -> to a script .gbs using the command ‘gbs3 —convert-project /path/to/helloword/app’ , produce a script .gbs file but it does not work when I run it.

Just to clarify if it’s really possible have simple graphic forms into a .gbs script or not at all ?

Thank you


Olivier

Hi Olivier again,

Here is a short script that does the same thing without forms, it shows a message and a form window

-------------------------------------------------------------------- cut here --------------------------------------------------------------------
#!/usr/bin/env gbs3
' Gambas Script File Created 10/09/2026 14:00:45

use "gb.gui"

message.info("This is just for information")

    Dim f As New Form as "myform"
    f.height = 200
    f.Width = 200

    Dim l As New Label(f)

    l.x = 30
    l.y = 30
    l.height = 40
    l.width = 160
    l.text = "Hello World"
    f.showmodal()                        ' need this as there is no event loop in this case it just flashes otherwise


 print "end of program"

Quit 0
Catch
error "Script Error >";;error.text & "\n" & error.where
---------------------------------------------------------------------------------------- cut here -----------------------------------------------------------------------------

--
~~~~ Brian

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature


References:
Gambas script capabilitiesOlivier Cruilles <olivier.cruilles@xxxxxxxx>