Num Lock turned off when using SendKeys

  • Follow


Code is:

AppActivate "MYOB Accounting", True
Call DelaySeconds(0.5)
SendKeys "{TAB}", True

It's definately the SendKeys that turns the Num Lock off.
-- 
Regards
Tom
0
Reply Utf 1/4/2010 3:03:01 AM

On Sun, 3 Jan 2010 19:03:01 -0800, ThomasAJ
<ThomasAJ@discussions.microsoft.com> wrote:

>Code is:
>
>AppActivate "MYOB Accounting", True
>Call DelaySeconds(0.5)
>SendKeys "{TAB}", True
>
>It's definately the SendKeys that turns the Num Lock off.

Yep. This is one of many, many reasons to avoid SendKeys if at all possible.

I don't know if MYOB supports automation, but if it does, use it. 

Note that A2007 has, if I understand aright, removed SendKeys altogether.

-- 

             John W. Vinson [MVP]
0
Reply John 1/4/2010 3:10:17 AM


And as far as my testing goes my Vista machine disables it and I'm sure it 
will be that way for Windows 7.

-- 
Gina Whipp
2010 Microsoft MVP (Access)

"I feel I have been denied critical, need to know, information!" - Tremors 
II

http://www.regina-whipp.com/index_files/TipList.htm

"John W. Vinson" <jvinson@STOP_SPAM.WysardOfInfo.com> wrote in message 
news:jtm2k5dqm02hi1v71oamtsr5v2611caapp@4ax.com...
> On Sun, 3 Jan 2010 19:03:01 -0800, ThomasAJ
> <ThomasAJ@discussions.microsoft.com> wrote:
>
>>Code is:
>>
>>AppActivate "MYOB Accounting", True
>>Call DelaySeconds(0.5)
>>SendKeys "{TAB}", True
>>
>>It's definately the SendKeys that turns the Num Lock off.
>
> Yep. This is one of many, many reasons to avoid SendKeys if at all 
> possible.
>
> I don't know if MYOB supports automation, but if it does, use it.
>
> Note that A2007 has, if I understand aright, removed SendKeys altogether.
>
> -- 
>
>             John W. Vinson [MVP] 


0
Reply Gina 1/4/2010 3:15:22 AM

What a shame Sendkeys has such problems - is it asking MS too much to fix the 
problem rather than just can it?

It is invaluable to me:

eg I have to pay someone for work done for company.
I need to update 3 different apps.
1 Mine, 2 Banking payment (actual payment), 3 MYOB.

Without Sendkeys I need to very very carefully make sure I enter the correct 
info into all 3. With send keys I have do not have any such worry.

It's ACCURATE and FAST and SIMPLE TO PROGRAM

I LOVE SENDKEYS

-- 
Regards
Tom


"Gina Whipp" wrote:

> And as far as my testing goes my Vista machine disables it and I'm sure it 
> will be that way for Windows 7.
> 
> -- 
> Gina Whipp
> 2010 Microsoft MVP (Access)
> 
> "I feel I have been denied critical, need to know, information!" - Tremors 
> II
> 
> http://www.regina-whipp.com/index_files/TipList.htm
> 
> "John W. Vinson" <jvinson@STOP_SPAM.WysardOfInfo.com> wrote in message 
> news:jtm2k5dqm02hi1v71oamtsr5v2611caapp@4ax.com...
> > On Sun, 3 Jan 2010 19:03:01 -0800, ThomasAJ
> > <ThomasAJ@discussions.microsoft.com> wrote:
> >
> >>Code is:
> >>
> >>AppActivate "MYOB Accounting", True
> >>Call DelaySeconds(0.5)
> >>SendKeys "{TAB}", True
> >>
> >>It's definately the SendKeys that turns the Num Lock off.
> >
> > Yep. This is one of many, many reasons to avoid SendKeys if at all 
> > possible.
> >
> > I don't know if MYOB supports automation, but if it does, use it.
> >
> > Note that A2007 has, if I understand aright, removed SendKeys altogether.
> >
> > -- 
> >
> >             John W. Vinson [MVP] 
> 
> 
> .
> 
0
Reply Utf 1/4/2010 7:08:01 AM

If I understand the issue correctly, SendKeys literally just sends 
keystrokes to the active window. Access cannot determine if the application 
in the active window is in a state to receive the keystrokes - like typing 
keystrokes on your keyboard, but with the monitor off. Its not a scenario 
that MS has control over as every software company out there would have to 
build into their application code that confirms the application state.

I would suggest that you're love of SendKeys is only because you're in the 
very small minority of persons that's never had adverse problems with it. In 
short, you've gotten lucky, but statistically you're headed for a train 
wreck.

MS, and many other application developers, do provide a viable means for 
working with an application from within another - Automation. It is simply 
the ability to access the Object Model of one application from within 
another. You've most likely seen posts and code wherein one Office 
application uses another to perform an action - such as Access automating 
Outlook to generate an email or Outlook reaching out to Access to get 
information from a .mdb file for use in an email.

"ThomasAJ" <ThomasAJ@discussions.microsoft.com> wrote in message 
news:754E50ED-9B0D-4D1E-9C47-FBEE537207B2@microsoft.com...
> What a shame Sendkeys has such problems - is it asking MS too much to fix 
> the
> problem rather than just can it?
>
> It is invaluable to me:
>
> eg I have to pay someone for work done for company.
> I need to update 3 different apps.
> 1 Mine, 2 Banking payment (actual payment), 3 MYOB.
>
> Without Sendkeys I need to very very carefully make sure I enter the 
> correct
> info into all 3. With send keys I have do not have any such worry.
>
> It's ACCURATE and FAST and SIMPLE TO PROGRAM
>
> I LOVE SENDKEYS
>
> -- 
> Regards
> Tom
>
>
> "Gina Whipp" wrote:
>
>> And as far as my testing goes my Vista machine disables it and I'm sure 
>> it
>> will be that way for Windows 7.
>>
>> -- 
>> Gina Whipp
>> 2010 Microsoft MVP (Access)
>>
>> "I feel I have been denied critical, need to know, information!" - 
>> Tremors
>> II
>>
>> http://www.regina-whipp.com/index_files/TipList.htm
>>
>> "John W. Vinson" <jvinson@STOP_SPAM.WysardOfInfo.com> wrote in message
>> news:jtm2k5dqm02hi1v71oamtsr5v2611caapp@4ax.com...
>> > On Sun, 3 Jan 2010 19:03:01 -0800, ThomasAJ
>> > <ThomasAJ@discussions.microsoft.com> wrote:
>> >
>> >>Code is:
>> >>
>> >>AppActivate "MYOB Accounting", True
>> >>Call DelaySeconds(0.5)
>> >>SendKeys "{TAB}", True
>> >>
>> >>It's definately the SendKeys that turns the Num Lock off.
>> >
>> > Yep. This is one of many, many reasons to avoid SendKeys if at all
>> > possible.
>> >
>> > I don't know if MYOB supports automation, but if it does, use it.
>> >
>> > Note that A2007 has, if I understand aright, removed SendKeys 
>> > altogether.
>> >
>> > -- 
>> >
>> >             John W. Vinson [MVP]
>>
>>
>> .
>> 


0
Reply David 1/4/2010 1:30:41 PM

It's actually even worse than v2007 not  recognizing SendKeys, from a number
of posts I've read! Apparently it sometimes ***does*** and sometimes
***doesn't*** recognize them!

-- 
There's ALWAYS more than one way to skin a cat!

Answers/posts based on Access 2000/2003

Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/Forums.aspx/access-modules/201001/1

0
Reply Linq 1/4/2010 4:12:28 PM

Precisely, which is why I think that the original poster is in the very rare 
minority that hasn't had problems with it.

"Linq Adams via AccessMonster.com" <u28780@uwe> wrote in message 
news:a19d2eafd9f13@uwe...
> It's actually even worse than v2007 not  recognizing SendKeys, from a 
> number
> of posts I've read! Apparently it sometimes ***does*** and sometimes
> ***doesn't*** recognize them!
>
> -- 
> There's ALWAYS more than one way to skin a cat!
>
> Answers/posts based on Access 2000/2003
>
> Message posted via AccessMonster.com
> http://www.accessmonster.com/Uwe/Forums.aspx/access-modules/201001/1
> 


0
Reply David 1/4/2010 9:32:09 PM

As stated in some other responses, SendKeys is not really
recommended, but if you can't find any other alternative
here is a link to a replacement module for SendKeys which may at
least help solve your NumLock problem. The other drawbacks
to SendKeys still apply however.

http://www.mvps.org/access/api/api0046.htm
-- 
_________

Sean Bailey


"ThomasAJ" wrote:

> What a shame Sendkeys has such problems - is it asking MS too much to fix the 
> problem rather than just can it?
> 
> It is invaluable to me:
> 
> eg I have to pay someone for work done for company.
> I need to update 3 different apps.
> 1 Mine, 2 Banking payment (actual payment), 3 MYOB.
> 
> Without Sendkeys I need to very very carefully make sure I enter the correct 
> info into all 3. With send keys I have do not have any such worry.
> 
> It's ACCURATE and FAST and SIMPLE TO PROGRAM
> 
> I LOVE SENDKEYS
> 
> -- 
> Regards
> Tom
> 
> 
> "Gina Whipp" wrote:
> 
> > And as far as my testing goes my Vista machine disables it and I'm sure it 
> > will be that way for Windows 7.
> > 
> > -- 
> > Gina Whipp
> > 2010 Microsoft MVP (Access)
> > 
> > "I feel I have been denied critical, need to know, information!" - Tremors 
> > II
> > 
> > http://www.regina-whipp.com/index_files/TipList.htm
> > 
> > "John W. Vinson" <jvinson@STOP_SPAM.WysardOfInfo.com> wrote in message 
> > news:jtm2k5dqm02hi1v71oamtsr5v2611caapp@4ax.com...
> > > On Sun, 3 Jan 2010 19:03:01 -0800, ThomasAJ
> > > <ThomasAJ@discussions.microsoft.com> wrote:
> > >
> > >>Code is:
> > >>
> > >>AppActivate "MYOB Accounting", True
> > >>Call DelaySeconds(0.5)
> > >>SendKeys "{TAB}", True
> > >>
> > >>It's definately the SendKeys that turns the Num Lock off.
> > >
> > > Yep. This is one of many, many reasons to avoid SendKeys if at all 
> > > possible.
> > >
> > > I don't know if MYOB supports automation, but if it does, use it.
> > >
> > > Note that A2007 has, if I understand aright, removed SendKeys altogether.
> > >
> > > -- 
> > >
> > >             John W. Vinson [MVP] 
> > 
> > 
> > .
> > 
0
Reply Utf 1/4/2010 10:11:02 PM

I liked the disclaimer that SendKeys could result in your hard drive being 
reformated. The greater the number of variables in a system, the higher the 
probablity of catastrophic failure.

