Trying to make 7 Tiff files.

Anyone, especially newbies, asking for help with Photoshop Scripting and Photoshop Automation - as opposed to those contributing to discussion about an aspect of Photoshop Scripting

Moderators: Tom, Kukurykus

BRO-PHOTO

Trying to make 7 Tiff files.

Post by BRO-PHOTO »

Hello. I’m a newbie here who would like some help. I work in CS5, Bridge and Lightroom 3. I import all my photos into Lightroom using the date they were created. When I want to process a shot, I create a new folder inside the date folder were all the photos are, for example C:\2011\2011_03_24\Capitol Building, and move the shots into that folder. I make HDR’s so most of the time I work with three bracketed RAW shots from -2, 0 and 2. Here is what I have been trying to do but can’t seem to get it to work for me. Take each shot and open them up in ACR. Save each shot with the Exposure at -1, 0 and +1 to a 16 Bit Tiff into the folder were the original shots are located in. I would also like to have ACR save them with increasing numbers from lightest to darkest. So number 1 will be the RAW +2 shot with the Exposure set to +1, number 2 will be the RAW +2 shot with the Exposure set to 0, and so on. I only need 1 Tiff with the Exposure set to 0 of the RAW shot with 0. The numbering will look like this.

+2 Exposure +1 = 1
+2 Exposure 0 = 2
+2 Exposure -1 = 3
0 Exposure 0 = 4
-2 Exposure +1 = 5
-2 Exposure 0 = 6
-2 Exposure -1 = 7

The way I’ve been doing this is to make 7 Droplets with the action that opens the RAW shot in ACR and makes the Exposure change. These droplets open the image in PS and save them to a Tiff with the correct number. This works but I would love be able to create all the Tiffs in less mouse clicks. After shooting all day and you have over 400 shots the last thing you want to do is drag and drop 400 times.

I did read up a little bit on scripting but didn’t get very far. I made a script open up PS but that’s about as far as I got before I got lost in the programing language. I did work a little with ScriptListener but had no luck. I made an action with the ScriptListener running in the background, open each Raw shot as a smart object in PS and edit them in ACR back into PS and save them to a Tiff with the correct number. I thought it was going to work but after opening ACR it will just sit there waiting for me to make the Exposure change and click done. I would like the entire process to run on its own.

If the Script is done in JavaScript I would be able to make a Droplet that I can drop all the RAW files into and have the action run the script. Is this possible?

Thank.
BRO-PHOTO

Trying to make 7 Tiff files.

Post by BRO-PHOTO »

here is the script that was made with the ScriptListener.

REM =======================================================
DIM objApp
SET objApp = CreateObject("Photoshop.Application")
REM Use dialog mode 3 for show no dialogs
DIM dialogMode
dialogMode = 3
DIM idOpn
idOpn = objApp.CharIDToTypeID( "Opn " )
DIM desc1
SET desc1 = CreateObject( "Photoshop.ActionDescriptor" )
DIM idnull
idnull = objApp.CharIDToTypeID( "null" )
Call desc1.PutPath( idnull, "F:\\PIC\\pic\\pictures by date taken\\2011\\2011_03_24\\stack\\IMG_6273.CR2" )
DIM idAs
idAs = objApp.CharIDToTypeID( "As " )
DIM desc2
SET desc2 = CreateObject( "Photoshop.ActionDescriptor" )
DIM idCMod
idCMod = objApp.CharIDToTypeID( "CMod" )
Call desc2.PutString( idCMod, "Canon EOS 30D" )
DIM idSett
idSett = objApp.CharIDToTypeID( "Sett" )
DIM idSett
idSett = objApp.CharIDToTypeID( "Sett" )
DIM idCst
idCst = objApp.CharIDToTypeID( "Cst " )
Call desc2.PutEnumerated( idSett, idSett, idCst )
DIM idWBal
idWBal = objApp.CharIDToTypeID( "WBal" )
DIM idWBal
idWBal = objApp.CharIDToTypeID( "WBal" )
DIM idAsSh
idAsSh = objApp.CharIDToTypeID( "AsSh" )
Call desc2.PutEnumerated( idWBal, idWBal, idAsSh )
DIM idCtoG
idCtoG = objApp.CharIDToTypeID( "CtoG" )
Call desc2.PutBoolean( idCtoG, False )
DIM idExps
idExps = objApp.CharIDToTypeID( "Exps" )
Call desc2.PutDouble( idExps, 0.000000 )
DIM idShad
idShad = objApp.CharIDToTypeID( "Shad" )
Call desc2.PutInteger( idShad, 5 )
DIM idBrgh
idBrgh = objApp.CharIDToTypeID( "Brgh" )
Call desc2.PutInteger( idBrgh, 50 )
DIM idCntr
idCntr = objApp.CharIDToTypeID( "Cntr" )
Call desc2.PutInteger( idCntr, 25 )
DIM idStrt
idStrt = objApp.CharIDToTypeID( "Strt" )
Call desc2.PutInteger( idStrt, 0 )
DIM idShrp
idShrp = objApp.CharIDToTypeID( "Shrp" )
Call desc2.PutInteger( idShrp, 25 )
DIM idLNR
idLNR = objApp.CharIDToTypeID( "LNR " )
Call desc2.PutInteger( idLNR, 0 )
DIM idCNR
idCNR = objApp.CharIDToTypeID( "CNR " )
Call desc2.PutInteger( idCNR, 25 )
DIM idCAone
idCAone = objApp.CharIDToTypeID( "CA1 " )
Call desc2.PutInteger( idCAone, 0 )
DIM idCAtwo
idCAtwo = objApp.CharIDToTypeID( "CA2 " )
Call desc2.PutInteger( idCAtwo, 0 )
DIM idVigA
idVigA = objApp.CharIDToTypeID( "VigA" )
Call desc2.PutInteger( idVigA, 0 )
DIM idBlkB
idBlkB = objApp.CharIDToTypeID( "BlkB" )
Call desc2.PutInteger( idBlkB, 0 )
DIM idRHue
idRHue = objApp.CharIDToTypeID( "RHue" )
Call desc2.PutInteger( idRHue, 0 )
DIM idRSat
idRSat = objApp.CharIDToTypeID( "RSat" )
Call desc2.PutInteger( idRSat, 0 )
DIM idGHue
idGHue = objApp.CharIDToTypeID( "GHue" )
Call desc2.PutInteger( idGHue, 0 )
DIM idGSat
idGSat = objApp.CharIDToTypeID( "GSat" )
Call desc2.PutInteger( idGSat, 0 )
DIM idBHue
idBHue = objApp.CharIDToTypeID( "BHue" )
Call desc2.PutInteger( idBHue, 0 )
DIM idBSat
idBSat = objApp.CharIDToTypeID( "BSat" )
Call desc2.PutInteger( idBSat, 0 )
DIM idFLit
idFLit = objApp.CharIDToTypeID( "FLit" )
Call desc2.PutInteger( idFLit, 0 )
DIM idVibr
idVibr = objApp.CharIDToTypeID( "Vibr" )
Call desc2.PutInteger( idVibr, 0 )
DIM idHRec
idHRec = objApp.CharIDToTypeID( "HRec" )
Call desc2.PutInteger( idHRec, 0 )
DIM idClar
idClar = objApp.CharIDToTypeID( "Clar" )
Call desc2.PutInteger( idClar, 0 )
DIM idDeFr
idDeFr = objApp.CharIDToTypeID( "DeFr" )
Call desc2.PutInteger( idDeFr, 0 )
DIM idHA_R
idHA_R = objApp.CharIDToTypeID( "HA_R" )
Call desc2.PutInteger( idHA_R, 0 )
DIM idHA_O
idHA_O = objApp.CharIDToTypeID( "HA_O" )
Call desc2.PutInteger( idHA_O, 0 )
DIM idHA_Y
idHA_Y = objApp.CharIDToTypeID( "HA_Y" )
Call desc2.PutInteger( idHA_Y, 0 )
DIM idHA_G
idHA_G = objApp.CharIDToTypeID( "HA_G" )
Call desc2.PutInteger( idHA_G, 0 )
DIM idHA_A
idHA_A = objApp.CharIDToTypeID( "HA_A" )
Call desc2.PutInteger( idHA_A, 0 )
DIM idHA_B
idHA_B = objApp.CharIDToTypeID( "HA_B" )
Call desc2.PutInteger( idHA_B, 0 )
DIM idHA_P
idHA_P = objApp.CharIDToTypeID( "HA_P" )
Call desc2.PutInteger( idHA_P, 0 )
DIM idHA_M
idHA_M = objApp.CharIDToTypeID( "HA_M" )
Call desc2.PutInteger( idHA_M, 0 )
DIM idSA_R
idSA_R = objApp.CharIDToTypeID( "SA_R" )
Call desc2.PutInteger( idSA_R, 0 )
DIM idSA_O
idSA_O = objApp.CharIDToTypeID( "SA_O" )
Call desc2.PutInteger( idSA_O, 0 )
DIM idSA_Y
idSA_Y = objApp.CharIDToTypeID( "SA_Y" )
Call desc2.PutInteger( idSA_Y, 0 )
DIM idSA_G
idSA_G = objApp.CharIDToTypeID( "SA_G" )
Call desc2.PutInteger( idSA_G, 0 )
DIM idSA_A
idSA_A = objApp.CharIDToTypeID( "SA_A" )
Call desc2.PutInteger( idSA_A, 0 )
DIM idSA_B
idSA_B = objApp.CharIDToTypeID( "SA_B" )
Call desc2.PutInteger( idSA_B, 0 )
DIM idSA_P
idSA_P = objApp.CharIDToTypeID( "SA_P" )
Call desc2.PutInteger( idSA_P, 0 )
DIM idSA_M
idSA_M = objApp.CharIDToTypeID( "SA_M" )
Call desc2.PutInteger( idSA_M, 0 )
DIM idLA_R
idLA_R = objApp.CharIDToTypeID( "LA_R" )
Call desc2.PutInteger( idLA_R, 0 )
DIM idLA_O
idLA_O = objApp.CharIDToTypeID( "LA_O" )
Call desc2.PutInteger( idLA_O, 0 )
DIM idLA_Y
idLA_Y = objApp.CharIDToTypeID( "LA_Y" )
Call desc2.PutInteger( idLA_Y, 0 )
DIM idLA_G
idLA_G = objApp.CharIDToTypeID( "LA_G" )
Call desc2.PutInteger( idLA_G, 0 )
DIM idLA_A
idLA_A = objApp.CharIDToTypeID( "LA_A" )
Call desc2.PutInteger( idLA_A, 0 )
DIM idLA_B
idLA_B = objApp.CharIDToTypeID( "LA_B" )
Call desc2.PutInteger( idLA_B, 0 )
DIM idLA_P
idLA_P = objApp.CharIDToTypeID( "LA_P" )
Call desc2.PutInteger( idLA_P, 0 )
DIM idLA_M
idLA_M = objApp.CharIDToTypeID( "LA_M" )
Call desc2.PutInteger( idLA_M, 0 )
DIM idSTSH
idSTSH = objApp.CharIDToTypeID( "STSH" )
Call desc2.PutInteger( idSTSH, 0 )
DIM idSTSS
idSTSS = objApp.CharIDToTypeID( "STSS" )
Call desc2.PutInteger( idSTSS, 0 )
DIM idSTHH
idSTHH = objApp.CharIDToTypeID( "STHH" )
Call desc2.PutInteger( idSTHH, 0 )
DIM idSTHS
idSTHS = objApp.CharIDToTypeID( "STHS" )
Call desc2.PutInteger( idSTHS, 0 )
DIM idSTB
idSTB = objApp.CharIDToTypeID( "STB " )
Call desc2.PutInteger( idSTB, 0 )
DIM idPC_S
idPC_S = objApp.CharIDToTypeID( "PC_S" )
Call desc2.PutInteger( idPC_S, 0 )
DIM idPC_D
idPC_D = objApp.CharIDToTypeID( "PC_D" )
Call desc2.PutInteger( idPC_D, 0 )
DIM idPC_L
idPC_L = objApp.CharIDToTypeID( "PC_L" )
Call desc2.PutInteger( idPC_L, 0 )
DIM idPC_H
idPC_H = objApp.CharIDToTypeID( "PC_H" )
Call desc2.PutInteger( idPC_H, 0 )
DIM idPC_one
idPC_one = objApp.CharIDToTypeID( "PC_1" )
Call desc2.PutInteger( idPC_one, 25 )
DIM idPC_two
idPC_two = objApp.CharIDToTypeID( "PC_2" )
Call desc2.PutInteger( idPC_two, 50 )
DIM idPC_three
idPC_three = objApp.CharIDToTypeID( "PC_3" )
Call desc2.PutInteger( idPC_three, 75 )
DIM idShpR
idShpR = objApp.CharIDToTypeID( "ShpR" )
Call desc2.PutDouble( idShpR, 1.000000 )
DIM idShpD
idShpD = objApp.CharIDToTypeID( "ShpD" )
Call desc2.PutInteger( idShpD, 25 )
DIM idShpM
idShpM = objApp.CharIDToTypeID( "ShpM" )
Call desc2.PutInteger( idShpM, 0 )
DIM idPCVA
idPCVA = objApp.CharIDToTypeID( "PCVA" )
Call desc2.PutInteger( idPCVA, 0 )
DIM idGRNA
idGRNA = objApp.CharIDToTypeID( "GRNA" )
Call desc2.PutInteger( idGRNA, 0 )
DIM idCNRD
idCNRD = objApp.CharIDToTypeID( "CNRD" )
Call desc2.PutInteger( idCNRD, 50 )
DIM idCrv
idCrv = objApp.CharIDToTypeID( "Crv " )
DIM list1
SET list1 = CreateObject( "Photoshop.ActionList" )
Call list1.PutInteger( 0 )
Call list1.PutInteger( 0 )
Call list1.PutInteger( 32 )
Call list1.PutInteger( 22 )
Call list1.PutInteger( 64 )
Call list1.PutInteger( 56 )
Call list1.PutInteger( 128 )
Call list1.PutInteger( 128 )
Call list1.PutInteger( 192 )
Call list1.PutInteger( 196 )
Call list1.PutInteger( 255 )
Call list1.PutInteger( 255 )
Call desc2.PutList( idCrv, list1 )
DIM idCamP
idCamP = objApp.CharIDToTypeID( "CamP" )
Call desc2.PutString( idCamP, "ACR 3.4" )
DIM idCP_D
idCP_D = objApp.CharIDToTypeID( "CP_D" )
Call desc2.PutString( idCP_D, "EDF6CA6378FD73F45A25418873505CED" )
DIM idRtch
idRtch = objApp.CharIDToTypeID( "Rtch" )
Call desc2.PutString( idRtch, "" )
DIM idREye
idREye = objApp.CharIDToTypeID( "REye" )
Call desc2.PutString( idREye, "" )
DIM idLCs
idLCs = objApp.CharIDToTypeID( "LCs " )
Call desc2.PutString( idLCs, "" )
DIM idCrpT
idCrpT = objApp.CharIDToTypeID( "CrpT" )
Call desc2.PutDouble( idCrpT, 0.000000 )
DIM idCrpL
idCrpL = objApp.CharIDToTypeID( "CrpL" )
Call desc2.PutDouble( idCrpL, 0.000000 )
DIM idCrpB
idCrpB = objApp.CharIDToTypeID( "CrpB" )
Call desc2.PutDouble( idCrpB, 0.000000 )
DIM idCrpR
idCrpR = objApp.CharIDToTypeID( "CrpR" )
Call desc2.PutDouble( idCrpR, 0.000000 )
DIM idCrpA
idCrpA = objApp.CharIDToTypeID( "CrpA" )
Call desc2.PutDouble( idCrpA, 0.000000 )
DIM idClrS
idClrS = objApp.CharIDToTypeID( "ClrS" )
DIM idClrS
idClrS = objApp.CharIDToTypeID( "ClrS" )
DIM idSMPT
idSMPT = objApp.CharIDToTypeID( "SMPT" )
Call desc2.PutEnumerated( idClrS, idClrS, idSMPT )
DIM idBtDp
idBtDp = objApp.CharIDToTypeID( "BtDp" )
DIM idBtDp
idBtDp = objApp.CharIDToTypeID( "BtDp" )
DIM idBDonesix
idBDonesix = objApp.CharIDToTypeID( "BD16" )
Call desc2.PutEnumerated( idBtDp, idBtDp, idBDonesix )
DIM idScl
idScl = objApp.CharIDToTypeID( "Scl " )
Call desc2.PutDouble( idScl, 1.000000 )
DIM idRslt
idRslt = objApp.CharIDToTypeID( "Rslt" )
Call desc2.PutDouble( idRslt, 300.000000 )
DIM idReUn
idReUn = objApp.CharIDToTypeID( "ReUn" )
DIM idReUn
idReUn = objApp.CharIDToTypeID( "ReUn" )
DIM idPpIn
idPpIn = objApp.CharIDToTypeID( "PpIn" )
Call desc2.PutEnumerated( idReUn, idReUn, idPpIn )
DIM idOSM
idOSM = objApp.CharIDToTypeID( "OSM " )
DIM idOSM
idOSM = objApp.CharIDToTypeID( "OSM " )
DIM idOSMN
idOSMN = objApp.CharIDToTypeID( "OSMN" )
Call desc2.PutEnumerated( idOSM, idOSM, idOSMN )
DIM idOrnt
idOrnt = objApp.CharIDToTypeID( "Ornt" )
Call desc2.PutInteger( idOrnt, 3 )
DIM idSnap
idSnap = objApp.CharIDToTypeID( "Snap" )
Call desc2.PutString( idSnap, "" )
DIM idAdobeCameraRaw
idAdobeCameraRaw = objApp.StringIDToTypeID( "Adobe Camera Raw" )
Call desc1.PutObject( idAs, idAdobeCameraRaw, desc2 )
DIM idsmartObject
idsmartObject = objApp.StringIDToTypeID( "smartObject" )
Call desc1.PutBoolean( idsmartObject, True )
Call objApp.ExecuteAction( idOpn, desc1, dialogMode )

REM =======================================================
DIM objApp
SET objApp = CreateObject("Photoshop.Application")
REM Use dialog mode 3 for show no dialogs
DIM dialogMode
dialogMode = 3
DIM idplacedLayerEditContents
idplacedLayerEditContents = objApp.StringIDToTypeID( "placedLayerEditContents" )
Call objApp.ExecuteAction( idplacedLayerEditContents, , dialogMode )

REM =======================================================
DIM objApp
SET objApp = CreateObject("Photoshop.Application")
REM Use dialog mode 3 for show no dialogs
DIM dialogMode
dialogMode = 3
DIM idsave
idsave = objApp.CharIDToTypeID( "save" )
DIM desc3
SET desc3 = CreateObject( "Photoshop.ActionDescriptor" )
DIM idAs
idAs = objApp.CharIDToTypeID( "As " )
DIM desc4
SET desc4 = CreateObject( "Photoshop.ActionDescriptor" )
DIM idBytO
idBytO = objApp.CharIDToTypeID( "BytO" )
DIM idPltf
idPltf = objApp.CharIDToTypeID( "Pltf" )
DIM idIBMP
idIBMP = objApp.CharIDToTypeID( "IBMP" )
Call desc4.PutEnumerated( idBytO, idPltf, idIBMP )
DIM idlayerCompression
idlayerCompression = objApp.StringIDToTypeID( "layerCompression" )
DIM idEncd
idEncd = objApp.CharIDToTypeID( "Encd" )
DIM idRLE
idRLE = objApp.StringIDToTypeID( "RLE" )
Call desc4.PutEnumerated( idlayerCompression, idEncd, idRLE )
DIM idTIFF
idTIFF = objApp.CharIDToTypeID( "TIFF" )
Call desc3.PutObject( idAs, idTIFF, desc4 )
DIM idIn
idIn = objApp.CharIDToTypeID( "In " )
Call desc3.PutPath( idIn, "F:\\PIC\\pic\\pictures by date taken\\2011\\2011_03_24\\stack\\7.tif" )
Call objApp.ExecuteAction( idsave, desc3, dialogMode )

REM =======================================================
DIM objApp
SET objApp = CreateObject("Photoshop.Application")
REM Use dialog mode 3 for show no dialogs
DIM dialogMode
dialogMode = 3
DIM idslct
idslct = objApp.CharIDToTypeID( "slct" )
DIM desc5
SET desc5 = CreateObject( "Photoshop.ActionDescriptor" )
DIM idnull
idnull = objApp.CharIDToTypeID( "null" )
DIM ref1
SET ref1 = CreateObject( "Photoshop.ActionReference" )
DIM idLyr
idLyr = objApp.CharIDToTypeID( "Lyr " )
Call ref1.PutName( idLyr, "IMG_6273" )
Call desc5.PutReference( idnull, ref1 )
DIM idMkVs
idMkVs = objApp.CharIDToTypeID( "MkVs" )
Call desc5.PutBoolean( idMkVs, False )
Call objApp.ExecuteAction( idslct, desc5, dialogMode )

REM =======================================================
DIM objApp
SET objApp = CreateObject("Photoshop.Application")
REM Use dialog mode 3 for show no dialogs
DIM dialogMode
dialogMode = 3
DIM idplacedLayerEditContents
idplacedLayerEditContents = objApp.StringIDToTypeID( "placedLayerEditContents" )
Call objApp.ExecuteAction( idplacedLayerEditContents, , dialogMode )

REM =======================================================
DIM objApp
SET objApp = CreateObject("Photoshop.Application")
REM Use dialog mode 3 for show no dialogs
DIM dialogMode
dialogMode = 3
DIM idsave
idsave = objApp.CharIDToTypeID( "save" )
DIM desc6
SET desc6 = CreateObject( "Photoshop.ActionDescriptor" )
DIM idAs
idAs = objApp.CharIDToTypeID( "As " )
DIM desc7
SET desc7 = CreateObject( "Photoshop.ActionDescriptor" )
DIM idBytO
idBytO = objApp.CharIDToTypeID( "BytO" )
DIM idPltf
idPltf = objApp.CharIDToTypeID( "Pltf" )
DIM idIBMP
idIBMP = objApp.CharIDToTypeID( "IBMP" )
Call desc7.PutEnumerated( idBytO, idPltf, idIBMP )
DIM idlayerCompression
idlayerCompression = objApp.StringIDToTypeID( "layerCompression" )
DIM idEncd
idEncd = objApp.CharIDToTypeID( "Encd" )
DIM idRLE
idRLE = objApp.StringIDToTypeID( "RLE" )
Call desc7.PutEnumerated( idlayerCompression, idEncd, idRLE )
DIM idTIFF
idTIFF = objApp.CharIDToTypeID( "TIFF" )
Call desc6.PutObject( idAs, idTIFF, desc7 )
DIM idIn
idIn = objApp.CharIDToTypeID( "In " )
Call desc6.PutPath( idIn, "F:\\PIC\\pic\\pictures by date taken\\2011\\2011_03_24\\stack\\5.tif" )
Call objApp.ExecuteAction( idsave, desc6, dialogMode )

REM =======================================================
DIM objApp
SET objApp = CreateObject("Photoshop.Application")
REM Use dialog mode 3 for show no dialogs
DIM dialogMode
dialogMode = 3
DIM idplacedLayerEditContents
idplacedLayerEditContents = objApp.StringIDToTypeID( "placedLayerEditContents" )
Call objApp.ExecuteAction( idplacedLayerEditContents, , dialogMode )

REM =======================================================
DIM objApp
SET objApp = CreateObject("Photoshop.Application")
REM Use dialog mode 3 for show no dialogs
DIM dialogMode
dialogMode = 3
DIM idsave
idsave = objApp.CharIDToTypeID( "save" )
DIM desc8
SET desc8 = CreateObject( "Photoshop.ActionDescriptor" )
DIM idAs
idAs = objApp.CharIDToTypeID( "As " )
DIM desc9
SET desc9 = CreateObject( "Photoshop.ActionDescriptor" )
DIM idBytO
idBytO = objApp.CharIDToTypeID( "BytO" )
DIM idPltf
idPltf = objApp.CharIDToTypeID( "Pltf" )
DIM idIBMP
idIBMP = objApp.CharIDToTypeID( "IBMP" )
Call desc9.PutEnumerated( idBytO, idPltf, idIBMP )
DIM idlayerCompression
idlayerCompression = objApp.StringIDToTypeID( "layerCompression" )
DIM idEncd
idEncd = objApp.CharIDToTypeID( "Encd" )
DIM idRLE
idRLE = objApp.StringIDToTypeID( "RLE" )
Call desc9.PutEnumerated( idlayerCompression, idEncd, idRLE )
DIM idTIFF
idTIFF = objApp.CharIDToTypeID( "TIFF" )
Call desc8.PutObject( idAs, idTIFF, desc9 )
DIM idIn
idIn = objApp.CharIDToTypeID( "In " )
Call desc8.PutPath( idIn, "F:\\PIC\\pic\\pictures by date taken\\2011\\2011_03_24\\stack\\6.tif" )
Call objApp.ExecuteAction( idsave, desc8, dialogMode )

REM =======================================================
DIM objApp
SET objApp = CreateObject("Photoshop.Application")
REM Use dialog mode 3 for show no dialogs
DIM dialogMode
dialogMode = 3
DIM idCls
idCls = objApp.CharIDToTypeID( "Cls " )
Call objApp.ExecuteAction( idCls, , dialogMode )

REM =======================================================
DIM objApp
SET objApp = CreateObject("Photoshop.Application")
REM Use dialog mode 3 for show no dialogs
DIM dialogMode
dialogMode = 3
DIM idCls
idCls = objApp.CharIDToTypeID( "Cls " )
DIM desc1
SET desc1 = CreateObject( "Photoshop.ActionDescriptor" )
DIM idSvng
idSvng = objApp.CharIDToTypeID( "Svng" )
DIM idYsN
idYsN = objApp.CharIDToTypeID( "YsN " )
DIM idN
idN = objApp.CharIDToTypeID( "N " )
Call desc1.PutEnumerated( idSvng, idYsN, idN )
Call objApp.ExecuteAction( idCls, desc1, dialogMode )
Mike Hale

Trying to make 7 Tiff files.

Post by Mike Hale »

A couple of questions.

What version of Photoshop are you using?

Do you want the script to process all the raw files from a shoot at once? If so, how would the script know which raw files are part of one image set and which bracket - does the filenames reflect that info?

The scriptlistener log output if from the VB log. You want a javascript, right?
BRO-PHOTO

Trying to make 7 Tiff files.

Post by BRO-PHOTO »

Adobe Photoshop CS5 Extended
Version 12.0 x32

It would be nice to have all the raw file process at once but I’m having trouble thinking of a way to do it. the file names kind of reflect it. the way my camera works is it takes the normal exposure first. So it would be the file with the lowest number of the 3 raw files taken. The second shot is the -2 and the third is the +2. I realize if the script was made to use the order the raw files are taken in I can’t dump more than three at one time but it would work. ACR does display some information of the shot. f/stop, ISO speed and a few others, and I’m not sure if there is a way to pull the information from a shot saying which bracketed shot it was. If there is, could the script have an, if it’s -2 than make one exposure +1 and save it to 1 and so on. If not, I would be happy to get it to make three Tiff from one raw file. With one Tiff that has an exposure at +1, 0 and -1 using just the ARC or by opening the raw file up in PS as a smart object and editing it in ARC.

Yes, I would like it in javascript so I can make a droplet with an action running the script in PS. I should be able to just drop a file into the droplet and it would make the three Tiff’s in the folder were the raw file is.
Mike Hale

Trying to make 7 Tiff files.

Post by Mike Hale »

Using your example, all the images from the Capitol Building shoot would be in the folder C:\2011\2011_03_24\Capitol Building. Say there are 15 raw files in that folder. When sorted by filename the first three would be brackets of one shot in order of N, -2, +2. The next three would be a different shot in the same order. Is that right?

A while back I helped someone with a script that would create a multi layer photomerged document using bracketed images. Each layer used photomerge to merge three different images of the same exposure bracket. i.e. the bottom layer is a merged layer of the -2 bracket. The middle layer normal. And the top layer +2. I know you don't need photomerge but if the images are in order( by filename, dateCreated, etc ) it should be possible to create a script that would process the entire folder in one pass.

Let me see if I can find that old script as a starting point to see if I can come up with something for you. It may take a few days.
BRO-PHOTO

Trying to make 7 Tiff files.

Post by BRO-PHOTO »

You are right about the order of the shots.

I’m in no hurry and I really appreciate your help Mike.
Mike Hale

Trying to make 7 Tiff files.

Post by Mike Hale »

Sorry, I took way too long to do this for you.

