Scripting Support

QR Journal has basic AppleScript support to allow using QR code recognition in custom workflows.

Responding To Codes

The watch window allows for an AppleScript to be run when a QR code has been recognized. The AppleScript function receives a string that is the code:

on scanned_code(code)

    display dialog code buttons {"Ok"} default button 1

end scanned_code
    

Note that the AppleScript must be placed in the correct folder (which can be opened from the "Open Script Folder" option in the AppleScript menu of the watch window).

Starting QR Code Watching

Your AppleScript workflow can also start up QR Journal and begin scanning. The specified "scriptName" parameter must match the script in the AppleScript menu of the watch window:

tell application "QR Journal"

    watch scriptName "Test2.scpt" without close on first scan, save capture and open in background
    -- watch scriptName "Test2.scpt" with close on first scan, save capture and open in background
    -- watch scriptName "Test2.scpt" with close on first scan without save capture and open in background
        
end tell