Jump to content

Wacom Bamboo pen tablet screen switching


Recommended Posts

I mostly love my Bamboo Pen and Touch tablet. But there's one infuriating missing feature that's obvious to anyone with dual screens:

It is most natural to have the pen tablet track only one monitor at a time (otherwise it's weird and also not precise enough). The Bamboo control panel allows you to set which screen you want to use for this. But there's no easy way to assign a key or button to toggle this choice back and forth during day-to-day use of the machine. In other words, every time you want to swap the pen to the other screen you have to go back into the Bamboo control app, into the pen details screen, and click the stupid little updown control.

David Moore at http://www.moonrat.co.uk made a C++ app that would open the control panel, change the screen, then exit. I thought doing something similar to this in AutoIt script would make it easier to see/understand/hack on for people. So here is my function:

Global Const $BambooApp = "c:\Program Files\Tablet\Pen\Consumer_CPL.exe"
Global Const $Bamboo = "[TITLE:Wacom; CLASS:ZafWindow]"
Global Const $PenTabX = 77
Global Const $PenTabY = 14
Global Const $PenTabTextControl = "Pen Mode"
Global Const $PenDetailsBtn = "[CLASS:Button; INSTANCE:14 ]"
Global Const $PenDetails = "[TITLE:Pen Mode Details]"
Global Const $MonitorUpDown = "[CLASS:msctls_updown32; INSTANCE:1]"
Global Const $Hide = True
Func ScreenNext()
    Local $active = WinGetHandle("[active]")
    if not WinExists($Bamboo) Then
        _DebugOut("$Bamboo is not running")
    If WinExists($PenDetails) Then
        _DebugOut("$PenDetails exists")
        _DebugOut("activating bamboo")
        _DebugOut("Activating pen tab")
        MouseClick("left", $PenTabX, $PenTabY, 1, 0)
        WinWaitActive($Bamboo, $PenTabTextControl)
        if $Hide Then
            _WinAPI_SetWindowLong($Bamboo, $GWL_EXSTYLE, BitOR($WS_EX_TOOLWINDOW,0x08000000))
            WinSetState($Bamboo, "", @SW_HIDE)

        _DebugOut("Clicking pen details")
        ControlClick($Bamboo,"", $PenDetailsBtn)
    _WinAPI_SetWindowLong($PenDetails, $GWL_EXSTYLE, BitOR($WS_EX_TOOLWINDOW,0x08000000))
    Local $size = WinGetPos($PenDetails,"")
    if $Hide Then
        WinSetState($PenDetails, "", @SW_HIDE)
    ControlClick($PenDetails,"", $MonitorUpDown, "left", 1, 8, 6)

My function is suitable for running in a persistent AutoIt script under a hotkey. Each time it's called, it will change the screen.

Known issues: It runs and hides the Bamboo control panel, an app that can only run in a single instance. So if you try to actually launch the control panel to see it, it will appear to do nothing. You have to kill its process consumer_cpl.exe, and launch it from the start menu. This would be trivial to fix with another hotkey that @SW_SHOWs the bamboo windows. I just don't happen to care since I never go into that panel for anything.

2/9/2013 update for new Bamboo CPL version:

It has a new window title, and the pen tab is no longer the default one. Annoyingly there's no hot keys supported anywhere for tab switching etc. so I have to use a Mouse Click (ugh!).

Edited by ferrix
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...