咖喱碗糕`

`∧ ∧︵
ミ^ō^ミ灬)~ ~我是只可爱的狐狸```
http://freedom2130.cnblogs.com
  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

Wscript.Shell对象详细介绍!!(4)

Posted on 2005-11-25 20:07  刹那间我存在  阅读(416)  评论(0编辑  收藏  举报
      "Back" | "Tab" | "Clear" | "Return" |
                               "Escape" | "Space" | "Prior" | ...

                所有键的名称都可以在 WINUSER.H 中找到。热键不区分大小写。

                热键只能激活位于 Windows 桌面或 Windows“开始”菜单的快捷方式。

                Windows 资源管理器不接受 ESC、ENTER、TAB、SPACE、PRINT SCREEN 或 BACKSPACE,即使 WshShortcut.Hotkey 遵循 Win32 API 支持它们。因此,建议在快捷方式中不要用这些键。

                示例
                Set WshShell = Wscript.CreateObject("Wscript.WshShell")
                strDesktop = WshShell.SpecialFolders("Desktop")
                Set oMyShortcut = WshShell.CreateShortcut(strDesktop & "\a_key.lnk")
                OMyShortcut.TargetPath = "%windir%\notepad.exe"
                oMyShortCut.Hotkey = "ALT+CTRL+F"
                oMyShortCut.Save
                Wscript.Echo oMyShortCut.HotKey = "Alt+Ctrl+F"

                请参阅
                WshSpecialFolders 对象

                WshShortcut.IconLocation
                IconLocation 属性提供快捷方式对象的图标位置。图标位置的格式应为 "Path,index"。

                语法
                WshShortcut.IconLocation = strIconLocation

                WshShortcut.TargetPath
                TargetPath 属性提供快捷方式对象的目标路径。

                语法
                WshShortcut.TargetPath = strTargetPath

                WshShortcut.WindowStyle
                WindowStyle 属性提供快捷方式对象的窗口样式。

                语法
                WshShortcut.WindowStyle = natWindowStyle

                WshShortcut.WorkingDirectory
                WorkingDirectory 为一个快捷方式对象提供工作目录。

                语法
                WshShortcut.WorkingDirectory = strWorkingDirectory

                WshShortcut.Save
                Save 方法把快捷方式对象保存到由 FullName 属性指定的位置。

                语法
                WshShortcut.Save

        WshUrlShortcut 对象
        该对象未直接给出。要获取 WshUrlShortcut 对象,可使用 WshShell.CreateShortcut 方法。

        ProgID N/A
        文件名 WSHom.Ocx
        CLSID  
        IID  


        下表说明了和 WshUrlShortcut 对象有关的属性。

        属性 说明
        FullName URL 快捷方式对象的完整路径。
        TargetPath URL 快捷方式对象的目标路径。


      &nbs