"Beetle" <Beetle@discussions.microsoft.com> wrote in message 
news:F207290E-F584-4AF6-BE4A-052A55B48BF3@microsoft.com...
> As stated in some other responses, SendKeys is not really
> recommended, but if you can't find any other alternative
> here is a link to a replacement module for SendKeys which may at
> least help solve your NumLock problem. The other drawbacks
> to SendKeys still apply however.
>
> http://www.mvps.org/access/api/api0046.htm
> -- 
> _________
>
> Sean Bailey
>
>
> "ThomasAJ" wrote:
>
>> What a shame Sendkeys has such problems - is it asking MS too much to fix 
>> the
>> problem rather than just can it?
>>
>> It is invaluable to me:
>>
>> eg I have to pay someone for work done for company.
>> I need to update 3 different apps.
>> 1 Mine, 2 Banking payment (actual payment), 3 MYOB.
>>
>> Without Sendkeys I need to very very carefully make sure I enter the 
>> correct
>> info into all 3. With send keys I have do not have any such worry.
>>
>> It's ACCURATE and FAST and SIMPLE TO PROGRAM
>>
>> I LOVE SENDKEYS
>>
>> -- 
>> Regards
>> Tom
>>
>>
>> "Gina Whipp" wrote:
>>
>> > And as far as my testing goes my Vista machine disables it and I'm sure 
>> > it
>> > will be that way for Windows 7.
>> >
>> > -- 
>> > Gina Whipp
>> > 2010 Microsoft MVP (Access)
>> >
>> > "I feel I have been denied critical, need to know, information!" - 
>> > Tremors
>> > II
>> >
>> > http://www.regina-whipp.com/index_files/TipList.htm
>> >
>> > "John W. Vinson" <jvinson@STOP_SPAM.WysardOfInfo.com> wrote in message
>> > news:jtm2k5dqm02hi1v71oamtsr5v2611caapp@4ax.com...
>> > > On Sun, 3 Jan 2010 19:03:01 -0800, ThomasAJ
>> > > <ThomasAJ@discussions.microsoft.com> wrote:
>> > >
>> > >>Code is:
>> > >>
>> > >>AppActivate "MYOB Accounting", True
>> > >>Call DelaySeconds(0.5)
>> > >>SendKeys "{TAB}", True
>> > >>
>> > >>It's definately the SendKeys that turns the Num Lock off.
>> > >
>> > > Yep. This is one of many, many reasons to avoid SendKeys if at all
>> > > possible.
>> > >
>> > > I don't know if MYOB supports automation, but if it does, use it.
>> > >
>> > > Note that A2007 has, if I understand aright, removed SendKeys 
>> > > altogether.
>> > >
>> > > -- 
>> > >
>> > >             John W. Vinson [MVP]
>> >
>> >
>> > .
>> > 


0
Reply David 1/4/2010 11:36:22 PM

I have used it for 5 years now.

At the beginning of each lot of sendkeys (say banking - yes banking - and of 
couse I check the $s etc - not once has it been wrong) a message pops of 
reminding to put the focus on a particular field - when done I press OK. 
Sendkeys fills out the form.

I have used it many 1000s of times and no problem. I put a delay of about 
half a sec between sends and no problem.

I use automation for emails in Outlook - cannot be done for other apps like 
say banking.

-- 
Regards
Tom


"ThomasAJ" wrote:

> Code is:
> 
> AppActivate "MYOB Accounting", True
> Call DelaySeconds(0.5)
> SendKeys "{TAB}", True
> 
> It's definately the SendKeys that turns the Num Lock off.
> -- 
> Regards
> Tom
0
Reply Utf 1/5/2010 12:45:01 AM

oh I forgot - would I let one of my staff use it the way I do - probably not 
- maybe 1.

There that'll make you happy :)

-- 
Regards
Tom


"ThomasAJ" wrote:

> I have used it for 5 years now.
> 
> At the beginning of each lot of sendkeys (say banking - yes banking - and of 
> couse I check the $s etc - not once has it been wrong) a message pops of 
> reminding to put the focus on a particular field - when done I press OK. 
> Sendkeys fills out the form.
> 
> I have used it many 1000s of times and no problem. I put a delay of about 
> half a sec between sends and no problem.
> 
> I use automation for emails in Outlook - cannot be done for other apps like 
> say banking.
> 
> -- 
> Regards
> Tom
> 
> 
> "ThomasAJ" wrote:
> 
> > Code is:
> > 
> > AppActivate "MYOB Accounting", True
> > Call DelaySeconds(0.5)
> > SendKeys "{TAB}", True
> > 
> > It's definately the SendKeys that turns the Num Lock off.
> > -- 
> > Regards
> > Tom
0
Reply Utf 1/5/2010 12:51:01 AM

