⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 entwshxmlexamples.wsc

📁 Apress - Managing Enterprise Systems With The Windows Script Host Source Code
💻 WSC
字号:
<?xml version="1.0"?>
<component>
<registration
    description="ENTWSH XML Element example"
    progid="ENTWSH.XMLExamples"
    version="1.00"
    classid="{23cb7610-6eae-11d4-bce2-00104b164591}"
>
</registration>
<public>
    <method name="WriteFile">
          <parameter name="strPath"/>
    </method>
</public>
 <comment>
  Set debugging on, reference the FSO type library,
  create an instance of the FSO object and create a resource.
 </comment>
 <?component error="true" debug="true"?>
 <reference object="Scripting.FileSystemObject"/> 
 <object id="objFSO" progid="Scripting.FileSystemObject"/> 
 <resource id="Message">This is a message to write to the file
to test a few additional XML elements that can be used
 </resource>
<script language="VBScript">
  <![CDATA[
Function WriteFile(strPath)
  'write the Message resource to a file specified by the 
  'strPath parameter
  Set objTS = objFSO.OpenTextFile(strPath, ForWriting, True)
  objTS.Write getResource("Message")
  objTS.Close
End Function
]]>
 </script>
</component>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -