app.activeDocument.placeGuns.loadPlaceGun(myFile); myFile.close();
#targetengine "session" var dialog = new Window("palette"); dialog.text = "Text Platzieren"; dialog.preferredSize.width = 200; dialog.orientation = "column"; dialog.alignChildren = ["center","top"]; dialog.spacing = 10; dialog.margins = 16; var _load = dialog.add("button"); _load.text = "Platziere mal"; _load.justify = "center"; var _close = dialog.add("button"); _close.text = "Schließen"; _close.justify = "center"; _close.alignment = ["right","top"]; dialog.show(); _close.onClick = function () { dialog.close(); } _load.onClick = function () { _platzieren() } function _platzieren() { var myText = "Mein Text ..."; var myFile = new File(Folder.desktop + "/myTxt.txt"); myFile.open('w'); myFile.write(myText); myFile.close(); app.activeDocument.placeGuns.loadPlaceGun(myFile); myFile.remove(); //Ab hier warten, bis TR platziert ist und nächste Aktion ausführen }