Đang chuẩn bị liên kết để tải về tài liệu:
Microsoft WSH and VBScript Programming for the Absolute Beginner Part 23

Đang chuẩn bị nút TẢI XUỐNG, xin hãy chờ

Microsoft WSH and VBScript Programming for the Absolute Beginner by Jerry Lee Ford Part 23. If you are new to programming with Microsoft WSH and VBScript and are looking for a solid introduction, this is the book for you. Developed by computer science professors, books in the for the absolute beginner series teach the principles of programming through simple game creation. You will acquire the skills that you need for more practical WSH and VBScript programming applications and will learn how these skills can be put to use in real-world scenarios. Best of all, by the time you finish this book,. | Microsoft WSH and VBScript Programming for the Absolute Beginner Second Edition Set objNewShortcut objWshShl.CreateShortcut strAppDataPath _ GuessANumber.lnk objNewShortcut.TargetPath C GuessANumber.vbs objNewShortcut.Save What makes working with the Quick Launch toolbar different than working with other Windows special folders is that you must specify the location of the Quick Launch toolbar within the special folder AppData that contains it. Figure 6.17 shows how the Quick Launch toolbar appears once the shortcut of your VBScript game has been added to it. Figure 6.17 Examining the Windows Quick Launch toolbar after adding a shortcut to the GuessA Number.vbs game. Guess a Number A Complete Shortcut Script Now let s put together some of the shortcut examples you worked on previously to make a new script that creates shortcuts for GuessANumber.vbs on the Windows desktop Programs menu and Quick Launch toolbar. Script Name ShortcutMaker.vbs Author Jerry Ford Created 11 28 02 Description This script creates shortcuts for the GuessANumber.vbs VBScript on the Windows desktop Programs menu Quick Launch Toolbar. Initialization Section Option Explicit Dim objWshShl strTargetFolder objDesktopShortcut objProgramsShortcut Dim strAppDataPath objQuickLaunchShortcut Chapter 6 Processing Collections of Data Establish an instance of the WshShell object Set objWshShl WScript.CreateObject WScript.Shell Create the Desktop shortcut strTargetFolder objWshShl.SpecialFolders Desktop Set objDesktopShortcut objWshShl.CreateShortcut strTargetFolder GuessANumber.lnk objDesktopShortcut.TargetPath C GuessANumber.vbs objDesktopShortcut.Description Guess a Number Game objDesktopShortcut.Hotkey CTRL Alt G objDesktopShortcut.Save Create the Programs menu shortcut strTargetFolder objWshShl.SpecialFolders Programs Set objProgramsShortcut objWshShl.CreateShortcut strTargetFolder GuessANumber.lnk objProgramsShortcut.TargetPath c GuessANumber.vbs objProgramsShortcut.Save Create the Quick Launch Toolbar