• Apfeltalk ändert einen Teil seiner Allgemeinen Geschäftsbedingungen (AGB), das Löschen von Useraccounts betreffend.
    Näheres könnt Ihr hier nachlesen: AGB-Änderung
  • Viele hassen ihn, manche schwören auf ihn, wir aber möchten unbedingt sehen, welche Bilder Ihr vor Eurem geistigen Auge bzw. vor der Linse Eures iPhone oder iPad sehen könnt, wenn Ihr dieses Wort hört oder lest. Macht mit und beteiligt Euch an unserem Frühjahrsputz ---> Klick

Illustrator CS4 - Raster Item platzieren per Applescript

Johnson

Auralia
Registriert
07.08.05
Beiträge
198
Ich will in ein Illustrator Dokument ein jpg platzieren.

Also ganz einfach File > Place...

Wie scripte ich das in Applescript??

Code:
tell application "Adobe Illustrator"
	set fileToPlace to ("Macintosh HD:Users:Philipp:Pictures:Studium:4:Netzwerke:VZ Pics:1.jpg")
	set itemPosition to {100.0, 200.0}
	set placedRef to make new raster item in document 1 ¬
		with properties {file path:fileToPlace, position:itemPosition}
	display dialog "Fertig??"
end tell

Ich bekomme den Fehler "Adobe Illustrator hat einen Fehler erhalten: Klasse "raster item" kann nicht erstellt werden"
 

Johnson

Auralia
Registriert
07.08.05
Beiträge
198
Ok alles klar ich habs schon:

Code:
tell application "Adobe Illustrator"
	set filePath to ("Macintosh HD:Users:Philipp:Pictures:Studium:4:Netzwerke:VZ Pics:1.jpg")
	set myDoc to make new document
	set myPosition to {0.0, height of myDoc}
	set myPlacedItem to make new placed item in myDoc with properties {file path:filePath, position:myPosition}
	embed myPlacedItem
	display dialog "Fertig?"
end tell

Komisch dass das auch mit einem "placed item" funzt...