Using A Barcode Scanner Alongside Apple Scripts
Good day,
I am familiar with Apple Scripts and have used it before to automate tasks, but I am trying to emplement it into a more specific task. My plan is to have it open up a Google Form in Safari. And then wait for the user to scan a barcode, then take that input text from the barcode and drop it into a spot on the Google Form. Any help would be appreciative of any help for being able to have the program wait on the barcode input, then continue on with the script! Thank you!
Here is an example Google Form to go along with what the following code will be doing: https://forms.gle/E4SGL7jPqaHsf5Cb9
Code:
--repeat--
tell application "Safari"
activate
make new document
end tell
tell application "System Events"
tell application process "Safari"
keystroke "https://forms.gle/isxQK1xjkow8xiUq8"
keystroke return
delay 2
keystroke tab
-- This is where the code would need to be added for inputing the text from the barcode scanner --
keystroke tab
keystroke return
end tell
end tell
tell application "Safari"
close window 1
end tell
--end repeat--
MacBook Pro 13", macOS 10.14