The only way would be to use the nativeprocess option. Write a script that opens the drawer, then call it from your code, then compile the air app as an exe or dmg.
I have the same problem ! Did you find a way to open a cash drawer through ActionScript/AIR ?
My printer is an Epson TM-T20 and the cash drawer is connected to this printer. I tried to print the 'A' character with the 'control' font but that doesn't work
I really need a trick !
That's not the only way. All of the Flash wrapper apps, such as SWFKit, etc. will allow you to send control codes over a serial port. You just use a USB/serial converter to set up a usb port as a serial port... I did this to control a serial relay that would turn a pump on/off. If your device supports serial control this is a good way to go.
You're right ! But my printer is connected via the ethernet port and i need to use the print API to communicate with it. In ActionScript nothing works I tried to send the escape sequence that should open the drawer : String.fromCharCode(27)+String.fromCharCode(112)+String.fromCharCode(48)+String.fromCharC ode(53)+String.fromCharCode(53) ... it didn't work.
So i decided to call a little Java program (JAR) through the Air NativeProcess API. This program send the escape sequence to the printer using Java print API.
Thx for the answer