Results 1 to 3 of 3

Thread: my first console script :)

  1. #1
    Senior Member Lionheart008's Avatar
    Join Date
    Sep 2008
    Location
    Germany, Bad Sooden-Allendorf
    Age
    45
    Posts
    914
    Rep Power
    101

    my first console script :)

    Hi and good morning

    I have built yesterday evening my first little console script... Have found an old script I have written some years ago for realsoft to show a logarithmus curve... - It's not easy for me to think in console modus, haha , I am fully tbgl, ui infected!

    I would like to know how I can print my results for the Log line results line per line, then I am happy with my first console script...
    after that it would be nice to check if I can show the curve with console modus... (draw?)...

    And I would like to know where is the advantage to use for example the relations between 'console/UI' handling???

    best wishes, Lionheart with a lot of fun, good mood on a strange new planet
    Attached Files Attached Files
    you can't always get what you want, but if you try sometimes you might find, you get what you need

  2. #2
    Senior Member Lionheart008's Avatar
    Join Date
    Sep 2008
    Location
    Germany, Bad Sooden-Allendorf
    Age
    45
    Posts
    914
    Rep Power
    101

    Re: my first console script :)

    hi all

    have found what I am looking for... now it's ok for me for the first try...

    'console_writeLine' is much better than print command, I like it

    ' Empty ThinBASIC CONSOLE file template
    ' my first console script, 16.+17.februar2009

    uses "console"

    Dim x, y, z As ext
    Dim i As Integer

    Console_SetScreenBufferSize(80, 65)

    Console_WriteLine(" Simple Logarithmus example for CONSOLE by lionheart ")
    Console_WriteLine("----------------")
    Console_WriteLine("Title : " + Console_GetTitle())
    Console_WriteLine("---push key to go forward---")


    For i=1 To 20
    x = i
    y = Log( x )
    z = Exp( y )
    Console_WriteLine format$("##: ",i)
    Console_WriteLine y, "is the log result: ",
    Console_WriteLine z
    Next
    Console_WriteLine("Press any key to exit this example")
    sleep 1500

    Console_WriteLine("Key pressed " + Console_Waitkey(12))
    Console_SetCursorPosition(25, 85)

    Console_WaitKey
    other things I will learn if there is enough time for it, it was just a good example to handle with uses "console", nice day all, best regards, Lionheart
    you can check the example, if the script runs as well as I wish it... or make critics when I have done something wrong
    Attached Thumbnails Attached Thumbnails Click image for larger version. 

Name:	first-test-Console script_2a_yes.png 
Views:	120 
Size:	62.9 KB 
ID:	5485  
    you can't always get what you want, but if you try sometimes you might find, you get what you need

  3. #3
    thinBasic author ErosOlmi's Avatar
    Join Date
    Sep 2004
    Location
    Milan - Italy
    Age
    51
    Posts
    8,311
    Blog Entries
    2
    Rep Power
    10

    Re: my first console script :)

    Lionheart,

    in console module there are many ALIAS commands. We develop all those alias to help users to migrate code from different BASIC dialects.

    For example the following are exactly the same:
    CONSOLE_PRINT
    CONSOLE_WRITE
    PRINT

    The same for:
    CONSOLE_PRINTLINE
    CONSOLE_WRITELINE
    PRINTL

    The same for:
    CONSOLE_CLS
    CLS

    The same for:
    CONSOLE_WAITKEY
    WAITKEY

    And so on.
    So you can use one set/style or the other.

    Ciao
    Eros

    www.thinbasic.com | www.thinbasic.com/community/ | psch.thinbasic.com
    Win10Pro 64bit - 8GB Ram - Intel i7 M620 2.67GHz - NVIDIA Quadro FX1800M 1GB

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •