lowbot Posted July 26, 2007 Share Posted July 26, 2007 (edited) I've written a little script that opens IE7 and makes it visit a different webpage. The odd thing is that when it performs the send() it actually makes typos! I'm sending the text "http://www.yahoo.com" Every, say, 1 in 5 runs of this script causes the script to mess up the send(). It might send just "p://www.yahoo.com" or "http://www.ahoo.com" What could be causing this? How can I fix this? Thanks. CODErun("C:\Program Files\Internet Explorer\IEXPLORE.EXE") WinWaitActive("Google News - Windows Internet Explorer") Controlclick("Google News - Windows Internet Explorer", "" , "Edit1") Send("http://www.yahoo.com{Enter}") Edited July 26, 2007 by lowbot Link to comment Share on other sites More sharing options...
mrbond007 Posted July 26, 2007 Share Posted July 26, 2007 (edited) Maybe because the page isn't fully loaded probably because of the ads. You might consider putting Sleep in your code. Edited July 26, 2007 by mrbond007 Projects : Space Regain - Memory Fusion - PWGT - Chip-ITGames : BrainPain - BrainPain Director's Cut - ProSpeed Games Pack (New)Vista vs XP : the forbidden fight Link to comment Share on other sites More sharing options...
ashley Posted July 26, 2007 Share Posted July 26, 2007 this seams to work for me... run("C:\Program Files\Internet Explorer\IEXPLORE.EXE") WinWaitActive("Google News - Windows Internet Explorer") Sleep(5500) Controlclick("Google News - Windows Internet Explorer", "" , "Edit1") Send("http://www.yahoo.com{Enter}") Free icons for your programs Link to comment Share on other sites More sharing options...
Paulie Posted July 26, 2007 Share Posted July 26, 2007 The _IE* UDFs might help you out. #Include<IE.au3> _IECreate("www.yahoo.com") Link to comment Share on other sites More sharing options...
lowbot Posted July 26, 2007 Author Share Posted July 26, 2007 Thats guys. Adding the sleep to the script did the trick. The browser was just too busy rendering to take in all the text. Is there a function that will type in text slower? Say I wanted to type at the speed a human would type. Link to comment Share on other sites More sharing options...
qazwsx Posted July 26, 2007 Share Posted July 26, 2007 yeh the opt sendkeydelay. Alters the the length of the brief pause in between sent keystrokes. Time in milliseconds to pause (default=5). Sometimes a value of 0 does not work; use 1 instead. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now