473,395 Members | 1,706 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

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 1526

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: lestersal | last post by:
Hi, We have a Java app at work (running on Windows 2000) and I'm trying to use SendKeys in Microsoft Access VBA to get it to do a Ctrl-PgDn. The Java app is respoding to a single key. For...
0
by: lestersal | last post by:
Hi, We have a Java app at work (running on Windows 2000) and I'm trying to use SendKeys in Microsoft Access VBA to get it to do a Ctrl-PgDn. The Java app is respoding to a single key. For...
2
by: RBohannon | last post by:
I need to create a report in MS Word populated with data from A2K. I have been asked to create the report in Word so that parts of it can be edited as necessary later. The data in the report are...
2
by: David Kanter | last post by:
Hi, I am relatively inexperienced with VB.Net, but I am familiar with many concepts from programming; I have some basic level of competence with C/C++ and Perl, but I just started using VB this...
2
by: Phil Galey | last post by:
I have an application written in VB.NET, running on Windows 2000 SP 3. It uses a process object and AppActivate, followed by SendKeys commands, to control a running QuarkXPress application. On...
0
by: a.theil | last post by:
Hello! First, I´m greenhorn to vb.net. I do - proIDKernel = Shell(txtKommandozeile, vbMinimizedFocus) AppActivate(proIDKernel) SendKeys.SendWait(strK) SendKeys.SendWait("{ENTER}")
1
by: Max | last post by:
Hi, I am trying to paste text in a console window using SendKeys and the Clipboard (I am using Windows XP SP2 and .NET 1.1). Here is the code (I have a form with two edit boxes, DosTitle in...
3
by: Phil Galey | last post by:
I have a VB.NET application that uses SendKeys to close the open document in QuarkXPress 5.0 I'm using the following commands: AppActivate(QXP_Process_ID) SendKeys.SendWait("^{F4}") in an...
0
by: dtshedd | last post by:
I have a database with hundreds of embedded photos (Microsoft Photo 3.0) Many are larger than 1 MB. I tried Stephen Lebans macro but it did not work probably for the aforementioned reasons Now...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.