zoukankan      html  css  js  c++  java
  • vbs mytest

    public Function SaveText(filePath,content)
    set fso=createobject("scripting.filesystemobject")
    Set f = fso.CreateTextFile(filePath,True)
    f.write(content)
    f.close
    End Function

    Function copy(value,objShell)

    'replace_str=""&chr(34)
    'Set regEx = New RegExp
    'regEx.Pattern = """"
    'regEx.IgnoreCase = True
    'value = regEx.Replace(value, replace_str)
    value= rechange(value)
    'msgbox value
    Clipboard="MsHta vbscript:ClipBoardData.setData(""Text"","""&value&""")(Window.Close)"
    objShell.Run(Clipboard)

    'MsgBox keys

    End Function

    '字符转义
    Function rechange(value)
    Set regEx = New RegExp
    regEx.Pattern = """"
    regEx.IgnoreCase = True
    value = regEx.Replace(value, replace_str)
    rechange=value
    End Function


    'Dim http
    'Set http = CreateObject("Msxml2.ServerXMLHTTP")
    'http.open "GET","http://localhost/_ui/mobile/common/js/waypoints.min.1.1.5.js" ,False
    'http.send
    'WSH.Echo http.responsetext
    'msgbox http.status
    'msgbox http.responsetext
    'saveText "d:/aaaaaaaaaaaa.txt",http.responsetext

    Dim oShell
    Set oShell = CreateObject("WScript.Shell")
    oShell.Run "cmd /k cd /d D:/"
    WScript.sleep 100
    Call copy("type wuwuwuwuuw.txt",oShell)
    WScript.sleep 200
    oShell.SendKeys "(^v)"
    WScript.sleep 500
    oShell.SendKeys "{ENTER}"
    Set oShell = Nothing

    'Set fso = CreateObject ("Scripting.FileSystemObject")
    'Set stdout = fso.GetStandardStream (1)
    'Set stderr = fso.GetStandardStream (2)
    'stdout.WriteLine "This will go to standard output."
    'stderr.WriteLine "This will go to error output."

  • 相关阅读:
    Codeforces Round #518 Div. 1没翻车记
    BZOJ4310 跳蚤(后缀数组+二分答案)
    后缀数组备忘
    洛谷 P3573 [POI2014]RAJ-Rally 解题报告
    洛谷 P1503 鬼子进村 解题报告
    洛谷 P2375 [NOI2014]动物园 解题报告
    洛谷 P2797 Facer的魔法 解题报告
    【模板】三分法
    那些神奇的DP建模
    洛谷 P1136 迎接仪式 解题报告
  • 原文地址:https://www.cnblogs.com/developer-ios/p/6220854.html
Copyright © 2011-2022 走看看