Sorry,
It is using Acuterm, which is just a telnet terminal emulator that allows VBA scripts. There is a login prompt programmed into the server that asks for "login:" and "password"
The first "login:" and "password:" is the same for everyone in the company, and is used on the sales floor to ensure only employees can get in (they then enter an associate ID and associate password, but that part is no big deal). For PC users using Acuterm, there is no point in having the first login prompt, so we are writing scripts to automate that login... ie... wait for the prompt login: put in such and such, carriage return, line feed, wait for password, etc. The problem is that the system kicks you out after a while, and returns you to the first login prompt with "login:" It does this after 10 minutes of inactivity (so the actual time it takes will vary depending on the users usage.. IE, if the user just logs in and does nothing, it will only be 10 minutes, but if they are doing things for 10 minutes, then are idle for 10 minutes, it will take 20 for "login:" to return. I think you get the idea) On a PC, when "login" returns, I want the script waiting for it to automatically go through the login sequence again.
It works in an infinite loop very well, except for the fact that it eats up all the CPU cycles
If WaitFor just had an infinite argument that put the thread to sleep until "login:" retuned, that would be perfect, but so far I've only been able to get it to wait up to 9999 milliseconds, which is not long enough.
Thanks all.