Remove this ad

Lead

Sep 1 12 12:15 PM

Tags : :

So I was busy messing about with scripts as detailed in this thread by ericn and I got the crazy idea that I could write a script to draw Abracadabra gestures with the eraser. Or activate Quickclicks with the eraser or whatever. So, I opened up the Applescript Editor and typed


tell application "TabletDriver"

    set button function of button 4 of transducer 1 of tablet 1 to 4th click

end tell


and clicked compile and I got an error message:

"Syntax Error 

Expected class name but found application constant or consideration."


When I click "OK" the "click" in the above script is highlighted in blue. When I looked the the Tablet 

Dictionary "4th click" is included as a property of "button function". Wacom's example script is no help and neither is the Applescript help file. Does anybody know what is going on?





Quote    Reply   
Remove this ad
Remove this ad

#1 [url]

Sep 1 12 1:16 PM

Further information:

When I tell TabletDriver (TB from here on in) to get the button functions I am told that button 3 is the "5th click". Weirdly, telling TB to set any button to 3rd, 4th, or 5th click returns the same error as in OP, but click, double click, and right click all work fine. If I put "xth click" (where x = 3, 4, or 5) in quotes it compiles OK, but won't run. It returns an error:

AppleScript Error
TabletDriver got an error: Can't make some data into the expected type.

If I just type in 4 instead of "4th click" it compiles and apparently runs successfully, but the eraser doesn't actually work as a 4th click. 

Also, every time I try to type "eraser" I end up typing "erasure". I believe this to be an unrelated issue caused by robot unicorns.

Quote    Reply   

#2 [url]

Sep 4 12 12:22 PM

Update: I have discovered that by setting button function of the eraser (button 4 of transducer 1 of tablet 1) to option I can set the Abracadabra Gesture hot key to option and get around the whole "Constant or Consideration" thing. I have also noticed that when I press button 3 away from the screen, then, holding 3, bring the pen to the screen, the the pen performs whatever action I have assigned to button 4. However, if I place the pen on the screen first, then hit button 3, the action assigned to button 3 is performed. 

It is a neat function, but I wonder why it works?

Quote    Reply   
Add Reply

Quick Reply

bbcode help