Please help - rewrite script to affect all the files in the folder, not one (Photoshop, JavaScript)
Hey guys ,.
I don't know much about scripts, but I managed to put together a script that takes the *.ps (postscript) file, open it in photoshop with some settings and then save it in two sizes in two different folders in jpeg. But unfortunately, it only affects a single file *.ps (in a specified path). I have hundreds of these *.ps files and just thinking about opening one makes me dizzy is it possible that I could choose folder with all these *.ps files and script would make these changes to all of them?
I'd appreciate any help .
Here is my script:
Open the file with parameters 1050x750px + rgb eps
var epsOpts = new EPSOpenOptions();
epsOpts.antiAlias = true;
epsOpts.mode = OpenDocumentMode.RGB;
epsOpts.resolution = 72;
epsOpts.constrainProportions = true;
epsOpts.width = new UnitValue (1050, "px")
var f = new File ("C: / monchemin/myfile.ps '");
App.Open (f, epsOpts);
Save 1050px
var doc = app.activeDocument;
var Path = ' C: / monchemin/resize/1050 /';
var Name = doc.name.replace (/ \.) [ ^\.] +$/, '');
var saveFile = file (path + "/" + Name + ".jpg");
SaveJPEG (saveFile, 12);
function SaveJPEG (saveFile, jpegQuality) {}
jpgSaveOptions = new JPEGSaveOptions();
jpgSaveOptions.embedColorProfile = true;
jpgSaveOptions.formatOptions = FormatOptions.STANDARDBASELINE;
jpgSaveOptions.matte = MatteType.NONE;
jpgSaveOptions.quality = jpegQuality;
activeDocument.saveAs (saveFile, jpgSaveOptions, true, Extension.LOWERCASE);
}
resize to 360px
app.activeDocument.resizeImage ("360 pixels", "257 pixels", 72, ResampleMethod.BICUBIC);
Save 360px
var doc360 = app.activeDocument;
var Path360 = ' C: / monchemin/resize/360 /';
var Name360 = doc.name.replace (/ \.) [ ^\.] +$/, '');
var File = saveFile360 (Path360 + "/" + Name360 + '.jpg');
SaveJPEG360 (saveFile360, 12);
function SaveJPEG360 (saveFile360, jpegQuality) {}
jpgSaveOptions = new JPEGSaveOptions();
jpgSaveOptions.embedColorProfile = true;
jpgSaveOptions.formatOptions = FormatOptions.STANDARDBASELINE;
jpgSaveOptions.matte = MatteType.NONE;
jpgSaveOptions.quality = jpegQuality;
activeDocument.saveAs (saveFile360, jpgSaveOptions, true, Extension.LOWERCASE);
}
Close the file
app.activeDocument.close (SaveOptions.DONOTSAVECHANGES);
Thanks in advance !
This would be an alert for each file in the formats defined in the selected folder.
Of course, you can insert the code you need in the clause for.
Var folder = Folder.selectDialog ("select folder");
If {(Folder)
Uses of the var = theFolder.getFiles (/ \.) (jpg) | TIF | EPS | PSD | (ch) / $i);
for (var m = 0; m< thefiles.length;="" m++)="">
Alert (theFiles [m])
};
};
Tags: Photoshop
Similar Questions
-
Today, all of a sudden my text in ae had real crazy, ALL the text in the ae is either typed as strange shapes, btw my version is a former ae cs3 is on but it never gave me any problems, I don't know how it happened, I cleared the cache and still notin happened.ive attached an image where I typed the entire alphabet without space... ND is became that... PLEASE HELP ME
Well, you have a pt 40 35 text px...
Mylenium
-
Dreamweaver CS6 when connecting it to the external style sheet, it doesn't affect all the html page. It started to happen after upgrading to mac osx elcapitan.
have no idea how to solve this? now I write all my css stylesheet in the head section of my html page.
Thanks for help
Best regards
the problem has been resolved.
I forgot to write rel = "stylesheet", that was the problem.
-
Script to find all the VMS with dates/no tools installed.
Hey,.
I need help guys. I need a script that finds all VMS in vCenter which do not have the tools installed or tools or outdated. I also need the script to generate the following data in a CSV file. Name of the virtual machine and the State of the tools (not installed or outdated).
Thank you guys.
Good suggestion. 'Get-View - ViewType VirtualMachine' is much faster than ' Get - VM | Get-View»
You inspired me to go at maximum speed. So I moved all the filtering also to the cmdlet Get-View. The following script is used in my environment about 30% faster than what you suggested. My first script took me 1 minute 50 seconds. Your script 1,624 seconds. And the following script 1,110 seconds in an environment with about 500 virtual machines...
Get-View -ViewType VirtualMachine -Property Name,Guest.ToolsStatus -Filter @{ "Config.Template"="False";"Guest.ToolsStatus"="toolsNotInstalled|toolsNotRunning|toolsOld"} | ` Select-Object @{N="Name";E={$_.Name}},@{Name="ToolsStatus";E={$_.Guest.ToolsStatus}} | ` Export-CSV -Path VmToolsStatus.csv -NoTypeInformation -UseCulture
"Config.Template"="False" filter models so that you get only the virtual machines.
"Guest.ToolsStatus"="toolsNotInstalled | toolsNotRunning | toolsOld" returns invited with ToolsStatus toolsNotInstalled or toolsNotRunning or toolsOld.
Thanks to Eric Wannemacher to show me how to use regular expressions in a Get - view filter in his blogpost: VMware PowerCLI and Get-View filters.
-
I have a dell computer, it has axtra D drive for drive & utilities I have mistakanly loaded two times I remove and reinstall please help / ps its low memory, see the
Hello
(1) what exactly are you trying to delete?(2) what exactly you are trying to re - install?(3) exactly where do you get this memory low message?The reader might be for backup and could have copied data on the same, thanks to which it shows a low space.
You can contact Dell technical support for assistance by following this link:
http://support.Dell.com/Hope this information is useful. -
Hi, I, m need Adobe Photoshop CC 2015 offline trial version Installer. Please help me. How to download the version from the adobe web site offline?
First read the important instructions on this page.
-
Hi, can I have Adobe CC Installer offline all the product? One of my PC cannot access the internet. Please give the link to download?
Please see Adobe CC 2015 Direct Download Links: Creative Cloud 2015 Release | ProDesignTools. Read the very important instructions before downloading the product.
This will download only the versions of Basic. For updates, please visit all updates of Adobe CC 2015: Direct Download links for Windows | ProDesignTools for Windows or , updates all Adobe CC 2015: the Direct links to download for Mac OS | ProDesignTools for Mac.
Concerning
Hervé Khare
-
How to format individual images in Dreamweaver CC without affecting all the other images used?
Whenever I have format a picture, the change affects all the other images on the site. Is there a way to format a single image?
Give it a unique ID (1 x per page) or the name of the reusable class in your CSS. XXX corresponds to the value in pixels.
CSS:
ID
IMG #ID {width: xxxpx}
name of the reusable class
IMG. className {width: xxxpx}
HTML:
or
Nancy O.
-
Please help with instalation cz Design Premium CS5 files
I need a link to download the Czech of Adobe Design Premium CS5 version. I have the original software, keys, and the new book, but I do not have the instalation files there. Please help me.
Available downloadable Setup files:
- Suites and programs: CC 2015 | CC 2014 | CC | CS6 | CS5.5 | CS5 | CS4, CS4 Web Standard | CS3
- Acrobat: DC, XI, X | 9,8 | 9 standard | 8 standard
- Captivate: 9 | 8 | 7 | 6 | 5.5, 5 | 1
- Cold Fusion: 11: 10 | 9.0.2 version 9.0.0, 9.0.1, 8.0.1, 8.0.0, 7.0, 6.1, 6.0, 5.0, 4.0
- Contribute: CS5 | CS4, CS3 | 3,2
- FrameMaker: 12, 11, 10, 9, 8, 7.2
- Lightroom: 6.1.1 . 6| 5.7.1| 5 | 4 | 3
- Photoshop Elements: 14 | 13 | 12 | 11, 10 | 9,8,7 win | 8 mac | 7 mac
- Premiere Elements: 14 | 13 | 12 | 11, 10 |
Download and installation help links Adobe
Help download and installation to Prodesigntools links can be found on the most linked pages. They are essential; especially steps 1, 2 and 3. If you click on a link that does not have these listed steps, open a second window by using the link to Lightroom 3 to see these "important Instructions".
-
Please help me - enough to edit a pdf file - how can it be done? Thanks - John
Please help me - enough to edit a pdf file - how can it be done? Thanks - John
No way with just the free reader. Can be done to some extent in Acrobat. Major changes, it is better to do them in the original file (the one which the PDF has been made), producing a new PDF file when you are finished.
-
How to make all the fields on one page read only (for the recipient) without having to make each field read-only?
Hello Jmbtexas4,
By default, you will need to individually click on the fields of the form and check the 'read only' and save it. From now on, it is not possible to select all together and make the changes.
-Usman
-
How can I print a copy of the files in a folder - not each file - just the list
original title: list of print files
How can I print a copy of the files in a folder - not each file - just the list? List of cases of printing
How can I print a copy of the files in a folder - not each file - just the list?
Karen's directory printer (free)
-
Apple music stops after playing a song!
I use windows 10 and the latest itunes on my laptop. He stops playing after one, sometimes two songs... radio too... Please help.
I installed and all new authorized...
Thank you...
Markus
same thing here for all my Mac or PC windows... they are "working" 8 months later... unreal
-
I used all of my concert and I have not yet told MY ipad! Please help I don't want to reset my iPad so I loose all my data gamecenter games.
Hello
Try a reboot press & hold the power button / stop & menu button
Hold both for 30 seconds.
You won't lose any data.
See you soon
Brian
-
Create a script to list all the .bat and .cmd files with the dir command &
Hello
Im trying to create a script that will list all the .bat and .cmd files in a specific folder and add the data to a new file (file.txt) - example below:
dir c:\>desktop\file.txt/OD
dir d:\>>desktop\file.txt
dir f:\jobs\*.bat>>desktop\file.txt/ODIM able to search the F drive and the list of all the .bat files using a generic parameter, but ideally id like to search for .bat and .cmd files, but whenever I have it try does not work. Any ideas?
I tried the following:
dir c:\>desktop\file.txt/OD
dir d:\>>desktop\file.txt
dir f:\jobs\*.bat,*.cmd>>desktop\file.txt/ODAny help is appreciated, the reason for which I need to check all the .bat and .cmd files is to ensure that the scripts on a cluster are all data, so need them all listed in a doc if possible
Thank you
Hello
Thank you for visiting the Microsoft answers community site. Your question of Windows 7 is more complex than what is generally answered in the Microsoft Answers forums. It is better suited for guys official script Forum. Please ask your question in the official Scripting Guys Forum.
http://social.technet.Microsoft.com/forums/en-us/iTCG/threads
Maybe you are looking for
-
Case of Structure / while loop problems
Hello I am trying to write a code that draws a random number whenever a key is pressed. The chart must be a random number on the y axis and the number of times that the button is pressed on the x-axis. I want to draw the last twenty random numbers.
-
The Selphy CP900 is compatible with iOS7? Mine is no longer connect to the internet after installing iOS7 on my iPad.
-
my hp does not go fast and I don't know what to do
-
Is it possible to have a 22 character product key?
Install Vista Ultimate. Is it possible to have a 22 character product key or does that mean that it is a counterfeit copy? At all holograms, security threads, etc. Original title: install Vista Ultimate. Is it possible to have a 22 character produ
-
Should UHVVHQWLHV I do to activate windows vista, which has already been used on another pc
I recently removed my hard drive of a computer toshiba laptop that is is no longer in use, but the custom of software windows vista activate as it says it is already in use. But it is not in use on any other pc now. Installation disks are toshiba ori