Hi all,
I was wondering if anyone knew a way to bypass a format dialog window that pops up on file opening in a script. Basically we have an Esko workflow server that automates the batch processing of files on dedicated remote machine during the day. The problem is it will get hung up waiting on the dialog box every time a ct file is open. Once the preferences for ink solidity are set for the plugin open dialog, we never really change them. We just hit enter and go on our merry way.
I was wondering if there was any way to simulate the hitting of enter in a script when the dialog box opens so the script can do its work and process the files? Or any other ideas for getting around this obstacle. I've attached a screen cap. Thanks in advance.
Any way to "hit enter" to bypass file format open dialog?
-
Mike Hale
Any way to "hit enter" to bypass file format open dialog?
I don't have access to that type of file to test this suggestion but you could try using scriptlistener to record opening one of those files. It could be that it will record the needed preferences. Then all you have to do is turn that scriptlistener code into a function with a file object as an argument. Then use that new function in place of whatever you are using now to open the file.
-
JaysonHazelbaker
Any way to "hit enter" to bypass file format open dialog?
I got my hopes on this one...this is what I get when I open a CT and click OK. Seems pretty standard, yes? I'm hoping someone at Esko can throw me a bone...would be great to get past this hurdle.
Code: Select all// =======================================================
var idOpn = charIDToTypeID( "Opn " );
var desc1 = new ActionDescriptor();
var idnull = charIDToTypeID( "null" );
desc1.putPath( idnull, new File( "/Volumes/JaysonDMG/TestScript/dummy.ct" ) );
executeAction( idOpn, desc1, DialogModes.NO );
Code: Select all// =======================================================
var idOpn = charIDToTypeID( "Opn " );
var desc1 = new ActionDescriptor();
var idnull = charIDToTypeID( "null" );
desc1.putPath( idnull, new File( "/Volumes/JaysonDMG/TestScript/dummy.ct" ) );
executeAction( idOpn, desc1, DialogModes.NO );
-
Mike Hale
Any way to "hit enter" to bypass file format open dialog?
Well scriptlistener isn't going to be of any help with this.
One other thing you can try is record opening a file in an action. I would create a new action set and only have the one open action in that set. After you record the action, try playing it back to see if it opens the file without a dialog. If it does you can use one of Xbytor's xtools scripts to convert the action into javascript. Then you can modify that javascript so it will open any ct file.
Let me know if you need help with the action to javascript conversion if the action approach works.
One other thing you can try is record opening a file in an action. I would create a new action set and only have the one open action in that set. After you record the action, try playing it back to see if it opens the file without a dialog. If it does you can use one of Xbytor's xtools scripts to convert the action into javascript. Then you can modify that javascript so it will open any ct file.
Let me know if you need help with the action to javascript conversion if the action approach works.