Notifications
Clear all
[Closed] Read characters via dotNet
Jul 28, 2013 7:06 pm
Hi all.
I want to compile a c++ code to maxscript, that read characters from a file. But I have a problem with maxscript’s readchar function, because sometimes it doesn’t return the correct character. So I want to try dotNet’s functions. But I didn’t find a function that can read characters from a file, only specified amount of bytes. Is there a readchar command in dotNet?
Thank you
2 Replies
Jul 28, 2013 7:06 pm
stream = dotnetobject "System.IO.StreamReader" "c:\\Test2.txt"
while (c = stream.read()) != -1 do print (bit.intAsChar c);
stream.close();