[Gambas-user] Command line Gambas with Timer?

Stefano Palmeri rospolosco at ...152...
Mon Feb 9 11:58:50 CET 2009


Il lunedì 9 febbraio 2009 11:10:10 Rolf-Werner Eilert ha scritto:
> Hi folks,
>
> is it possible to make a Gambas command line program and use a Timer?
>
> In a command line program, you have a SUB Main(). But
>
> DIM myClock AS NEW Timer
>
> would have to be done outside this SUB Main(), right? Defining it within
> SUB Main is accepted but doesn't have any effect, of course.
>
>
> Does Gambas jump from SUB Main() into other SUBs anyway?
>
> Regards
>
> Rolf
>
> ---------------------------------------------------------------------------
>--- Create and Deploy Rich Internet Apps outside the browser with
> Adobe(R)AIR(TM) software. With Adobe AIR, Ajax developers can use existing
> skills and code to build responsive, highly engaging applications that
> combine the power of local resources and data with the reach of the web.
> Download the Adobe AIR SDK and Ajax docs to start building applications
> today-http://p.sf.net/sfu/adobe-com
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user

Hi, here's an example:

'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
PUBLIC hConsoleTimer AS Timer 

PUBLIC SUB Main()
    
  hConsoleTimer = NEW Timer AS "MyTimer"
  hConsoleTimer.Delay = 1000
  hConsoleTimer.Enabled = TRUE
    
END

PUBLIC SUB MyTimer_Timer()
  
  PRINT "Hello Gambas" 
  
END
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''

Saluti, 

Stefano




More information about the User mailing list