Wacom Intuous Tablet and AHK

Get help with using AutoHotkey and its commands and hotkeys
eagerahk
Posts: 60
Joined: 02 Dec 2015, 06:27

Wacom Intuous Tablet and AHK

06 Oct 2017, 09:08

Does anyone happen to use Wacom Intuous Tablets like CTH490, CTH480, CTL490, ...etc. The following simple Menu code (test1.ahk), if assigned to any buttons of a Wacom Intuous Tablet, the Menu will be displayed only about 1 second and then disappears right away. This problem does not occur on Wacom Bamboo Tablets. I have reported this to Wacom and am waiting for them to reply. Before that does anyone using Wacom know how to get around this? Thanks.

The simple test1.ahk:

Code: [Select all] [Expand] [Download] GeSHi © Codebox Plus

User avatar
Exaskryz
Posts: 2619
Joined: 17 Oct 2015, 20:28

Re: Wacom Intuous Tablet and AHK

06 Oct 2017, 10:15

I'm confused by this test, because it looks like it would close the script as very soon after launch due to ExitApp. Why it would work on the Bamboo Tablets, if it's the same code, I am not sure. (And to the point of clarity, you've assigned the .ahk script to be launched when you tap on one of the designated areas on the side of the tablet, right? That's why there's no Hotkey?)
eagerahk
Posts: 60
Joined: 02 Dec 2015, 06:27

Re: Wacom Intuous Tablet and AHK

06 Oct 2017, 12:37

Even without that ExitApp, the same thing happened on Wacom Intuos series.
You can just run that test1.ahk (or compile it to test1.exe) by double clicking it, you will see it works with ExitApp. Therefore it makes sense why Wacom Bamboo, like MTE450, MTE450a, do not have the same problem. I did try to remove the first ExitApp (or even both), but it does not help.
The test1.ahk or test1.exe was assigned to anyone of four tablet buttons (hotkeys) or two buttons on the tablet pen. By using Wacom tablets, we can have extra hotkeys for AHK to use. Newer Wacom tablets have 6 or 8 hotkeys plus two buttons on the tablet pen.
User avatar
boiler
Posts: 1917
Joined: 21 Dec 2014, 02:44

Re: Wacom Intuous Tablet and AHK

06 Oct 2017, 15:02

I have a Wacom Intuos4 PTK 640 tablet, and I'd like to check out your problem but I need to get it working again. It stopped working with one of the Win10 updates. I tried installing the latest driver, but it just led to errors and other problems. If you happen to have run into similar issues and have any tips in getting it to work again, I'd appreciate it. Maybe mine is too old or I've messed things up trying to reinstall drivers. I guess I need to call Wacom, but I'm not looking forward to doing that (support help is often useless, like "try rebooting your PC", "make sure all your cables are tightly connected", etc.).
User avatar
Exaskryz
Posts: 2619
Joined: 17 Oct 2015, 20:28

Re: Wacom Intuous Tablet and AHK

06 Oct 2017, 15:04

Oh yes, Menu, Show will halt execution like a MsgBox would. That was my mistake.


Option 1:
I'm wondering if the tablet is register a click outside of the menu (or even selecting a menu item) as soon as the Menu Shows. You may want to try using a Sleep before the Menu, MyMenu, Show command. For the sake of experimentation and diagnostics, try a Sleep 3000. A good 3 seconds should leave you enough time to move the pen away from the tablet and observe anything odd going on.


Option 2:
Are you able to make this script run persistently and use a hotkey to trigger the Menu, MyMenu, Show? i.e.

Code: [Select all] [Expand] [Download] GeSHi © Codebox Plus



But if it's like how I remember my tablets having dedicated tapping areas -- "flat buttons" if you will -- then that may not work. It'd be a lot trickier to identify.

Below is code I was testing for myself. I did my testing without a tablet; I have a Wacom tablet but it's packed away.

Code: [Select all] [Download] GeSHi © Codebox Plus

^5::
Menu, MyMenu, Add, Test, Test
Menu, MyMenu, Show
MsgBox World
return

Test:
MsgBox Hello
return
eagerahk
Posts: 60
Joined: 02 Dec 2015, 06:27

Re: Wacom Intuous Tablet and AHK

06 Oct 2017, 18:22

boiler wrote
I have a Wacom Intuos4 PTK 640 tablet, and I'd like to check out your problem but I need to get it working again. It stopped working with one of the Win10 updates. I tried installing the latest driver

Wow, Intuos4 PTK 640 tablet is an expensive professional tablet. Wacom told me that their most current version driver may not be more stable than the old ones, so may be you can try each version and one of them might work under Win10 updates. If not, you still have to call them and get a case number. :)
User avatar
boiler
Posts: 1917
Joined: 21 Dec 2014, 02:44

Re: Wacom Intuous Tablet and AHK

