VBScript Scripting Techniques: File Open Dialog http://www.robvanderwoude.com/vbstech_ui_fileopen.php
This website uses cookies to ensure you get the best experience on our website More info

VBScript Scripting Techniques > User Interaction > File Open Dialog
File Open Dialog
| UserAccounts.CommonDialog | |
|---|---|
| VBScript Code: | |
| WScript.Echo "Selected file: " & GetFileName( "C:\", "" ) WScript.Echo "Selected file: " & GetFileName( "", "Text files|*.txt" ) WScript.Echo "Selected file: " & GetFileName( "", "MS Office documents|*.doc;*.xls;*.pps" ) WScript.Echo "Selected file: " & GetFileName( "C:\WINDOWS", "Bitmaps|*.bmp" ) Function GetFileName( myDir, myFilter ) ' Standard housekeeping ' Create a dialog object ' Check arguments and use defaults when necessary ' Open the dialog and return the selected file name |
|
| Requirements: | |
| Windows version: | Windows XP |
| Network: | N/A |
| Client software: | N/A |
| Script Engine: | any (WSH if using default for directory) |
| Additional options: | objDialog.Filter = "MS Office files|*.doc;*.xls;*.pps|Text files|*.txt|All files|*.*" |
| Summarized: | Works in Windows XP only. If used in HTAs, the initial directory must be specified. Doesn't work in any other Windows version. |
![]() |
|
| [Back to the top of this page] | |
| SAFRCFileDlg.FileOpen | |
| VBScript Code: | |
| Set objDialog = CreateObject( "SAFRCFileDlg.FileOpen" )
' Note: The dialog will be opened without any file name or |
|
| Requirements: | |
| Windows version: | Windows XP, Server 2003 |
| Network: | N/A |
| Client software: | N/A |
| Script Engine: | any |
| Summarized: | Works in all Windows XP versions and in Server 2003. Doesn't work in Windows 95, 98, ME, NT 4, 2000 or 7, not sure about Vista. |
![]() |
|
| [Back to the top of this page] | |
| InternetExplorer.Application | |
| VBScript Code: | |
| Option Explicit
WScript.Echo "Selected file: " & ChooseFile( ) Function ChooseFile( ) |
|
| Requirements: | |
| Windows version: | any |
| Network: | N/A |
| Client software: | Internet Explorer |
| Script Engine: | any |
| Summarized: | Works in all Windows versions. |
![]() |
|
| [Back to the top of this page] | |
| WScript.Shell.Exec MSHTA | |
| VBScript Code: | |
| Option Explicit
Dim strFile strFile = SelectFile( ) If strFile = "" Then Function SelectFile( ) Dim objExec, strMSHTA, wshShell SelectFile = "" ' For use in HTAs as well as "plain" VBScript: Set wshShell = CreateObject( "WScript.Shell" ) SelectFile = objExec.StdOut.ReadLine( ) Set objExec = Nothing |
|
| Requirements: | |
| Windows version: | Windows XP and later versions |
| Network: | N/A |
| Client software: | MSHTA.EXE (native in Windows) |
| Script Engine: | any |
| Summarized: | Works in Windows XP, Vista, Windows 7, Windows 8, Windows 8.1. |
![]() |
|
| [Back to the top of this page] | |
| page last uploaded: 2016-09-19, 14:58 |
VBScript Scripting Techniques: File Open Dialog http://www.robvanderwoude.com/vbstech_ui_fileopen.php的更多相关文章
- VC++ chap12 file
file operation _______C语言对文件操作的支持 fopen accepts paths that are valid on the file system at the point ...
- ux.plup.File plupload 集成 ux.plup.FileLis 批量上传预览
//plupload 集成 Ext.define('ux.plup.File', { extend: 'Ext.form.field.Text', xtype: 'plupFile', alias: ...
- html 5 drag and drop upload file
compatible: chrome firefox ie 11 , not supported demo: http://demo.tutorialzine.com/2011/09/html5-fi ...
- InstallShield 创建自己的Dialog
1.在"User Interface"-"Dialogs"下,在All Dialogs右击"New Dialogs-"创建自己的Dialog ...
- Test Scenarios for image upload functionality (also applicable for other file upload functionality)
1 check for uploaded image path2 check image upload and change functionality3 check image upload fun ...
- RoR unobtrusive scripting adapter--UJS(一些Javascript的语法糖)
Learn how the new Rails UJS library works and compares with the old version of jquery_ujs that it re ...
- [javaSE] GUI(对话框Dialog)
对话框不能单独存在,依赖于窗体,有显示标题,有模式 获取Dialog对象,new出来,构造参数:Frame对象,String的标题,模式 窗体内部的内容,Label对象,Button对象,调用Dial ...
- dialog - 从 shell 显示对话框
总览 (SYNOPSIS) dialog --clear dialog --create-rc file dialog --print-maxsize dialog common-options bo ...
- 【转载】怎样使用ZEMAX导出高质量的图像动画
Zemax 导出高质量图片与动画 (2013-08-13 11:01:51) http://blog.sina.com.cn/s/blog_628dd2bc0101dycu.html 转载▼ How ...
随机推荐
- Anaconda canda 安装 Python3 配置
链接: 1.安装Python 3.5以及tensorflow 以前用virtualenv觉得挺好用了,但是用多python版本下安装tensorflow,出现问题: pip is configured ...
- JAVA基础部分复习(六、常用关键字说明)
/** * JAVA中常用关键字复习 * final * finalize * finally * * @author dyq * */ public class KeyWordReview exte ...
- 20155219 2016-2017-2《Java程序设计》课程总结
20155219 2016-2017-2<Java程序设计>课程总结 (按顺序)每周作业链接汇总 预备作业1:我期望的师生关系 预备作业2:做中学深入探讨 预备作业3:虚拟机的安装与学习 ...
- next_permutation函数和per_permiutation函数
next_permutation用于求有序数组里面的下一个排序,形式为next_permutation(数组名,数组名+n)
- XTU1254 Blance 如何实现称出1∼n 克的物品,请问最少需要几颗砝码?
题目描述 小明有一架天平,小明想称出1∼n 克的物品,请问最少需要几颗砝码? 比如小明想称出1∼4 克的物品,需要2颗砝码,为1和3克. balance 输入 第一行是一个整数T(1≤T≤10000) ...
- 2017.5.11 MapReduce运行机制
和HDFS一样,MapReduce也是采用Master/Slave的架构 MapReduce1包含4个部分:Client.JobTracker.TaskTracker和Task Client 将JAR ...
- Centos7提示swap交换空间不足解决方法
一张图就能解决的问题,就不多bb了
- 使用 --image-repository 解决kubeadm 安装k8s 集群 谷歌镜像墙的问题
从网上我们看到的好多kubeadm 安装k8s 的时候都说需要下拉取镜像,然后修改,实际上 我们可以使用配置参数,快速的跳过墙的问题 说明: 基础镜像,我们仍然存在,拉取的问题,但是dockerhub ...
- JSON数据的处理中的特殊字符
JSON现在是很常见的处理数据的方式了.但由于自己使用的是反射获取数据,必须自己处理特殊字符,但总是发现有一些看不见的字符在前台 var obj = jQuery.parseJSON(msg);会转换 ...
- oracle-pl/sql之一
http://www.cnblogs.com/huyong/archive/2011/05/10/2041951.html#_Toc15837 SQL语言只是访问.操作数据库的语言,并不是一种具有流程 ...




►
►




