1 Attachment(s)
Read svb file (vb script) at once
This should be easy, but something is happening with these files, if I read as BINARY, the String I Get doesn't look like normal text, then if I convert the String using vbFromUnicode it gets fixed but a '?' char appears at the begining.
This is the code:
Code:
Dim StrRet As String
Open "C:\scr1.svb" For Binary As #1
StrRet = Space(LOF(1))
Get #1, , StrRet
Close #1
Using that same code in normal TXT files works, but not for these SVB.
If I do StrRet = strconv(StrRet, vbFromUnicode) then the string is fixed, but then there is that ? symbol at the begining.
Thanks
Re: Read svb file (vb script) at once
Should not the extension be .vbs?
Re: Read svb file (vb script) at once
Well yes, it's the same. It's because This automated testing tool saves the script using svb like the file attached, but appart from the extension i don't think there is much difference.
Re: Read svb file (vb script) at once
What would be the problem if you will just eliminated those unwanted characters?
Re: Read svb file (vb script) at once
Yes, that would fix this case but i was thinking about other cases. i'll see how it reacts with other svb files.