Barcode reader on USB port returns numeric code when a barcode is scanned. Barcode appears to have been typed from keyboard.
I need two very similar scripts written in Perl or Python for Windows 7. Activestate is recommended. Both scripts are to be run from an icon on the Windows desktop or from the start menu.
Script 1 (Inventory) -- when it's running, each number coming from the barcode reader is assumed to be an ISBN and looked up using an Amazon lookup library such as [login to view URL]~boumenot/Net-Amazon-0.59/lib/Net/[login to view URL] (or the Python equivalent). The resulting book info is filled in to an internet-accessible inventory database (in mysql). Before filling in the database, two extra fields (condition and price) are requested from the user. When they are checked for reasonable entry conditions and complete, the row is added, and the script awaits another barcode.
Script 2 (Sale) -- when it's running, each number coming from the barcode reader is assumed to be an ISBN and looked up using an Amazon lookup library such as [login to view URL]~boumenot/Net-Amazon-0.59/lib/Net/[login to view URL] (or the Python equivalent). The resulting book info is filled in to an internet-accessible sales database (in mysql). Before filling in the database, two extra fields (category and price) are requested from the user. When they are checked for reasonable entry conditions and complete, the row is added, and the script awaits another barcode.
In either script, typing 'esc' aborts the current row entry and awaits another, while typing the 'end' or other appropriate key quits the script immediately.
That's it, write once and reuse most code for the second.