国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁(yè) > 開發(fā) > JS > 正文

Save a File Using a File Save Dialog Box

2024-09-06 12:42:08
字體:
來(lái)源:轉(zhuǎn)載
供稿:網(wǎng)友
Demonstration script that allows you to enter a file name in a File Save dialog box, and then saves a sample text file (consisting entirely of the current date) under that file name. 

Supported Platforms

Windows Server 2003
 No

Windows XP
 Yes

Windows 2000
 No

Windows NT 4.0
 No

Windows 98
 No


Script Code

代碼如下:
Set objDialog = CreateObject("SAFRCFileDlg.FileSave") 

objDialog.FileName = "C:/Scripts/Script1.vbs" 
objDialog.FileType = "VBScript Script" 
intReturn = objDialog.OpenFileSaveDlg 

If intReturn Then 
    Set objFSO = CreateObject("Scripting.FileSystemObject") 
    Set objFile = objFSO.CreateTextFile(objDialog.FileName) 
    objFile.WriteLine Date 
    objFile.Close 
Else 
    Wscript.Quit 
End If 
發(fā)表評(píng)論 共有條評(píng)論
用戶名: 密碼:
驗(yàn)證碼: 匿名發(fā)表
主站蜘蛛池模板: 昔阳县| 昭平县| 阿拉善右旗| 兴安县| 鄯善县| 宿迁市| 扎赉特旗| 老河口市| 玉环县| 宜黄县| 古蔺县| 土默特左旗| 盐源县| 怀宁县| 自贡市| 洪江市| 邹城市| 苍梧县| 洮南市| 衡南县| 莆田市| 大兴区| 临武县| 密山市| 文水县| 沙雅县| 乡宁县| 红河县| 唐海县| 遵义市| 文安县| 陕西省| 平罗县| 松滋市| 清苑县| 清镇市| 工布江达县| 新巴尔虎右旗| 黄骅市| 中宁县| 当阳市|