Sign in to follow this  
Followers 0
silvano

write string space and string

7 posts in this topic

can i write smarty string like this:

001 002

so, can i write space character dynamically

$test = "001"

$test2 = "002"

$test = $test1 & dynamically five space & $test2

tks

Share this post


Link to post
Share on other sites



Like this maybe

$test1 = "001"
$test2 = "002"

$test = $test1 & "     " & $test2
MsgBox(0, "", $test)

Support bacteria; it's the only culture most people have.LxP's Learning to Script with AutoIt 3 - Excellent starting placeVolly's Links Page - Links to cool and useful scriptsAutoIt Wrappers - Valuater's AutoIt Wrappers post. Lots of good stuff.Support AutoIt - Make a donation here; I did.[size="2"]#include <Guinness.pint>[/size]

Share this post


Link to post
Share on other sites

Like this maybe

$test1 = "001"
$test2 = "002"

$test = $test1 & "     " & $test2
MsgBox(0, "", $test)

this is not dynamically string

$space is variable

$space = 5 or $space = 10

$test = $test1 & $space & $test2

Share this post


Link to post
Share on other sites

Func _DynamicSpace($length)
    Local $string = ""
    If $length = 0 Then Return ""
    For $i = 1 To $length
        $string &= " "
    Next
    Return $string
EndFunc

thank you, i have just finished the func with Chr(32), the same way like you

tks, bye

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0