How to check the number of characters in a row?

Multimedia Builder

How to check the number of characters in a row?

Postby pmedia » Wed Apr 04, 2018 6:44 am

Hello friends :D
I'm also a big fan of the amazing MMB software
I built dozens of apps and useful software with it
I am sorry and disappointed that they have stopped developing it
There is no such tool anywhere in the world that allows people without knowledge Build software so easily


I have a little question
I'm building a small screensaver (Frame with Replaces text)

I am loading .txt file with many lines to SongList and every 5 sec Load different line on Paragraph
Some of the lines are long and some of them are short
So I need to increase or decrease the font and move the Paragraph to center

I don't know how to check the number of characters in a line

e.g If (Number_of_characters < 100 ) Then

Can anyone give me this simple code ??

thank you!!

Image

Image





e.g of script

<load Script>
SongListLoad("<Embedded>\text.txt","")
LoadText("Paragraph","<List>RND(300)+1")




<text Script>

If (Number of characters < 100 ) Then

** Some design fixes actions I need To do (Font size / Center Alignment )
End
If (Number of characters < 100 ) Then

** Some design fixes actions I need To do (Font size / Center Alignment )
End

** Replace text every 5 seconds (run this Script)
ScriptTimer("text","5000")
pmedia
 
Posts: 1
Joined: Wed Apr 04, 2018 5:45 am

Re: How to check the number of characters in a row?

Postby dgilmour » Fri Apr 13, 2018 6:02 pm

Load text to the string variable first, then check its length using LEN(string$).
dgilmour
 
Posts: 477
Joined: Fri Oct 22, 2010 11:29 am
Location: Kutná Hora, Czech Republic


Return to MMB

Who is online

Users browsing this forum: No registered users and 2 guests