Code: Select all// this expects the raw files to be in order of exposure by name
// the order is normal, under, over. It stacks the raw files in 7 layers
// under -1, under 0, under =1, normal 0, over -1, over 0, over +1
// so goes from darkest at bottom ot lightest at top of stack then saves as tiff
// will process in sets of three until all raw files are processed
// for Windows. To use on Mac you need to change the getFiles argument
var sourceFolder = Folder.selectDialog("Select a folder to process",Folder('~/desktop'));
if( sourceFolder != null ){
   var files = sourceFolder.getFiles(/\.cr2$/i);// get an array of raw files
   files.sort();// sort so will be in order
   while(files.length > 2){
      var setArray = files.splice(0,3);// get the first three files from the array
      var mainDoc = openRawWithSettings( setArray[1] , -1 );// start with least exposure
      var tempDoc = openRawWithSettings( setArray[1] , 0 );
      tempDoc.activeLayer.duplicate(mainDoc);
      tempDoc.close(SaveOptions.DONOTSAVECHANGES);
      var tempDoc = openRawWithSettings( setArray[1] , 1 );
      tempDoc.activeLayer.duplicate(mainDoc);
      tempDoc.close(SaveOptions.DONOTSAVECHANGES);
      var tempDoc = openRawWithSettings( setArray[0] , 0 );// normal exposure
      tempDoc.activeLayer.duplicate(mainDoc);
      tempDoc.close(SaveOptions.DONOTSAVECHANGES);
      var tempDoc = openRawWithSettings( setArray[2] , -1 );// over exposure
      tempDoc.activeLayer.duplicate(mainDoc);
      tempDoc.close(SaveOptions.DONOTSAVECHANGES);
      var tempDoc = openRawWithSettings( setArray[2] , 0 );
      tempDoc.activeLayer.duplicate(mainDoc);
      tempDoc.close(SaveOptions.DONOTSAVECHANGES);
      var tempDoc = openRawWithSettings( setArray[2] , 1 );
      tempDoc.activeLayer.duplicate(mainDoc);
      tempDoc.close(SaveOptions.DONOTSAVECHANGES);
      var saveName = setArray[0].name.match(/(.*)(\.[^\.]+)/)[1]+'.tif';
      var savePath = setArray[0].parent+'/'+saveName;
      SaveAsTIFF( savePath, true, true );
      mainDoc.close(SaveOptions.DONOTSAVECHANGES);
   }
}

function openRawWithSettings( f , exp ) {// file object , float
   var desc1 = new ActionDescriptor();
      desc1.putPath( stringIDToTypeID('null'), f );
   var desc2 = new ActionDescriptor();
      desc2.putEnumerated(charIDToTypeID('Sett'), charIDToTypeID('Sett'), charIDToTypeID('Img '));
      desc2.putEnumerated( charIDToTypeID('ClrS'), charIDToTypeID('ClrS'), charIDToTypeID('SMPT' ));// Adobe RGB
      desc2.putEnumerated( charIDToTypeID('BtDp'), charIDToTypeID('BtDp'), charIDToTypeID('BD8 ') );//Bit depth 8
      desc2.putDouble( charIDToTypeID('Scl '), 1);// native size
      desc2.putDouble( charIDToTypeID('Rslt'), 300 );// resolution
     desc2.putDouble( charIDToTypeID('Exps'), exp );
      desc2.putEnumerated( charIDToTypeID('ReUn'), charIDToTypeID('ReUn'), charIDToTypeID('PpIn'));
      desc1.putObject( charIDToTypeID('As  '), stringIDToTypeID("Adobe Camera Raw"), desc2);
   executeAction( charIDToTypeID('Opn '), desc1, DialogModes.NO );
   return app.activeDocument;
};
function SaveAsTIFF( inFileName, inEmbedICC, inLZW ) {
    var tiffSaveOptions = new TiffSaveOptions();
      tiffSaveOptions.embedColorProfile = inEmbedICC;
      if ( inLZW ) {
     tiffSaveOptions.imageCompression = TIFFEncoding.TIFFLZW;
    } else {
     tiffSaveOptions.imageCompression = TIFFEncoding.NONE;
    }
    app.activeDocument.saveAs( File( inFileName ), tiffSaveOptions );
}