Here's my current javascript:
#target photoshop
// sets document preferences to inches
app.preferences.rulerUnits = Units.INCHES
// these are our values for the END RESULT width and height (in inches) of our image
var fWidth = 11.73;
var fHeight = 5.97;
var CurrentDLPFile=app.activeDocument
var CurrentDLPFileName= CurrentDLPFile.name
var CurrentDLPFilePath="~/Desktop/fetch"
var f = File.saveDialog('Save Where?','');
// in case we double clicked the file
app.bringToFront();
// resizes the canvas to 11.73 x 5.97 inches
CurrentDLPFile.resizeCanvas(UnitValue(fWidth,"in"),UnitValue(fHeight,"in"));
// flattens all layers
CurrentDLPFile.flatten();
// saves as photoshop file
if (f!=null) CurrentDLPFile.saveAs(f,undefined);
// splits channels
CurrentDLPFile.splitChannels();
// converts active K seperation to bitmap form
var bitsaveoptions = new BitmapConversionOptions()
bitsaveoptions.method = BitmapConversionType.HALFTONESCREEN
bitsaveoptions.angle = 45
bitsaveoptions.frequency = 55
bitsaveoptions.resolution = 300
bitsaveoptions.shape = BitmapHalfToneType.ROUND
app.activeDocument.changeMode(ChangeMode.BITMAP,bitsaveoptions);
// THIS IS WHERE I'M HAVING ISSUES- I want to save the file (which at this point is a bmp), with a suffix of 1 in the same folder; and then close the file.
var doc = app.activeDocument;
var docName = doc.name;
docName = docName.match(/(.*)(\.[^\.]+)/) ? docName = docName.match(/(.*)(\.[^\.]+)/):docName = [docName, docName];
var suffix = '_1';
var saveName = new File(decodeURI(doc.path)+'/'+docName[1]+suffix+'.bmp');
function saveFile(app.activeDocument, saveName);