Wacom tablet pressure input for cmd
Posted: 21 Dec 2019 19:17
Aaah...
so you thought Batch script writers in 2019 was a small interest group? Try Batch script writers with a need for Wacom tablet pressure input!
Download link: http://www.mediafire.com/file/juzr9rwo3 ... t.zip/file
So to start off, unless you have a Wacom Tablet, this program (cmd_wacom_input.exe) will be of no use. Even if you do have one, it might need tweaking, but back to that later.
Also, Wacom tablets can already be used in the cmd window, like a mouse. What is missing is the pressure information.
If cmd_wacom_input.exe is run by itself, it looks like this (when you start using the pad):
This output format is the same as my program cmdgfx_input, because I want to be able to use it with cmdgfx, if need be. The most interesting part is the value after LEFT. In cmdgfx_input, this value is 1 if left mouse button is pressed, but here, the value is 1 up to the pressure maximum (which is 32768 on my Wacom Intuos S). Another notable thing is that the X and Y coordinates are not character coordinates, but pixel coordinates.
As a simple test, I made a very small drawing Batch script (drawChars.bat). Pressing lightly, it will draw dark characters, and pressing hard it will approach white. To make things easier for me, it does use cmdgfx_RGB to draw, but cmdgfx does not have to be used at all, echoing VT-100 codes would work as well (though be slower, I assume)
In order to draw in the correct position, the script forces bitmap font 2 (which is 8x8 pixels), then divides the X and Y coordinates from cmd_wacom_input.exe by 8.
so you thought Batch script writers in 2019 was a small interest group? Try Batch script writers with a need for Wacom tablet pressure input!
Download link: http://www.mediafire.com/file/juzr9rwo3 ... t.zip/file
So to start off, unless you have a Wacom Tablet, this program (cmd_wacom_input.exe) will be of no use. Even if you do have one, it might need tweaking, but back to that later.
Also, Wacom tablets can already be used in the cmd window, like a mouse. What is missing is the pressure information.
If cmd_wacom_input.exe is run by itself, it looks like this (when you start using the pad):
This output format is the same as my program cmdgfx_input, because I want to be able to use it with cmdgfx, if need be. The most interesting part is the value after LEFT. In cmdgfx_input, this value is 1 if left mouse button is pressed, but here, the value is 1 up to the pressure maximum (which is 32768 on my Wacom Intuos S). Another notable thing is that the X and Y coordinates are not character coordinates, but pixel coordinates.
As a simple test, I made a very small drawing Batch script (drawChars.bat). Pressing lightly, it will draw dark characters, and pressing hard it will approach white. To make things easier for me, it does use cmdgfx_RGB to draw, but cmdgfx does not have to be used at all, echoing VT-100 codes would work as well (though be slower, I assume)
In order to draw in the correct position, the script forces bitmap font 2 (which is 8x8 pixels), then divides the X and Y coordinates from cmd_wacom_input.exe by 8.