Đang chuẩn bị liên kết để tải về tài liệu:
sams teach Yourself windows Script Host in 21 Days phần 4
Đang chuẩn bị nút TẢI XUỐNG, xin hãy chờ
Tải xuống
The Loop Do thực hiện một tuyên bố liên tục cho đến khi một điều kiện là đúng sự thật hoặc trong khi một điều kiện là đúng sự thật. Các Trong khi hoặc Cho đến khi điều kiện có thể được thiết lập với việc làm hoặc lệnh vòng, nhưng bạn thường nhìn thấy nó được sử dụng kết hợp với lệnh | SimpoPDFlMergenandSplit UnregistereddVersion -e-ittp www.simpopdf.com Now it s time to discuss the reason you re involved with the AT command the task you want to schedule. One way to schedule these scripts is to embed them in a .bat or .cmd file and schedule the batch file with AT. The command portion of AT can exist with or without surrounding quotation marks. I prefer to include surrounding quotes to avoid any possible problems. As an example I have slightly modified the dir.vbs script that comes with the WSH distribution. For those of you who have not yet used it the script simply reads the contents of the C TEMP directory on your computer and displays the results in a series of dialog boxes one dialog box per file found . Rather than have the script display several dialog boxes each containing a filename I used the wscript.echo command to display the output at the console. The modified script looks like this Set WSHShell WScript.CreateObject WScript.Shell Set objFileSystem Wscript.CreateObject Scripting.FileSystemObject Set objFolder objFileSystem.GetFolder C temp Set colFiles objFolder.Files For Each FileObj in colFiles strFileName FileObj.Name wscript.echo strFileName Next Using this modified script you will create a batch file that contains the necessary command to invoke the script and log the contents to a text file. In this example the text file is named C DIR.TXT. If you haven t done so already move the modified DIR.VBS file to the root of your C drive. You can store the script file anywhere the location I specified is used simply to make this example easier. Now you create the batch file that will run the script. Using a simple text editor such as Notepad create a document that contains the following command C WINNT SYSETM32 CSCRIPT.EXE C DIR.VBS C DIR.TXT Save the document in the root of your C drive and name it DIR.BAT. Let me dissect the command that is contained in the batch file. The first part of the command C WINNT SYSTEM3 2 CSCRIPT.EXE .