I have the following code, obtained by using the Photoshop Script Listener plug-in:
In JavaScript:
// =======================================================
var idDlt = charIDToTypeID( "Dlt " );
executeAction( idDlt, undefined, DialogModes.NO );
or alternatively in VisualBasic:
REM =======================================================
DIM objApp
SET objApp = CreateObject("Photoshop.Application")
REM Use dialog mode 3 for show no dialogs
DIM dialogMode
dialogMode = 3
DIM idDlt
idDlt = objApp.CharIDToTypeID( "Dlt " )
Call objApp.ExecuteAction( idDlt, , dialogMode )
I'm interfacing with Photoshop using python and win32com. I've been largely successful in translating this into python. But in one spot I'm stuck.
My question is, how do I represent the "undefined" in that last line (the second of the three arguments passed to ExecuteAction) ?
import win32com.client
objApp = win32com.client.Dispatch("Photoshop.Application")
#Set dialog mode to none
dialogMode = 3
idDlt = objApp.CharIDToTypeID( "Dlt " )
# none of these work.... how do I express this "undefined" ?
objApp.ExecuteAction( idDlt, undefined, dialogMode )
objApp.ExecuteAction( idDlt, "undefined", dialogMode )
objApp.ExecuteAction( idDlt, , dialogMode )
objApp.ExecuteAction( idDlt, None, dialogMode )
objApp.ExecuteAction( idDlt, dialogMode )
I also tried creating an ActionDescriptor and passing that in as the second argument, but not sure how to make it "undefined". Still got errors.
Please help!