SendKeys Driving Me nuts !

G

grumtac

Ok,
Well, there were a few Sendkeys statements in an Access database that I
work on, and as everyone in the whole world knows, it raises havoc with
the stupid Numlock key.

First off, this development is one that is sold by a company who makes
the database for an accounting/inventory system. For the mostpart, it
has been fabulous in that WE can get things in it that no other program
allows, but why in the world would tey build it with SendKeys
statements to begin with when the numlock issue had been reported for
so many years back ?

We really did not have much for troubles on any Win98 machines, but the
Win2k and XP boxes are a real pain.

This rascal has a LOT of Sendkeys repair work that would have to be
done, but in the mean time, I wondered about the following......

Where in Windows is some master tweak to lock the numlock state on in
the OS ? I see OS/2 users have accomplished that, and also references
to Linux users doing the same. I can't find anything in this regard for
windows, even though MS sure has recognized this bug in numerous Access
releases.

So next, I hunt for a simple keyboard that IGNORES the numlock status
and just types numbers no matter what. Simple... Effective.... That
would temporarily solve my problem.

In that the number keys directly above the Alpha keys always seem to
type numbers no matter what, I would think somebody would be able to
make such a keyboard but I can not find it, at least not yet.

Anyone have any ideas ? This shouldn't be rocket science, should it ?

Thanks,
Grummy
 
N

Nikos Yannacopoulos

Grummy,
there were a few Sendkeys statements in an Access database that I
work on, and as everyone in the whole world knows, it raises havoc with
the stupid Numlock key.
It's SendKeys that's stupid, not the NumLock key!

this development is one that is sold by a company ....
why in the world would they build it with SendKeys statements
Some developers indeed! I'm surprised they were able to sell it at all.

Where in Windows is some master tweak to lock the numlock state on in
the OS ?
Not sure there is such a thing, but you'd be better off asking this
question in a Win2K/WinXP newsgroup.


Mind you, the SendKeys problems can get a lot worse than just setting
off NumLock, and I'm really surprised it's been widely used in a
commercial product without any other repercussions. The standard lecture
goes something like:

You should avoid SendKeys at any cost, if at all possible! SendKeys is
notorious for doing one thing when you expected it to do another, and
sometimes you realize when it's too late... that's because it doesn't
have the ability to understand what it was supposed to do and check if
that's what it's acually doing, it just keeps on sending the key
sequence instead! Whatever you might use it for can be done in a much
more efficiemt and robust way.
(yes, I just copied from a previous answer!)

In a nutshell, the only cure is to get rid of SendKeys altogether, using
proper automation with Macros or (preferably) code. If you have specific
questions while at it, I'm sure you'll get good help here.

Regards,
Nikos
 
G

grumtac

Nikos Yannacopoulos wrote:
(snip)
If you have specific
questions while at it, I'm sure you'll get good help here.

Thanks Nikos, I was "venting" a little. I do have a more specific
question, and that is this....

Does the use of a sendkeys statement earlier in the program use
actually "Start" the sequence of problems ?

I have a switchboard that likely has a few sendkeys statements. From
there, I can open up the Sales Order form. (Sales Order is where the
sendkeys statement is most troublesome). Shall I assume that because
the switchboard has them, all subsequently launched forms will be
affected EVEN IF they are cleansed of SendKeys Statements ?

I am looking for a good place to start. I would love to just get the
Sales Order Forms to work. It seems that it has more trouble than any
other set of forms.

Thanks,
Grummy
 
N

Nikos Yannacopoulos

Does the use of a sendkeys statement earlier in the program use
actually "Start" the sequence of problems ?
Hard to say, yet unlikely. I would expect that whatever problem caused,
should be made evident at the time the SendKeys executes... unless of
course it changes some setting that remains changed and affects
something during a later operation.

I have a switchboard that likely has a few sendkeys statements. From
there, I can open up the Sales Order form. (Sales Order is where the
sendkeys statement is most troublesome). Shall I assume that because
the switchboard has them, all subsequently launched forms will be
affected EVEN IF they are cleansed of SendKeys Statements ?
Probably not.

I am looking for a good place to start. I would love to just get the
Sales Order Forms to work. It seems that it has more trouble than any
other set of forms.
I would start where I get the most problems. post back if you need
specific help.

Nikos
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top