I use a Kensington Expert Mouse K64325 with AutoHotKey to customise the button settings:
RButton & LButton::Send {ESC}{ESC}{ESC}
XButton1::Click right
XButton1 & MButton::Send {Del}
RButton::Send {Click 2}
RButton & XButton1::Send {u}{Enter}
RButton & MButton::Send {z}{Enter}{p}{Enter}
This has worked perfectly within AutoCAD LT for all versions up to the latest (2018) where I find that the additional button (XButton1) and the combinations are ignored - can anyone advise on how to re-instate the previous functionality, please?
AutoCAD and Kensington Expert Mouse
-
- Posts: 3
- Joined: 21 Feb 2018, 08:32
- divanebaba
- Posts: 816
- Joined: 20 Dec 2016, 03:53
- Location: Diaspora
Re: AutoCAD and Kensington Expert Mouse
Hello
and welcome to the AHK-Forum.
Your issue is a bit strange, because the XButton1 is captured by AHK and not by AutoCad.
I have ACAD 2018, German language, and it does (most time) what I want, even with my favourite XButton1.
TryIf this fails too, you have a real problem
The commands in ACAD 2018 are different then the LT commands, but I think you have to correct setting the focus.
Your script could have still "old title" and sends the keystrokes to anywhere else.
and welcome to the AHK-Forum.
Your issue is a bit strange, because the XButton1 is captured by AHK and not by AutoCad.
I have ACAD 2018, German language, and it does (most time) what I want, even with my favourite XButton1.
Try
Code: Select all
XButton1 & MButton::
MsgBox Hello World
return
The commands in ACAD 2018 are different then the LT commands, but I think you have to correct setting the focus.
Your script could have still "old title" and sends the keystrokes to anywhere else.
Einfach nur ein toller Typ.
-
- Posts: 3
- Joined: 21 Feb 2018, 08:32
Re: AutoCAD and Kensington Expert Mouse
Thanks for the response.
I think the problem is with AutoCAD LT, because now it is 'behaving' - after a fashion. The XButton1 and combinations are functioning as intended, except for RButton&LButton - it only appears to send 1 {ESC}, instead of three - one only cancels the current command, it does not cancel the object selection, so that the next command will operate on that object as well as that intended. I added a third to be certain.
I think the problem is with AutoCAD LT, because now it is 'behaving' - after a fashion. The XButton1 and combinations are functioning as intended, except for RButton&LButton - it only appears to send 1 {ESC}, instead of three - one only cancels the current command, it does not cancel the object selection, so that the next command will operate on that object as well as that intended. I added a third to be certain.
- divanebaba
- Posts: 816
- Joined: 20 Dec 2016, 03:53
- Location: Diaspora
Re: AutoCAD and Kensington Expert Mouse
Hi.
As I said, in my opinion, your script is generating the issues.
Without a look inside your code, I can not say reliable stuff.
One thing only, sending more than one keystroke, you can solve like below:How about using COM? A few days ago, there was a similar request here.
Using the commands shown there is the most reliable way to interact with non-AHK-programs.
But using COM will not prevent having possible trouble with your hotkeys.
Normally you have to set focus to ACAD 2018, before you send keystrokes. Maybe this is causing trouble with ACAD 2018?
As I said, in my opinion, your script is generating the issues.
Without a look inside your code, I can not say reliable stuff.
One thing only, sending more than one keystroke, you can solve like below:
Code: Select all
RButton & LButton::Send {ESC 3} ; this sends three times escape-key
Using the commands shown there is the most reliable way to interact with non-AHK-programs.
But using COM will not prevent having possible trouble with your hotkeys.
Normally you have to set focus to ACAD 2018, before you send keystrokes. Maybe this is causing trouble with ACAD 2018?
Einfach nur ein toller Typ.
-
- Posts: 3
- Joined: 21 Feb 2018, 08:32
Re: AutoCAD and Kensington Expert Mouse
I am sure the problem is with AutoCAD - I have just started AutoCAD and opened a drawing via the 'Open' dialogue box and AutoHotkey is not working - even when trying to navigate the directory. YET, when I double-click a drawing file in Windows Explorer, a fresh instance of AutoCAD opens with that drawing and AutoHotkey is functioning! The first AutoCAD is still open and not following AutoHotkey. Previously, double-clicking a file in Windows Explorer would open the drawing in the current instance of AutoCAD.
The button mapping works in other applications, and sometimes in AutoCAD - as above - so I do not think it is necessary to 'set focus', which I do not know how to do, anyway.
The button mapping works in other applications, and sometimes in AutoCAD - as above - so I do not think it is necessary to 'set focus', which I do not know how to do, anyway.
Re: AutoCAD and Kensington Expert Mouse
He won't provide his code. That's a fact
- divanebaba
- Posts: 816
- Joined: 20 Dec 2016, 03:53
- Location: Diaspora
Re: AutoCAD and Kensington Expert Mouse
Hmmm.
As I said, without a look inside your script, I could give you non-reliable support for the next 50 years witout any success.
Opening a new instance of ACAD seems to be standard when double clicking an ACAD-file in Explorer.
So I still believe, it is an focus problem. Providing this is possible with WinActivate. It could look likeTo find Titles, classes or process names, use Window Spy.
As I said, without a look inside your script, I could give you non-reliable support for the next 50 years witout any success.
Opening a new instance of ACAD seems to be standard when double clicking an ACAD-file in Explorer.
So I still believe, it is an focus problem. Providing this is possible with WinActivate. It could look like
Code: Select all
SetTitleMatchMode, 1 ; mathing mode: Title begins with ...
WinActivate, Autodesk AutoCAD 2018 - ; using beginning part of WinTitle
; or
WinActivate, ahk_class AfxMDIFrame140u ; using ahk_class
; or
WinActivate, ahk_exe acad.exe ; using process name
Einfach nur ein toller Typ.
Who is online
Users browsing this forum: primus12 and 100 guests