Sign in to follow this  
Followers 0
VicTT

String trouble

5 posts in this topic

#1 ·  Posted (edited)

Func Misc_AddNull($number)
Local $i,$s=""
Debug("Misc_AddNull","StringLen should be "&$number)
for $i=1 to $number
$s=$s&Chr(0)
Debug($s,StringLen($s))
next
Return $s
EndFunc
Func Debug($a,$s)
Msgbox(0,$a,$s)
EndFunc
$s="Whatever"&Misc_AddNull(4)&"Blah"

Why doesn't that work?AutoIt just doesn't seem to want to add nulls to a string..WHAT IS THERE TO BE DONE?

Edited by VicTT

[quote]Together we might liveDivided we must fall[/quote]

Share this post


Link to post
Share on other sites



Actually, I asked the question in the Bug Forum AFTER I started a thread here and seen that no one doesn't really care to answer..I'm glad I've been given such an informative first-response..


[quote]Together we might liveDivided we must fall[/quote]

Share this post


Link to post
Share on other sites

Actually, I asked the question in the Bug Forum AFTER I started a thread here and seen that no one doesn't really care to answer..I'm glad I've been given such an informative first-response..

Your script is working as expected. you get a binary string of 4 null char.

Share this post


Link to post
Share on other sites

This happens in beta .76?


[quote]Together we might liveDivided we must fall[/quote]

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