I have a one-line command that works fine from the command prompt in Terminal:
echo -e "C\x03" > /dev/cu.usbserial-000012FD
This command controls a USB relay card so sending the hex value 03 sets relays #1 and #2 ON (e.g. binary 00000011 = hex 03).
I want to know how to implement this command as an Applescript. I've tried this:
do shell script "echo -e \"C\\x03\" > /dev/cu.usbserial-000012FD"
and every permutation I can think of for escaping the double-quotes and backslash characters but I always get an error from the script editor. My apologies if this is a really simple problem, I'm a Mac newbie, but how can I get this script to run from Applescript?
echo -e "C\x03" > /dev/cu.usbserial-000012FD
This command controls a USB relay card so sending the hex value 03 sets relays #1 and #2 ON (e.g. binary 00000011 = hex 03).
I want to know how to implement this command as an Applescript. I've tried this:
do shell script "echo -e \"C\\x03\" > /dev/cu.usbserial-000012FD"
and every permutation I can think of for escaping the double-quotes and backslash characters but I always get an error from the script editor. My apologies if this is a really simple problem, I'm a Mac newbie, but how can I get this script to run from Applescript?