Setting action for inputted Barcode data

I am very new to writing AppleScripts (until today I did all macro work in QuicKeys) but would like to get into it. I just need some help on getting started and you are all the people who I`m sure can help.

What I need to do is to take the data read in from a barcode reader (example, the number “12345”) and have it open a predetermined sound file in quicktime without pushing an execute button etc. [ie. the script is waiting for an inputed value and when that value enters (in this case, in the form of a number read in by the barcode reader) it automatically opens a sound file and then goes back and waits for the next number to be entered.] Opening and playing a file in quicktime is easy, but how can I get the computer to automatically read the number without phsically selecting and copying it, and then automatically respond to a set number without physically pushing an execute button? Is this even possible with AppleScript?

I really would appreciate any help in getting started. Thanks in advance and the best to you all.

Bruce Whitred
Follow Your Dreams :smiley:

After thinking about it a bit, how does this sort of a format sound?

(on receiving inputed value)
tell application “QuickTime Player”
activate
play movie “(the inputed value)” [ ie. sound files names match the inputed #]
end tell
(go back to standby mode for receiving next inputed value)

I have no idea as to go about scripting the ideas in brackets().
Am I way off? Any advise?

Thanks again in advance.

Bruce Whitred
Follow Your Dreams :smiley: