468,321 Members | 1,953 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,321 developers. It's quick & easy.

SendKeys / AppActivate Error

Hello:
I have written a very simple vb program (using the new .net interface).
I have a website to which I must upload many files. The filenames are
incremented in such a way that a simple for loop is able to generate
the filenames.
The program itself consists of:
Sub Webpagebuilder()
AppActivate (the IE browser window that I want to interface with)
For i = 1 to 500
'builds the filename here
SendKeys.SendWait("{TAB}")
SendKeys.SendWait("{TAB}")
SendKeys.SendWait(filename)
Next i
Application.exit()
End Sub
The problem is this. The program runs just fine for, about 250
iterations. Sometimes as high as 450, sometimes as low as 150 (these
are all rough numbers). Then it gets out-of-sync with itself in such a
way that it is as if the program skipped one of the tabs.
My question is two-fold: 1) Since I have read that sendkeys is
semi-unreliable, is there a better way to accomplish what I want? 2)
What would be causing otherwise good code to start misbehaving? My
computer fan starts blowing out a lot of air near the time of failure.
I appreciate any help you can provide.
Austin

Nov 21 '05 #1
0 1357

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by lestersal | last post: by
reply views Thread by lestersal | last post: by
2 posts views Thread by Phil Galey | last post: by
reply views Thread by a.theil | last post: by
3 posts views Thread by Phil Galey | last post: by
reply views Thread by NPC403 | last post: by
1 post views Thread by howard w | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.