Re: Instr - Sleep 10 - Instr - Sleep 10.....Abort
From: name (nospam_at_user.com)
Date: 04/12/04
- Next message: name: "Re: Quarantine Control Script"
- Previous message: Al Dunbar [MS-MVP]: "Re: CopyFolder logon script Windows 2003 Server"
- In reply to: Thilo Klein: "Instr - Sleep 10 - Instr - Sleep 10.....Abort"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 12 Apr 2004 02:42:34 -0400
You do a xmlHttp "HEAD" for the connection at all,
the expected content type, and the size of the file.
--- So does Internet Explorer with its download dialog. First checks the HEAD then if you say yes - continues. --- If it is ok with you, you would write it to a file -------- So does Internet Explorer with its cache. ------- >From there on it is as with any regex from any file on your PC. =============================== If you do not have the patience to think this through, you will have depleted memory, hanging processes, winsock timeouts, dying server (yours and theirs). And if you do not observe some "voluntary" restraint in between calls, "they" may retire your IP for some time, or put you on their "marketing" list. You are already working with the leanest and most versatile of MS OSes. "How to optimize the program ?" Don't kid youself. ============ Good luck "Thilo Klein" <Somewhere@somehow.de> wrote in message news:opr59penz4jrb10m@news.arcor-ip.de... > Hello, > i wrote a code for the WSH under W98 which does the same over and over > again until a change occurs: > > load webpage (via XMLHTTP) > search this webpage via instr > if the value of instr equals XY, read a string via mid starting from the > value instr returned and then return to start(load webpage..) > > Firstly, I didn“t use sleep in the loop which caused the code not to work: > Mid() returned a string being not at all in a range which should have been > returned by it. Might be zero. But: The string I searched for is available > on the page it downloaded. > > Then I used sleep after instr and I let the program wait for 400 ms - and > it worked - but that takes to long I think. > > How to optimize the program ? Is it owing to the downloading part, instr > itself, mid or is windows just not capable of handling such short > differences of time between several parts of the code ?
- Next message: name: "Re: Quarantine Control Script"
- Previous message: Al Dunbar [MS-MVP]: "Re: CopyFolder logon script Windows 2003 Server"
- In reply to: Thilo Klein: "Instr - Sleep 10 - Instr - Sleep 10.....Abort"
- Messages sorted by: [ date ] [ thread ]