06 Oct 2017, 18:47

That's good info. Thanks much.
eagerahk
Posts: 60
Joined: 02 Dec 2015, 06:27

Re: Wacom Intuous Tablet and AHK

06 Oct 2017, 18:49

Option 1: Adding Sleep 3000 before Menu, MyMenu, Show and move the pen away quickly will see the Menu displayed after 3
seconds at where the new location of the pen is, and then the Menu stays for only 1 second and disappears again.

Option 2: vk01sc001:: ; or whatever name your tablet button hotkey may have to AHK
I don't know there is even a name for a hotkey at all. In Wacom Intuous, I just assign the .ahk/.exe via the tool Wacom provides.
How did you get a Wacom hotkey name?

I tried your last code of ^5:: and assign the codes without the ^5:: line to a button in Wacom Intuos, I saw Menu test flashed quickly
and disappeared then only the msgbox of World appeared, but missed to see the msgbox of Hello.
User avatar
Exaskryz
Posts: 2619
Joined: 17 Oct 2015, 20:28

Re: Wacom Intuous Tablet and AHK

06 Oct 2017, 19:03

That hotkey name I came up with is a generic name. You can figure out the name for irregular keys, possibly including your tablet, by reading about special keys in KeyList.

eagerahk wrote:
I tried your last code of ^5:: and assign the codes without the ^5:: line to a button in Wacom Intuos, I saw Menu test flashed quickly
and disappeared then only the msgbox of World appeared, but missed to see the msgbox of Hello.


When I tested, without a tablet, the way that I can get World only to appear is if I trigger the menu and then click anywhere else on screen. This dismisses the menu without selecting any item, so no associated label is executed. Normally the associated label is executed, then it resumes at the line underneath the Menu, MyMenu, Show when that label is done.

This is why I was thinking your tablet might be triggering a click elsewhere on screen for whatever reason. However, based on your results from Option 1, that may not be it. Without having my tablet to test around in, I'm not sure what it could be or how we might progress in trying to diagnose this issue. But my best guess is that for some reason the menu is being dismissed. Are there any other scripts or any other programs like AHK that are running?
eagerahk
Posts: 60
Joined: 02 Dec 2015, 06:27

Re: Wacom Intuous Tablet and AHK

06 Oct 2017, 19:26

As I tested along, AHK with Gui, or anything else worked. Menu was the only problem. I wish there is a command, Menu, MyMenu, Show, wait 1000. :)
If I can't figure out how to bypass this problem, and Wacom can't resolve it..then I can just use Listbox/Listview Gui to do it.
eagerahk
Posts: 60
Joined: 02 Dec 2015, 06:27

Re: Wacom Intuous Tablet and AHK

06 Oct 2017, 20:24

Exaskryz wrote
I was thinking your tablet might be triggering a click elsewhere on screen for whatever reason

Based on your theory, I somehow get around by the following code:

Code: [Select all] [Expand] [Download] GeSHi © Codebox Plus



Thanks for your enlightment! I am pretty grateful!
User avatar
Exaskryz
Posts: 2619
Joined: 17 Oct 2015, 20:28

Re: Wacom Intuous Tablet and AHK

06 Oct 2017, 21:40

Such a simple solution, I like it.

One thing I'd like to point out is that on the Bamboo Tablets, you might end up with a problem with the Menu showing again after an item is selected. You may need to keep the ExitApp inside the subroutines like MenuHandler: so that it doesn't re-open the menu. (For anyone who may be clicking in here and having this issue when using a script with hotkeys, using the Exit command instead of ExitApp would be fine. Heck, even using Exit in eagerahk's code should be equivalent to ExitApp here. The point is that Exit says "Stop everything, do no more" whereas Return says "OK, you're done in this bit. You can go back to where you left off.")
eagerahk
Posts: 60
Joined: 02 Dec 2015, 06:27

Re: Wacom Intuous Tablet and AHK

07 Oct 2017, 10:14

Yes, thanks to Exaskryz. His warning is very real, so I modified the test code as follows:

Code: [Select all] [Expand] [Download] GeSHi © Codebox Plus

eagerahk
Posts: 60
Joined: 02 Dec 2015, 06:27

Re: Wacom Intuous Tablet and AHK

21 Oct 2017, 09:34

Wacom replied with the following brief answer:
Though we had confirmed and could reproduce your problem on Wacom Intuos series, however due to our driver works for almost all .exe, we therefore have no plan to do anything just based on one user's self-written code.


However, without Wacom's help, I found a second solution (better than the previous one):

Code: [Select all] [Expand] [Download] GeSHi © Codebox Plus



By assigning a hotkey, like Ctrl+Q, to Wacom's button, the popup code works for all Wacom version.

Return to “Ask For Help”

Who is online

Users browsing this forum: Gilaade, Osprey and 42 guests