var nme = activeDocument.name
var docRef = app.activeDocument;
Breite= 15.24 //15cm + ein paar Pixel
Breite1= 15.24 //15.25 f. 11,25x15 oder 13.55 f. 13,33x10 bei 4:3
Aufl= 250 //dpi
Pfad = "e:/bilder/"
Kompression = 8
var startRulerUnits = app.preferences.rulerUnits //Lineal-Einstellungen merken
app.preferences.rulerUnits = Units.CM
if (activeDocument.width > activeDocument.height ) { //Bild breit
if (activeDocument.width/activeDocument.height > 1.4) {
activeDocument.resizeImage( Breite , null , Aufl, ResampleMethod.BICUBIC );
displayDialogs = DialogModes.NO;
}
if (activeDocument.width/activeDocument.height < 1.4) {
activeDocument.resizeImage( Breite1 , null , Aufl, ResampleMethod.BICUBIC );
displayDialogs = DialogModes.NO;
}}
if (activeDocument.width < activeDocument.height ) { //Bild hoch
if (activeDocument.height/activeDocument.width > 1.4) {
activeDocument.resizeImage( null, Breite , Aufl, ResampleMethod.BICUBIC );
displayDialogs = DialogModes.NO;
}
if (activeDocument.height/activeDocument.width < 1.4) {
activeDocument.resizeImage( null, Breite1 , Aufl, ResampleMethod.BICUBIC );
displayDialogs = DialogModes.NO; }}
docRef.activeLayer.applyUnSharpMask(164, 0.3, 0);
jpgFile = new File( Pfad + nme )
jpgSaveOptions = new JPEGSaveOptions()
jpgSaveOptions.embedColorProfile = true
jpgSaveOptions.formatOptions = FormatOptions.STANDARDBASELINE
jpgSaveOptions.quality = Kompression
app.activeDocument.saveAs(jpgFile, jpgSaveOptions, true, Extension.LOWERCASE)
app.activeDocument.close(SaveOptions.DONOTSAVECHANGES)
app.preferences.rulerUnits = startRulerUnits //Lineal-Einstellungen wiederherstellen
C:\Programme\Winzip\pkzip.EXE -p -r -n+ -u y:\backup\xls.zip "C:\Dokumente und Einstellungen\*.xls"
C:\Programme\Winzip\pkzip.EXE -p -r -n+ -u y:\backup\doc.zip "C:\Dokumente und Einstellungen\*.doc"
C:\Programme\Winzip\pkzip.EXE -p -r -n+ -u y:\backup\Sonstiges.zip "C:\*.bat" "c:\*.cmd" "c:\*.reg" "c:\*.ini" "d:\*.jsx"
robocopy e:\bilder y:\backup\bilder /MIR
Dim fso, Qfldr, fil, filecoll, filist, folist, subfldr, fldrs, Fldr, Quelle3) Standard-Handler für Laufwerk festlegen. Speicherkarte/Lesegerät mit dem PC verbinden, dann im Explorer Laufwerk anklicken, dann im Kontextmenü/Eigenschaften, den Reiter Autoplay anwählen. Dann oben bei Inhaltstyp Bilder auswählen und " Durchzuführende Aktion auswählen:" ankreuzen und darunter den soeben erstellten Handler "Bilderdownload" auswählen und auf "OK" klicken. Das Ganze funktioniert nicht wenn: nur raw-Dateien und keine jpgs enthalten sind; sich gleichnahmige Bilddateien schon im Zielordner befinden.
Set fso = CreateObject("Scripting.filesystemObject")
Dt = right(formatDateTime(Now, 2),2) & "-"
Quelle = ".\DCIM"
Ziel = "F:\Bilder\"
Set Qfldr = fso.GetFolder(Quelle)
Set fldrs = Qfldr.subFolders
For Each subfldr in fldrs
Fldr = subfldr.Name
Set Fldr = fso.GetFolder(Quelle & "\" & Fldr)
Set filecoll = Fldr.files
For Each fil in filecoll
Alles = cstr(Quelle & "\" & subfldr.Name & "\" & fil.name)
fso.movefile Alles, Ziel & replace(fil.name, "I", Dt)
Next
Next
set fso = nothing
dim wsh
Set wsh = WScript.CreateObject("WScript.Shell")
wsh.run "%systemRoot%\explorer.exe /E," & Ziel
Bilderdownload
eintragen,
Provider kann leer bleiben und bei 'Application' wird
C:\Windows\System32\cscript.exe
(sofern
Windows in c:\windows liegt)
und unter 'Arguments' "%L"Bildtransfer.vbs
eintragen.
An den Seitenanfang | E-Mail an den Autor | Homepage |