Results 1 to 4 of 4

Thread: File_Load driving me mad but it shouldn't

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Junior Member
    Join Date
    Nov 2014
    Posts
    4
    Rep Power
    0

    Question File_Load driving me mad but it shouldn't

    Greetings,
    I'm using the following script which creates 2 files (HTML and TXT) in my desktop folder which works fine. My problem is with the File_Load. It returns gibberish (for me, it always returns ˙ūC).

    =====================================================
    ' Create file containing list of Windows Hotfixes
    ' using the Windows Management Instrumentation Command (WMIC)
    ' command. This can produce and HTML file (cmdh) or a TXT file
    ' (cmdt).

    Uses "OS", "File"

    String buffer
    String wm = "wmic qfe list full "
    String Desktop = OS_GetSpecialFolder(%CSIDL_DESKTOP)
    String h1 = "/format:htable > "
    String h2 = Desktop & "hotfix.html"

    String t1 = "/format:texttablewsys > "
    String t2 = Desktop & "hotfix.txt"

    String cmdh = wm & h1 & $DQ & h2 & $DQ
    String cmdt = wm & t1 & $DQ & t2 & $DQ
    String lap = OS_GetSpecialFolder(%CSIDL_LOCAL_APPDATA)

    RunCommand(cmdh)
    RunCommand(cmdt)

    buffer = FILE_Load(t2)
    ClipBoard_SetText(buffer)
    MsgBox(0,buffer)
    MsgBox(0,t2)

    Function RunCommand( sCommand As String )
    String tempBat = lap + "TEMP\temp.bat"
    FILE_Save(tempBat, sCommand)
    OS_Shell(tempBat, %OS_WNDSTYLE_HIDE, %OS_SHELL_SYNC)
    End Function
    =====================================================
    What the heck am I doing wrong? The File_Load seems so straight-forward.

    Regards
    Last edited by Django; 23-11-2014 at 19:02.

Similar Threads

  1. Google self driving test
    By ErosOlmi in forum Technology
    Replies: 1
    Last Post: 31-03-2012, 14:40
  2. Nevada Gives Green Light to Self-Driving Cars
    By danbaron in forum Science
    Replies: 2
    Last Post: 26-06-2011, 05:39
  3. using file_load?
    By sandyrepope in forum thinBasic General
    Replies: 3
    Last Post: 18-07-2007, 07:15

Members who have read this thread: 0

There are no members to list at the moment.

Posting Permissions

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