[AccessD] autokeys macros

Stuart McLachlan stuart at lexacorp.com.pg
Wed May 12 22:12:19 CDT 2021


Going further

If you have two sub-maocrs for ^Q and ^q, you get a warning that the scoend is a duplicate 
and only the first will be triggered, but actually both get triggered 

With just the ^Q macro, it is triggered with Ctrl+Q whether Capslock is on or not.
It does not get triggered with Ctrl+Shift+Q. regardless of Capslock state.

So I'd guess it is triggered on keycode, not ASCII value.


On 13 May 2021 at 0:04, McGillivray, Don wrote:

> Hi John,
> 
> I created a demo similar to Stuart's and started poking around.  I
> doubt that I have discovered the problem, but thought it worth passing
> it along just in case.
> 
> I named the sub-macros using "^" for CTRL and upper case characters. 
> I tested them from the keyboard using CTRL+the character.  All worked
> as expected.  Then I programmed a button on a form to use SendKeys
> instead of DOCMD.RUNMACRO, as your initial post indicated.
> 
> In my code, since I had used upper case characters in the macro names,
> I used them also in the string passed in to SendKeys (^Q, for
> example).  The macros wouldn't fire.  When I altered the strings so
> that they contained a lower case character (^q) instead, the macros
> DID fire.  
> 
> I also experimented with changing the case of the sub-macro names. 
> Regardless of the case on the macro name, only passing the hot-key in
> lower case worked for me.
> 
> Maybe yours is the same issue?
> 
> 
> 
> -----Original Message-----
> From: AccessD
> <accessd-bounces+dmcgillivray=ctc.ca.gov at databaseadvisors.com> On
> Behalf Of Stuart McLachlan Sent: Wednesday, May 12, 2021 2:12 PM To:
> Access Developers discussion and problem solving
> <accessd at databaseadvisors.com> Subject: Re: [AccessD] autokeys macros
> 
> You mean DOCMD.RUNMACRO Auttokeys? Seems a bit pointless!
> 
> But anyway - Office 2010:
> 
> Autokeys macro:
> SubMacro ^Q - Action Messagebox "Q"
> SUbMacro ^W Action Messagebox "W"
> 
> Button on a form.
> btn-_On Click 
>     DocmdRunMacro.Autokeys
> 
> Displays messagebox "Q" i.e. the first autokey.
> 
> 
> 
> On 12 May 2021 at 13:44, John Colby wrote:
> 
> > Can someone test running an autokeys macro in 2010 or later from
> > inside of a module?
> > 
> > It worked back in the day.  I am not getting it to work now.
> > 
> > I am running 2010.  I can get the macro to work when not in a
> > module. -- John W. Colby Colby Consulting -- AccessD mailing list
> > AccessD at databaseadvisors.com
> > https://gcc02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fda
> > tabaseadvisors.com%2Fmailman%2Flistinfo%2Faccessd&data=04%7C01%7
> > Cdmcgillivray%40ctc.ca.gov%7Ce26eb90c03984fadc1c008d9158a9d7a%7C7827
> > 6a93cafd497081b54e5074e42910%7C0%7C0%7C637564507385149047%7CUnknown%
> > 7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLC
> > JXVCI6Mn0%3D%7C1000&sdata=iMzMp29kp%2Bdf9fgTxc2r1eKVk%2ByoVr%2Bd
> > aXDMvXsMznw%3D&reserved=0 Website:
> > https://gcc02.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww
> > .d
> > atabaseadvisors.com%2F&data=04%7C01%7Cdmcgillivray%40ctc.ca.gov%
> > 7C
> > e26eb90c03984fadc1c008d9158a9d7a%7C78276a93cafd497081b54e5074e42910%
> > 7C
> > 0%7C0%7C637564507385159000%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwM
> > DA
> > iLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=46K
> > OJ 6FCy7JbLS%2FiKwfpYsNi64Nwi%2Fr3%2F%2FlDA8Uh6WQ%3D&reserved=0
> > 
> 
> 
> --
> AccessD mailing list
> AccessD at databaseadvisors.com
> https://gcc02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdata
> baseadvisors.com%2Fmailman%2Flistinfo%2Faccessd&data=04%7C01%7Cdmc
> gillivray%40ctc.ca.gov%7Ce26eb90c03984fadc1c008d9158a9d7a%7C78276a93ca
> fd497081b54e5074e42910%7C0%7C0%7C637564507385159000%7CUnknown%7CTWFpbG
> Zsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%
> 3D%7C1000&sdata=l8hTzXEWTknnTVGP5TVJB9onILq2wbp1n54FSjWnrEE%3D&amp
> ;reserved=0 Website:
> https://gcc02.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.d
> atabaseadvisors.com%2F&data=04%7C01%7Cdmcgillivray%40ctc.ca.gov%7C
> e26eb90c03984fadc1c008d9158a9d7a%7C78276a93cafd497081b54e5074e42910%7C
> 0%7C0%7C637564507385159000%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDA
> iLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=46KOJ
> 6FCy7JbLS%2FiKwfpYsNi64Nwi%2Fr3%2F%2FlDA8Uh6WQ%3D&reserved=0 --
> AccessD mailing list AccessD at databaseadvisors.com
> https://databaseadvisors.com/mailman/listinfo/accessd Website:
> http://www.databaseadvisors.com
> 




More information about the AccessD mailing list