View Poll Results: Does someone know how to make FLASHING TEXT in ThinBasic ?

Voters
0. You may not vote on this poll
  • flashing text

    0 0%
  • gold color

    0 0%
Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: FLASHING TEXT

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1

    FLASHING TEXT

    Hi all.
    I am new in programming in TB and still learning so i donīt realy know how to go about it yet, but i am making progress.
    I am testing out some very small programs i wrote and then delete them again if they donīt react the way i want.
    Now i want to put some FLASHING or BLINKING text in my program (a telephonebook).
    Does someone know how to do this ? EROS told me to use some OLD MSDOS code, but is not sure about it i think.
    Anyway, thank EROS for the tip.
    I anyone chould have any answers on my question, pls send it to my E-mail address:
    axel201255@yahoo.co.uk
    Thanks to all.
    Bye Frank.
    fravado

  2. #2
    thinBasic author ErosOlmi's Avatar
    Join Date
    Sep 2004
    Location
    Milan - Italy
    Age
    57
    Posts
    8,777
    Rep Power
    10

    Re: FLASHING TEXT

    Ciao Frank an wellcome here.

    If with "Flashing text" you are referring to blinking text inside a Console window, I'm quite sure it cannot be done in standard Win32 Console. It is not a limit of thinBasic but a feature not implemented in Win32 Console. So something to ask to Microsoft.
    Maybe some assembler man can help us here and see if there is a work around.

    If with "Flashing text" you are referring to text going on/off in a standard window dialog, than I think we can make it using a timer.

    Can you be so kind to tell what script type you are making? Console or Window?
    I think you are working in a console window using commands like "CONSOLE_WRITELINE". If not, please let me know.

    More, if you have some code not woking like you would like, please post here. It will be of great help for everyone to better understand it and try to find different solutions.

    Ciao
    Eros

    www.thinbasic.com | www.thinbasic.com/community/ | help.thinbasic.com
    Windows 10 Pro for Workstations 64bit - 32 GB - Intel(R) Xeon(R) W-10855M CPU @ 2.80GHz - NVIDIA Quadro RTX 3000

  3. #3
    Super Moderator Petr Schreiber's Avatar
    Join Date
    Aug 2005
    Location
    Brno - Czech Republic
    Posts
    7,128
    Rep Power
    732

    Re: FLASHING TEXT

    Eros,

    one thing occured to me - Mikes TBEM module!

    See this sample, needs latest TBEM from here copied to thinBASIC\Lib directory, with 1.6.0.3 default it won't work.

    [code=thinbasic]
    ' -- Flashing part of the screen

    uses "Console"
    uses "TBEM"
    uses "UI"

    alias Console_PrintLine as PrintLn
    alias Console_SetCursorPosition as Locate
    alias Console_setTextAttribute as SetColor
    alias Console_ColorAt as SetColorAt
    alias Console_Waitkey as WaitKey

    PrintLn("Hi there, this is some text")
    PrintLn("... really random text, press ESC to quit")

    ' -- Event fired each second ( = 1000ms )
    dim eventFlash as long
    %evt_UpdateFlash = 1

    ' -- This event will call "MakeAFlash" each 1000 ms
    eventFlash = TBEM_AddEvent("MakeAFlash", %evt_UpdateFlash)
    TBEM_Addtrigger(%evt_UpdateFlash)
    TBEM_setRepeat(eventFlash, %TRUE, 1000)

    ' -- Loop
    do

    ' -- Event manager, handles the flashing
    TBEM_RUN

    ' -- If ESCAPE is pressed then exit loop
    if GetAsyncKeyState(%VK_ESCAPE) then exit do

    loop

    PrintLn("Program ended")
    WaitKey

    function MakeAFlash()
    static Flip as long

    ' -- Flip will take value 1, 0, 1, 0, 1, 0, 1
    Flip = Flip xor 1
    if Flip = 1 then
    SetColor(%CONSOLE_FOREGROUND_GREEN or %CONSOLE_FOREGROUND_INTENSITY )
    else
    SetColor(%CONSOLE_FOREGROUND_RED or %CONSOLE_FOREGROUND_INTENSITY )
    end if
    Locate(77, 0)
    PrintLn("[*]")

    end function
    [/code]


    Bye,
    Petr
    Learn 3D graphics with ThinBASIC, learn TBGL!
    Windows 10 64bit - Intel Core i5-3350P @ 3.1GHz - 16 GB RAM - NVIDIA GeForce GTX 1050 Ti 4GB

  4. #4
    thinBasic author ErosOlmi's Avatar
    Join Date
    Sep 2004
    Location
    Milan - Italy
    Age
    57
    Posts
    8,777
    Rep Power
    10

    Re: FLASHING TEXT

    You always have clever idea but ...
    is it worth just for blinking text
    www.thinbasic.com | www.thinbasic.com/community/ | help.thinbasic.com
    Windows 10 Pro for Workstations 64bit - 32 GB - Intel(R) Xeon(R) W-10855M CPU @ 2.80GHz - NVIDIA Quadro RTX 3000

  5. #5

    Re: FLASHING TEXT

    Hey, at least one usage for TBEM

  6. #6
    Super Moderator Petr Schreiber's Avatar
    Join Date
    Aug 2005
    Location
    Brno - Czech Republic
    Posts
    7,128
    Rep Power
    732

    Re: FLASHING TEXT

    Quote Originally Posted by Michael Hartlef
    Hey, at least one usage for TBEM
    Don't worry Mike, this module won't be script-less for long


    Petr
    Learn 3D graphics with ThinBASIC, learn TBGL!
    Windows 10 64bit - Intel Core i5-3350P @ 3.1GHz - 16 GB RAM - NVIDIA GeForce GTX 1050 Ti 4GB

  7. #7
    thinBasic author ErosOlmi's Avatar
    Join Date
    Sep 2004
    Location
    Milan - Italy
    Age
    57
    Posts
    8,777
    Rep Power
    10

    Re: FLASHING TEXT

    Yes that's sure. I have a lot of ideas where to use it. It is just so clever.
    I just need more time, more time, more tiiiiime!
    www.thinbasic.com | www.thinbasic.com/community/ | help.thinbasic.com
    Windows 10 Pro for Workstations 64bit - 32 GB - Intel(R) Xeon(R) W-10855M CPU @ 2.80GHz - NVIDIA Quadro RTX 3000

  8. #8

    Re: FLASHING TEXT

    Time???? What is that? I gave up searching for it.

  9. #9

    Re: FLASHING TEXT

    I downloaded the script and the latest version of the TBEM module but it doesn't flash anything. What should flash?

    Thanks
    Sandy

  10. #10
    Super Moderator Petr Schreiber's Avatar
    Join Date
    Aug 2005
    Location
    Brno - Czech Republic
    Posts
    7,128
    Rep Power
    732

    Re: FLASHING TEXT

    Hi Sandy,

    you are right, to make it work properly you need thinCore.dll and thinRes.dll from here.

    ... the number of dependencies grows, time for new thinBASIC preview with all this inside


    Petr
    Learn 3D graphics with ThinBASIC, learn TBGL!
    Windows 10 64bit - Intel Core i5-3350P @ 3.1GHz - 16 GB RAM - NVIDIA GeForce GTX 1050 Ti 4GB

Page 1 of 2 12 LastLast

Similar Threads

  1. COMBOBOX GET TEXT
    By Michael Clease in forum Fixed or cleared errors in help material
    Replies: 0
    Last Post: 11-01-2010, 11:14

Members who have read this thread: 0

There are no members to list at the moment.

Posting Permissions

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