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 ...
随机推荐
- HanLP 配置与使用
https://github.com/hankcs/HanLP 下载 hanlp-1.6.0.jar和 hanlp.properties 放在主目录下 修改 hanlp.properties 参考官网 ...
- MSC服务器-主从检测脚本-check_server_state.sh
说明: 发现keepalived会在凌晨自动进行主从切换,导致msc相关进程运行不稳定: 通过运行check_server_state.sh,及时终止/启动相关进程: 所有脚本使用supervisor ...
- linux php.ini文件没有指向 不生效
phpinfo下查看: 命令行下查看 :php -i | grep "Loaded Configuration File" 解决: 使用命令去追踪错误: strace /usr/ ...
- django BBS project login登录功能实现
1.models from django.db import models # Create your models here. from django.contrib.auth.models imp ...
- Fedora瘦身
启用的服务 systemctl list-unit-files --type=service | grep enabled 所有服务 systemctl list-unit-files --type= ...
- linux-----初学命令和理解
the following Codes has been confirmed by me 1.头部标识[pecool@demo ~]: 其中pecool代表登入用户:demo代表系统名称:~代表当前处 ...
- 【java多线程】线程状态分析
一.java线程的状态 NEW: 新建状态,线程对象已经创建,但尚未启动 RUNNABLE:就绪状态,可运行状态,调用了线程的start方法,已经在java虚拟机中执行,等待获取操作系统资源如CPU, ...
- day43 数据库学习egon的博客 索引
一 介绍 为何要有索引? 一般的应用系统,读写比例在10:1左右,而且插入操作和一般的更新操作很少出现性能问题,在生产环境中,我们遇到最多的,也是最容易出问题的,还是一些复杂的查询操作,因此对查询语句 ...
- Creating Node.js Command Line Utilities to Improve Your Workflow
转自:https://developer.telerik.com/featured/creating-node-js-command-line-utilities-improve-workflow/ ...
- 【网络协议】TCP分段与IP分片
版权声明:本文为博主原创文章,未经博主同意不得转载. https://blog.csdn.net/mmc_maodun/article/details/30109789 我们在学习TCP/IP ...




►
►




