Have a look at this, its one I did a while back it was for an 800 x 600 screen size, I have stripped all my custom stuff out of it but it works and you can put your code in the start button to do whatever you need.
Extract the Mach3 folder from the Zip file and drop it over your Mach3 folder to merge them together. Run Mach3 loader, ChopSaw should be listed.
It only acts as a keyboard input for the length the rest is up to you, the length is stored in UserLabel1 so you can get at it with something like this in the START button VB code :-
length = Val(GetUserLabel(1))
No warranty given or implied, if you loose bits its your fault as its just a keypad right now nothing more.