This content has been marked as final. Show 3 replies
Nice to see that someone else is using K4 scripting.
The easiest solution is to start InDesign by Applescript.
tell application "Adobe InDesign CS3"
k4 log in k4 user name "rf" k4 password "mysecretpassword"
If you want to log in automatically after InDesign is started (the usual way) you need to define an eventlistener. As far as I can tell there is no event afterStart. But you can define a beforeNew or a beforeOpen event. Like this:
var myEventListener = app.addEventListener("beforeNew", K4Login, false);
This way ID would try to log in before creating a new document. (It works. I have tested it.)
Of course you would need to create a dummy document... You could also try a menu action...
I am able to check in and check out the existing files in K4 using java scripting. Wat i am trying to do is to check in new files into K4 as layouts. The command that i use is
app.documents.K4InitDatabaseData( K4ObjectType.K4_LAYOUT_OBJECT, "137102182");
where the number 137102182 is the id of the publication.
This command is not working. Am i doing something wrong or do I need to add any more commands to check in my active document into K4 as layout.