[WEB4LIB] WinBatch
Chris Gray
cpgray at library.uwaterloo.ca
Thu Nov 11 00:01:43 EST 1999
My experience with WinBatch is that it tends to get ahead of itself. You
tell it to open a window and then send keystrokes to the window and it
gives you an error message that the window doesn't exist because it tried
to send the keystrokes before the window has had a chance to open. As a
result my batch files tend to be peppered with loops like the following:
while !winexist("Notepad")
timedelay(1)
endwhile
So that it doesn't go on to the next instruction until the window titled
"Notepad" exists. You might need a similar loop to ensure that all IE
windows have fully closed before issuing the logoff command.
Also I'd be more inclined to use the standard user methods of closing IE,
such as:
sendmenusto("~Internet Explorer", "File Close")
or
sendkeysto("~Internet Explorer", "!{F4}")
Chris Gray
Library Systems
University of Waterloo
On Wed, 10 Nov 1999, Jane Frasier wrote:
> WinBatch+Compiler is a program that you can use to write little script
> files. I am using this to customize some things for our public access
> Internet computers. I have IE 5 setup in the startup folder so it is opened
> when Windows (98) starts. I have written a winbatch file that logoffs the
> user and when Windows restarts I end up with 2 IE sessions. If there were 2
> open IE windows, I get 3. I am using the IntControl (66,0,0,0,0) command
> and have also used EndSession.
>
> What I want is a way to close ALL IE windows and start over. Anyone have
> any ideas?
>
> J Frasier
> Software Support Specialist
>
More information about the Web4lib
mailing list