Vorheriges Thema anzeigen :: Nächstes Thema anzeigen |
Autor |
Nachricht |
goetz.hagmann •->

Anmeldedatum: 05.04.2008 Beiträge: 15
|
Verfasst am: 04.10.2017 - 20:45 Titel: Bilddatei in Contacts schreiben |
|
|
Hallo Scripter,
Ich bin auf der suche nach einem code der genau das Gegenteil macht das ich unten gefunden habe. Eventuell kann mir helfen das ich das Bild ein lesen kann.
Code: | tell application "Contacts"
set {name:personName, image:personImage} to (get my card)
set filePath to (((path to desktop folder) as text) & personName & ".tiff")
set theFile to open for access file filePath with write permission
set eof of theFile to 0
write personImage to theFile
close access theFile
save
end tell |
Vielen Dank im Voraus
Götz[/code] |
|
Nach oben |
|
 |
goetz.hagmann •->

Anmeldedatum: 05.04.2008 Beiträge: 15
|
Verfasst am: 05.10.2017 - 20:27 Titel: Lösung |
|
|
Code: | tell application "System Events"
set imgfile to file "x.tiff" of folder "friends" of pictures folder
#set imgfile to file "x.tiff" of desktop
end tell
set imgfd to open for access imgfile
set img to read imgfd as "TIFF"
tell application "Contacts"
set myFriend to item 1 of ¬
(people whose first name is "Test" and last name is "Test")
set (image of myFriend) to img
save
end tell
close access imgfd |
|
|
Nach oben |
|
 |
|
|
Du kannst keine Beiträge in dieses Forum schreiben. Du kannst auf Beiträge in diesem Forum nicht antworten. Du kannst deine Beiträge in diesem Forum nicht bearbeiten. Du kannst deine Beiträge in diesem Forum nicht löschen. Du kannst an Umfragen in diesem Forum nicht mitmachen.
|
Powered by phpBB © 2001, 2002 phpBB Group Deutsche Übersetzung von phpBB.de
|
|
|