Thanks

-- 
Regards
Tom


"Beetle" wrote:

> As stated in some other responses, SendKeys is not really
> recommended, but if you can't find any other alternative
> here is a link to a replacement module for SendKeys which may at
> least help solve your NumLock problem. The other drawbacks
> to SendKeys still apply however.
> 
> http://www.mvps.org/access/api/api0046.htm
> -- 
> _________
> 
> Sean Bailey
> 
> 
> "ThomasAJ" wrote:
> 
> > What a shame Sendkeys has such problems - is it asking MS too much to fix the 
> > problem rather than just can it?
> > 
> > It is invaluable to me:
> > 
> > eg I have to pay someone for work done for company.
> > I need to update 3 different apps.
> > 1 Mine, 2 Banking payment (actual payment), 3 MYOB.
> > 
> > Without Sendkeys I need to very very carefully make sure I enter the correct 
> > info into all 3. With send keys I have do not have any such worry.
> > 
> > It's ACCURATE and FAST and SIMPLE TO PROGRAM
> > 
> > I LOVE SENDKEYS
> > 
> > -- 
> > Regards
> > Tom
> > 
> > 
> > "Gina Whipp" wrote:
> > 
> > > And as far as my testing goes my Vista machine disables it and I'm sure it 
> > > will be that way for Windows 7.
> > > 
> > > -- 
> > > Gina Whipp
> > > 2010 Microsoft MVP (Access)
> > > 
> > > "I feel I have been denied critical, need to know, information!" - Tremors 
> > > II
> > > 
> > > http://www.regina-whipp.com/index_files/TipList.htm
> > > 
> > > "John W. Vinson" <jvinson@STOP_SPAM.WysardOfInfo.com> wrote in message 
> > > news:jtm2k5dqm02hi1v71oamtsr5v2611caapp@4ax.com...
> > > > On Sun, 3 Jan 2010 19:03:01 -0800, ThomasAJ
> > > > <ThomasAJ@discussions.microsoft.com> wrote:
> > > >
> > > >>Code is:
> > > >>
> > > >>AppActivate "MYOB Accounting", True
> > > >>Call DelaySeconds(0.5)
> > > >>SendKeys "{TAB}", True
> > > >>
> > > >>It's definately the SendKeys that turns the Num Lock off.
> > > >
> > > > Yep. This is one of many, many reasons to avoid SendKeys if at all 
> > > > possible.
> > > >
> > > > I don't know if MYOB supports automation, but if it does, use it.
> > > >
> > > > Note that A2007 has, if I understand aright, removed SendKeys altogether.
> > > >
> > > > -- 
> > > >
> > > >             John W. Vinson [MVP] 
> > > 
> > > 
> > > .
> > > 
0
Reply Utf 1/5/2010 12:59:01 AM

=?Utf-8?B?VGhvbWFzQUo=?= <ThomasAJ@discussions.microsoft.com> wrote
in news:1E460957-3669-4099-9263-B52662C92D8E@microsoft.com: 

> Code is:
> 
> AppActivate "MYOB Accounting", True
> Call DelaySeconds(0.5)
> SendKeys "{TAB}", True
> 
> It's definately the SendKeys that turns the Num Lock off.

MYOB provides read/write ODBC drivers, so why not get those (they
are free to registered users of MYOB) and then you won't need
SendKeys at all. 

-- 
David W. Fenton                  http://www.dfenton.com/ 
usenet at dfenton dot com    http://www.dfenton.com/DFA/
0
Reply David 1/5/2010 1:57:54 AM

12 Replies
2124 Views

(page loaded in 0.121 seconds)

Similiar Articles:































7/19/2012 3:55:12 PM


Reply: