Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- tell application "RagTime 6"
- activate
- set theSelection to (choose file {} with multiple selections allowed)
- set i to 1
- set theAnzahl to number of items in theSelection
- open layout 1 of document 1
- repeat with i from i to theAnzahl
- set theFile to item i of theSelection as text
- tell application "System Events"
- tell XML element 1 of contents of XML file theFile
- set vorname to (value of (XML elements whose name is "vorname")) as string
- set nachname to (value of (XML elements whose name is "name")) as string
- set geburtstag to (value of (XML elements whose name is "geb")) as string
- set kommentare to (value of (XML elements whose name is "kommentare")) as string
- set spitznamen to (value of (XML elements whose name is "stbr1")) as string
- set leistungsk to (value of (XML elements whose name is "stbr2")) as string
- set lebensmotto to (value of (XML elements whose name is "stbr3")) as string
- set hobbies to (value of (XML elements whose name is "stbr4")) as string
- set ichmag to (value of (XML elements whose name is "stbr5")) as string
- set ichmagnicht to (value of (XML elements whose name is "stbr6")) as string
- set unvergesslich to (value of (XML elements whose name is "stbr7")) as string
- set nachdemabi to (value of (XML elements whose name is "stbr8")) as string
- set jahreschule to (value of (XML elements whose name is "stbr9")) as string
- end tell
- end tell
- if i > 1 then
- make new page at after page (i - 1) of layout 1 of document 1
- end if
- set contents of rectangle 1 of page i of layout 1 of document 1 to "Leistungskurse: " & leistungsk
- set contents of rectangle 2 of page i of layout 1 of document 1 to "Kommentare der Stufe: " & kommentare
- set contents of rectangle 3 of page i of layout 1 of document 1 to "Spitznamen: " & spitznamen
- set contents of rectangle 4 of page i of layout 1 of document 1 to "Spitznamen: " & spitznamen
- set contents of rectangle 5 of page i of layout 1 of document 1 to "Hobbies: " & hobbies & "
- Ich mag: " & ichmag & "
- Ich mag nicht: " & ichmagnicht & "
- Unvergessliche Momente: " & unvergesslich & "
- Nach dem Abi: " & nachdemabi & "
- 12 Jahre Schule waren: " & jahreschule
- set contents of rectangle 6 of page i of layout 1 of document 1 to "Spitznamen: " & spitznamen & "
- Geburtstag: " & geburtstag & "
- Leistungskurse: " & leistungsk
- set contents of rectangle 7 of page i of layout 1 of document 1 to vorname & " " & nachname
- set contents of rectangle 8 of page i of layout 1 of document 1 to file ":Users:User_01:Desktop:dummypicture.jpeg"
- end repeat
- end tell
Advertisement
Add Comment
Please, Sign In to add comment