Re: How to escape out of a loop

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Andy, I view this as one of the sad consequences of
wsh/vbs not having a visual interface (gui) other than
askboxes and msgboxes.

I suggest making yourself a gui by using (ugh, gross,
bloated) IE as a graphical interface. You can find
numerous examples of this by searching the archives.
Go to google => groups => advanced group search, and
look for: CreateObject("InternetExplorer.Application").

In particular, you might focus on status message /
progressbar (IE) dialogs. And finally, add a button
(call it: "Exit" or "Close Script") to your dialog.
And using "GetRef", hook the dialog back to your
script. That is, connect the button's "onClick"
event to a subroutine in your script, which will
include coding to terminate the script directly
(say, by using WScript.Quit)..

cheers, jw
____________________________________________________________

You got questions? WE GOT ANSWERS!!! ..(but,
no guarantee the answers will be applicable to the questions)



Andy Morton wrote:
Hi,
I have a vbscript that checks through large text files looking for this and that.
I loop through the lines using the Do while not EndOfTextStream() function.
Some of these files are huge.

Sometimes I realise that I need to stop the prog.
Is there a way I can programme combination of keys to escape from the loop ?
Some other method ?

Right now I'm crashing the process through the Ctrl + Alt + Del + Programme Manager. None too elegant, I must admit.

Could someone please paste an example ? Or point me to a link.

Thanks in advance.

Andy Morton.




.



Relevant Pages

  • Re: writing files that are copied to a log
    ... andy says... ... sFN & " was copied." ... Set oTF = oFSO.OpenTextFile ... '// create it in the directory the script is in. ...
    (microsoft.public.scripting.vbscript)
  • PHP Manpage lookup directory transversal / file disclosing
    ... It is powered by Andy. ... The script _class.manpagelookup.php_ was vulnerable to a directory ... transversal bug (because of leaks is input validation) that could lead ... The vulnerability has now been fixed by Andy. ...
    (Bugtraq)
  • Re: How to lockup linux ! But how to prevent this ?
    ... Andy Baxter wrote: ... >> I wrote a very shell simple script called test. ... This completely locks up the machine. ... Please don't send me html mail or un-notified attachments. ...
    (comp.os.linux.misc)
  • Re: How can I make a directory path a program call
    ... > get the output of the script rather than a real file. ... > andy. ... directory path with the hashing algorithm. ...
    (comp.os.linux.misc)
  • Re: XP is corrupting
    ... > Andy> easier just to type the flags for the options I ... > Andy> so you could build a script graphically, ... > Andy> just like any other interpreted scripting language. ... > There are many things about programming that you just can't expression ...
    (comp.os.linux.misc)