Results 1 to 5 of 5

Thread: Read svb file (vb script) at once

  1. #1

    Thread Starter
    PowerPoster jcis's Avatar
    Join Date
    Jan 2003
    Location
    Argentina
    Posts
    4,430

    Arrow 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
    Attached Files Attached Files
    Last edited by jcis; Apr 23rd, 2009 at 05:28 PM.

  2. #2
    Software Carpenter dee-u's Avatar
    Join Date
    Feb 2005
    Location
    Pinas
    Posts
    11,127

    Re: Read svb file (vb script) at once

    Should not the extension be .vbs?
    Regards,


    As a gesture of gratitude please consider rating helpful posts. c",)

    Some stuffs: Mouse Hotkey | Compress file using SQL Server! | WPF - Rounded Combobox | WPF - Notify Icon and Balloon | NetVerser - a WPF chatting system

  3. #3

    Thread Starter
    PowerPoster jcis's Avatar
    Join Date
    Jan 2003
    Location
    Argentina
    Posts
    4,430

    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.

  4. #4
    Software Carpenter dee-u's Avatar
    Join Date
    Feb 2005
    Location
    Pinas
    Posts
    11,127

    Re: Read svb file (vb script) at once

    What would be the problem if you will just eliminated those unwanted characters?
    Regards,


    As a gesture of gratitude please consider rating helpful posts. c",)

    Some stuffs: Mouse Hotkey | Compress file using SQL Server! | WPF - Rounded Combobox | WPF - Notify Icon and Balloon | NetVerser - a WPF chatting system

  5. #5

    Thread Starter
    PowerPoster jcis's Avatar
    Join Date
    Jan 2003
    Location
    Argentina
    Posts
    4,430

    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width