PureBytes Links
Trading Reference Links
|
Windows Scripting
VBScript (+ DOS/WIN Batch) and now...................ScriptIt all work together in the same
Windows environment. DOS Batch only will still call on a virtual machine in a separte
window (DOS box). All these ancient(batch) and modern(scripting) languages can
fluently be implemented and integrated, eg run from and from within, along or stand
alone in simple and complicated scripts, and will give user the automation and
progamming power not seen before, i.e. start a script, call on the other languge's script
and return back to the original, all done from and in one script.
But there is more.....................
==========================================================
ScriptIt from the Windows NT Server 4.0 | Deployment site:
--------------------------------------------------------------------------------------------
Note that the program also runs in Windows 9.x.
A tool for automating interactive software, software installations and system configuration tasks.
ScriptIt can be used to start a process, monitor the window titles of active processes,
and when appropriate, send a set of keystrokes to the correct window, to finish the process
and to close processes.
ScriptIt also has a sendkey notation that can send special key strokes to controls within windows.
This notation is similar to that used with the Microsoft Visual Basic® Sendkey command.
Note that all sendkey abbreviations are enclosed in braces ({}).
ScriptIt passes any title line value that begins with the ampersand (@) character to
the WinBatch Interpreter for evaluation. The return value of the WinBatch function is then passed
as keystrokes to the designated window.
Introduction
Microsoft® ScriptIt is a command-line utility for automating interactive software installations,
automating in general and system configuration tasks.
ScriptIt works by monitoring the window titles of active processes. When it finds a window with
which it should interact, it sends a set of keystrokes to that window.
ScriptIt uses the window title or a combination of the window title and text that appears on controls
within the window to identify the window that will receive the keystrokes.
The use of the window title combined with text allows ScriptIt to differentiate between multiple
windows that have the same title bar.
Important: Microsoft does not provide technical support for scripts prepared with the ScriptIt tool.
Consequently, it is important that you test your scripts thoroughly before using them in
a production environment.
Using ScriptIt
To use ScriptIt, you need the ScriptIt script processing engine, ScriptIt.exe, and a valid script file
as described in this document. To start the ScriptIt utility, type the following from the Run command:
SCRIPTIT script file
where script file is a text file in .ini file format.
This script file uses .ini file keys to identify the window titles that ScriptIt should interact with, and
specifies the keystrokes that ScriptIt sends to these windows as .ini file key values.
For example, the script file entries:
run=notepad.exe
Untitled - Notepad=Hello World
launch an instance of Notepad and then send the string "Hello World" to the open Microsoft Notepad
window with the title bar Untitled - Notepad.
Script File Format
The basic ScriptIt script file can have the following format and line types, eg the ini-format with sections:
[SCRIPT]
run=command
runwait=command
WindowTitle=keystrokes
WindowTitle<+text>=keystrokes
mkfile filename.ext=fileline
REM comment
[ADLIB]
WindowTitle=keystrokes
WindowTitle<+text>=keystrokes
Note that ScriptIt is not a traditional scripting language and does not offer many of the traditional
programming language constructs (such as if, then, else, while, gosub, and so forth). The remainder
of this paper describes the ScriptIt script file structure and variables, and provides sample code and
a few examples of valid script files.
The ScriptIt Utility (Downloadable Document)
http://www.microsoft.com/NTServer/nts/deployment/custguide/scriptit3.asp
Download ScriptIt.exe program and this helpdocument in Microsoft Word (.doc) format
(self-extracting zip file, 269K).
http://www.microsoft.com/ntserver/zipdocs/scriptit3.exe
--------------------------------------------------------------------------------
Last Updated: Saturday, December 19, 1998
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.
=============================================================
Find below a DL Convert script I have running here, and that includes some comments.
Compare these script's statements and commands to the White Paper Document
(i.e. the Help-file that can be downloaded), for reference sakes and as such Print out the
help-file, to get a better and easy understanding
(and as headstart use my Downloader/MetaStock example down below.
The shut-down/re-boot trick at the end, was already included in one of my other mails
to the List this weekend).
Regards,
Ton Maas
ms-irb@xxxxxxxxxxxxx
Dismiss the ".nospam" bit (including the dot) when replying.
======================================
Install the exe (eg just double click to unzip the self-extracting exezip file and create a link to the
ScriptIt.exe program and copy+paste the script (printed below) into Notepad and Save as test.txt.
For the link's properties use
C:\Windows\Scripting\SCRIPTIT.EXE test.txt
assuming you have named the script file test.txt and have stored it with the ScriptIt.exe program in
the Windows|Scripting folder on drive C:
Contents:
------------------------------------------------------------------------
[SCRIPT]
REM When this script is started, I go out to make myself a cup of coffee and when
REM finished (coffee+script), only to return to a fresh, new and clean desktop
run=c:\equis\dlwin\dlwin.exe
REM Pause
The DownLoader=
REM Tools
The DownLoader=!t
REM Convert
The DownLoader=o
REM Source type ASCI
Convert Securities=as
Convert Securities=!f
REM Source folder
Convert Securities=C:\My documents
Convert Securities=!n
Convert Securities=""Ms990423.txt""
REM Destination type MetaStock
Convert Securities=!y
Convert Securities=M
Convert Securities=!r
REM Destination folder
Convert Securities=C:\Temp\MsMAAS\
Convert Securities=~
Conversion Report=~
REM Pause
The DownLoader=
The DownLoader=~winclose
run=c:\equis\mswin\mswin.exe
MetaStock=
MetaStock=!f
MetaStock=o
Open=
Open={ESC}
MetaStock=~winclose
REM Shutdown & reboot
run="C:\Windows\RUNDLL.EXE user,exitwindowsexec"
REM end of script
======================================
|