领针厂家
免费服务热线

Free service

hotline

010-00000000
领针厂家
热门搜索:
技术资讯
当前位置:首页 > 技术资讯

如何使用ShellApplication技术-【新闻】佳木斯

发布时间:2021-04-20 12:06:26 阅读: 来源:领针厂家

如何使用Shell.Application技术

2、创建 Shell 对象

var Shell = new ActiveXObject;

2、使用 Shell 属性及方法

Shell.Application

Shell.Parent

Shell.CascadeWindows

Shell.TileHorizontally

Shell.TileVertically

Shell.ControlPanelItem /* 比如:sysdm.cpl */

Shell.EjectPC

Shell.Explore

Shell.Open

Shell.FileRun

Shell.FindComputer

Shell.FindFiles

Shell.Help

Shell.MinimizeAll

Shell.UndoMinimizeALL

Shell.RefreshMenu

Shell.SetTime

Shell.TrayProperties

Shell.ShutdownWindows

Shell.Suspend

oWindows = Shell.Windows /* 返回ShellWindows对象 */

fFolder = Shell.NameSpace /* 返回所打开的vDir的Folder对象 */

oFolder = Shell.BrowseForFolder /* 选择文件夹对话框 */

/*示例:

function BrowseFolder

{

var Message = "清选择文件夹";

var Shell= new ActiveXObject;

var Folder = Shell.BrowseForFolder;

if

{

Folder = Folder.items; // 返回 FolderItems 对象

Folder = Folder.item;// 返回 Folderitem 对象

Folder = Folder.Path;// 返回路径

if != "\\"){

Folder = varFolder + "\\";

}

return Folder;

}

}

*/

/*示例:

var Folder = Shell.NameSpace;// 返回 Folder对象

*/

3、使用 Folder 对象

[ oApplication = ] Folder.Application // Contains the Application object.

[ oParentFolder= ] Folder.ParentFolder // Contains the parent Folder object.

[oTitle= ] Folder.Title// Contains the title of the folder.

Folder.CopyHere // Copies an item or items to a folder.

Folder.MoveHere // Moves an item or items to this folder.

/*

vItem:Required. Specifies the item or items to move. This can be a string that represents a file name, a FolderItem object, or a FolderItems object.

vOptions Optional. Specifies options for the move operation. This value can be zero or a combination of the following values. These values are based upon flags defined for use with the fFlags member of the C++ SHFILEOPSTRUCT structure. These flags are not defined as such for Microsoft? Visual Basic?, Visual Basic Scripting Edition , or Microsoft JScript?, so you must define them yourself or use their numeric equivalents.

4Do not display a progress dialog box.

8Give the file being operated on a new name in a move, copy, or rename operation if a file with the target name already exists.

26Respond with "Yes to All" for any dialog box that is displayed.

64Preserve undo information, if possible.

228 Perform the operation on files only if a wildcard file name is specified.

256Display a progress dialog box but do not show the file names.

522Do not confirm the creation of a new directory if the operation requires one to be created.

2224 Do not display a user interface if an error occurs.

2248Version 4.72. Do not copy the security attributes of the file.

4296Only operate in the local directory. Don't operate recursively into subdirectories.

9282 Version 5.2. Do not move connected files as a group. Only move the specified files.

*/

Folder.NewFolder // Creates a new folder.

ppid = Folder.ParseName// Creates and returns a FolderItem object that represents a specified item.

/*

bName:Required. A string that specifies the name of the item.

*/

oFolderItems = Folder.Items// Retrieves a FolderItems object that represents the collection of items in the folder.

sDetail = Folder.GetDetailsOf// Retrieves details about an item in a folder. For example, its size, type, or the time of its last modification.

/*

vItem:Required. Specifies the item for which to retrieve the information. This must be a FolderItem object.

iColumn: Required. An Integer value that specifies the information to be retrieved. The

电动阀门

衬氟视盅

二位三通电磁阀

日标球阀

相关阅读