Remove this ad
avatar

ericn

superstar

Posts: 284

Lead

Jun 19 10 4:39 PM

Tags : :

Sometimes I want the eraser on my Modbook's pen to be an eraser, like when I'm using inkBook or a drawing application, but sometimes, like when I'm using a vector graphics app, I want the eraser to act like a shift key. I'd really like to see the way the pen buttons work to vary depending on what I'm doing. I described in ‘Expanding the Options for Your Pen/Stylus Buttons’ how to use the popup menu to address that issue, but the solution there is a bit clunky. The best solution is the one used in Wacom's Cintiq and Intuos pen tablets: to configure the pen buttons for specific applications and to automatically change the buttons configuration depending on which application that you are using. Unfortunately, the tablet software for the Modbook and many other Wacom-based tablets allow for only one global configuration for the pen buttons.

PenApt is an applet that uses AppleScript to vary the Modbook pen button functions depending on which application you are using. (It also may be usable with Wacom's Bamboo tablets.)

When you start the applet, this this dialog box appears:


Choosing ‘Add/Edit App Pen Settings’ allows you to configure the pen buttons for given application, and choosing ‘Activate’ puts your configuration choices into effect, automatically changing the button functions to suit the app you are using.

If you choose to edit your pen settings, you are offered this dialog box,


allowing you to add pen settings for a new app, change the default pen settings, or change the pen settings for a particular app. If you choose an option, after a confirmation box, the following appears:



Use the System Preferences dialog to configure the pen's two barrel buttons. If you want the eraser to erase, click on ‘Done / Standard Eraser’. On the other hand, if you want the eraser to do something else, click on ‘Done / Replace Eraser’.

Once PenApt is activated, it will adjust the pen preference in accordance with the application you are using. If that particular app has not been configured, PenApt will use the default (current) pen settings. While PenApt is activated, you can configure additional applications by clicking on its icon in the dock.

The applet comes with the Finder application already configured so that the eraser functions as an option-click. That way, while the pen's tip can be used to move files, the eraser can be used to copy them.


Download: PenApt.zip [Updated June 21, 2010 — settings are now retained between runs] 

Quote    Reply   
Remove this ad
Remove this ad
avatar

ericn

superstar

Posts: 284

#2 [url]

Jun 20 10 8:49 PM


No Problem, it was fun to build, and I use it all the time now.  My favorite app set up is for Safari: set the eraser to middle click while I have Smart Scroll's Grab tool is set to middle click — so the pen tip works normally, but the eraser scrolls.

Let me know if you have any problems. I need to work on the icon, I know.

EricN


Quote    Reply   
avatar

ericn

superstar

Posts: 284

#5 [url]

Jun 23 10 9:53 AM


I don't think Menu Bar items can be made using AppleScript. That would have to wait until I learn Cocoa. 

In any event, putting up more Menu Bar Icons, which will disappear when the Modbook gets put into portrait orientation, is probably not the right thing to do either. A third option is needed. Perhaps, I could create a 'pause' script like is available for MacFlip, but most people wouldn't want to set that up. I'm not sure. 

Quote    Reply   
Remove this ad

#7 [url]

Mar 3 11 2:54 PM

A bug that prevented pen settings from being remembered between runs has been fixed.EricN

-ericn


Thanks for building this Eric; application specific pen settings are something that I've sorley missed since migrating away from the Cintiq.

However, I'm having trouble getting Penapt to work for me.
When I try to set the buttons for a specific program, Penapt returns:

Can't get <<class xppb>> "Pen Tablet" of application "System Preferences"

Am I missing something crucial or doing something wrong?  Thanks for any feedback, I'd love to be able to use this.

Thanks again,
-sketcherazzi

Quote    Reply   

#8 [url]

Mar 8 11 2:26 PM

Actually, I think I see the problem, but can't fix it on my own.  It looks like the latest drivers I installed for my Modbook changed their name from Pen Tablet to Bamboo... so the current PenApt script isn't compatible with the most recent drivers (5.2.4-4).  Can anyone out there using PenApt tell me which drivers were the latest that it was compatible with?

Thanks!
Sketcherazzi   

Quote    Reply   

#9 [url]

Feb 16 14 3:35 AM

Although this thread is 4 years old, I want to thank you for writing the PenApt script. You seem to have spent a considerable time making it and I really appreciate it. I don't have any applescript knowledge but I've googled the terms and modified your script to work with my One by Wacom tablet. I had to change the system preferences pane name from "Pen Tablet" to "Wacom" and remove the lines that enable or disable the eraser, as my stylus doesn't have one and it was causing errors. Also, I changed the syntax of how the plist is written and now it saves and reads correctly.

It works really well and without any lag. I'm finding a way to make it run without the dock icon or with a menu bar icon, and also to make it launch automatically when a tablet is connected. Any help and guidance would be much appreciated.

Here is my modified script: https://dl.dropboxusercontent.com/u/48224378/PenApt%202.zip

Quote    Reply   
Remove this ad
Add Reply

Quick Reply

bbcode help