Hallo Herr Rose,
hier die Lösung, welche ich (ohne Verwendung des QR-Codes in tomedo) umgesetzt habe.
Für die Generierung des QR-Codes nutze ich eine API, die ich mit den Informationen aus der tomedo-Variable patientenTermineICALFormat füttere.
Den Text modifiziere ich noch ein bisschen (als Veranstaltungsort die Praxisanschrift eintragen etc...).
set URLprefix to "http://api.qrserver.com/v1/create-qr-code/?color=000000&bgcolor=FFFFFF&data="
set iCALText to "$[patientenTermineICALFormat]$"
set AppleScript's text item delimiters to {return & linefeed, return, linefeed, character id 8233, character id 8232}
set theText to text items of iCALText
set AppleScript's text item delimiters to {"%0A"}
set theText to theText as text
-- falls gewünscht, entsprechende Ersetzungen:
set theText to findAndReplaceInText(theText, "\"TCM\"", "Praxisname")
set theText to findAndReplaceInText(theText, "\"Termin: Praxisname\"", "Musterstr. 10; 10000 Musterstadt")
set theText to findAndReplaceInText(theText, "\"Termin: (null)\"", "Musterstr. 10; 10000 Musterstadt")
set theText to findAndReplaceInText(theText, "ORGANIZER;CN=(null):MAILTO:(null)%0A", "")
set theText to findAndReplaceInText(theText, ":", "%3A")
set theURL to URLprefix & theText
--display dialog theURL
tell application "Safari"
tell window 1
set current tab to (make new tab with properties {URL:theURL})
activate
end tell
end tell
-- falls keine Ersetzungen genutzt werden, kann die folgende Funktion weggelassen werden:
on findAndReplaceInText(theText, theSearchString, theReplacementString)
set AppleScript's text item delimiters to theSearchString
set theTextItems to every text item of theText
set AppleScript's text item delimiters to theReplacementString
set theText to theTextItems as string
set AppleScript's text item delimiters to ""
return theText
end findAndReplaceInText
Herzliche Grüße
Christophe Mohr