How do I write a script to set maximum pixel dimensions?

I need to batch process JPGs and limit the maximum dimension to 500 px. This has to apply to the largest side of the image, either height or width. The other side should auto size proportionately. I'm currently having to make these size changes manually. I haven't found any script language or function that will let me set the largest pixel size to 500 px, regardless of which dimension is the largest.
Example:
1. If the image is 1000 px w x 750 px h, I want the script to resize the image proportionately for the largest side, changing the width to 500 px
2. If the image is 750 px w x 1000 px h, I want the script to change the height to 500 px and the proportions conform accordingly for the width
Any ideas are grately welcomed.
Thanks,
Linda

Create an action that use File - Automate - Fit Image.
I think there may still be a bug that this should fix....
http://www.ps-scripts.com/bb/viewtopic.php?f=10&t=3370&p=15152&hilit=don%27t+enlarge+fit+i mage&sid=ea73e8349aaf965015a4a351340e865d#p15152

Similar Messages

  • How can I write a script for set left indent?

    In three cases as below:
    for example:
    left indent:8mm; first indent:0mm
    left indent:0mm; first indent:8mm
    left indent:8mm; first indent:-8mm
    How can I write a script to tell Indesign, wherever the text indent is, each time when I run the script once, the text can put just a step rightward, and “one step = 8mm”.
    Please!

    Hi, Trevor
    I use change by list as below:
    grep {leftIndent:48mm} {leftIndent:56mm}
    grep {leftIndent:40mm} {leftIndent:48mm}
    grep {leftIndent:32mm} {leftIndent:40mm}
    grep {leftIndent:24mm} {leftIndent:32mm}
    grep {leftIndent:16mm} {leftIndent:24mm}
    grep {leftIndent:8mm} {leftIndent:16mm}
    grep {firstLineIndent:8mm, leftIndent:48mm} {firstLineIndent:8mm, leftIndent:56mm}
    grep {firstLineIndent:8mm, leftIndent:32mm} {firstLineIndent:8mm, leftIndent:48mm}
    grep {firstLineIndent:8mm, leftIndent:24mm} {firstLineIndent:8mm, leftIndent:32mm}
    grep {firstLineIndent:8mm, leftIndent:16mm} {firstLineIndent:8mm, leftIndent:24mm}
    grep {firstLineIndent:8mm, leftIndent:8mm} {firstLineIndent:8mm, leftIndent:16mm}
    grep {firstLineIndent:-8mm, leftIndent:48mm} {firstLineIndent:-8mm, leftIndent:56mm}
    grep {firstLineIndent:-8mm, leftIndent:32mm} {firstLineIndent:-8mm, leftIndent:48mm}
    grep {firstLineIndent:-8mm, leftIndent:24mm} {firstLineIndent:-8mm, leftIndent:32mm}
    grep {firstLineIndent:-8mm, leftIndent:16mm} {firstLineIndent:-8mm, leftIndent:24mm}
    grep {firstLineIndent:-8mm, leftIndent:8mm} {firstLineIndent:-8mm, leftIndent:16mm}
    but not that perfect,
    I want to useing jave "if{}" or "for{}" to write this script, but I don't kown the syntext.

  • How do I write a script to prepopulate a date

    I have a two page form.  The first page has a current date at the top of the form.  On the second page there is a date object that I would like to prepopulate 21 days from the current date on top of page one.  How do I write a script?  I am very new at this and have only a couple days to figure this out.  Thank you

    Hi,
    in the exit:Event of the 1st date field add this FormCalc script:
    DateField2 = Num2Date(Date2Num($.formattedValue, "DD.MM.YYYY") + 21, "DD.MM.YYYY")
    You may have to change th date pattern  "DD.MM.YYYY" in the way you need it.

  • How Can I write a script for change first indent?

    How can I write a java script to tell indesign:
    what ever the text first indent is, I want to change first indent =
    1) 8mm
    2) 0mm
    3)-8mm (if left indent is 0, change the first indent to 8mm, and then change first indent = -8)
    3 scripts
    Please someone help me, please!

    Hi hasive, thank you for your responses, thank you very much,
    I need three scripts
    1st script, I want to set the first indent to 8mm;
    2nd script, I want to set the first indent to -8 mm, but if the left indent is 0, please set the left indent to >8mm then set the first indent to -8mm;
    3rd, I want to set the first to 0mm, if the first indent is 8mm or -8mm;
    thank you
    Harvey

  • How to create the Sap script & Layout Set (wants sample code)

    Hi All ,
    Can you please provide me the step by step procedure
    to create the Sap script & Layout Set .(please provide sample
    code/links /docs for layout & print program).
    Regards
    Rahul

    hi,
    go through the following links  what i found to create sap script.
    http://www.thespot4sap.com/Articles/SAPscript_Introduction.asp
    http://abapliveinfo.blogspot.com/2008/01/free-sapscript-made-easy-46-book.html
    http://www.thespot4sap.com/articles/SAPscript_example_code.asp
    http://idocs.de/www3/cookbooks/sapscript/sapscript_1/docu.htm
    http://idocguru.com/www5/cookbooks/sapscript/sapscript_1/example.htm
    www.geocities.com/wardaguilar25/sapscript-tutorial.html
    http://logosworld.de/www3/cookbooks/sapscript/sapscript_8/docu.htm
    how to create a  scripts?give steps?
    https://forums.sdn.sap.com/click.jspa?searchID=1811669&messageID=2969311
    https://forums.sdn.sap.com/click.jspa?searchID=1811669&messageID=2902391
    https://forums.sdn.sap.com/click.jspa?searchID=1811669&messageID=3205653
    https://forums.sdn.sap.com/click.jspa?searchID=1811669&messageID=3111402
    http://www.sap-img.com/sapscripts.htm
    http://sappoint.com/abap/
    http://www.henrikfrank.dk/abapexamples/SapScript/sapscript.htm
    http://help.sap.com/saphelp_crm40/helpdata/en/16/c832857cc111d686e0000086568e5f/content.htm
    http://www.sap-basis-abap.com/sapabap01.htm
    http://www.sap-img.com/sapscripts.htm
    http://searchsap.techtarget.com/tip/1,289483,sid21_gci943419,00.html
    http://sap.ittoolbox.com/topics/t.asp?t=303&p=452&h2=452&h1=303
    http://www.sapgenie.com/phpBB2/viewtopic.php?t=14007&sid=09eec5147a0dbeee1b5edd21af8ebc6a
    Other Links

  • Is there a way to switch between workspaces in Spaces from the command line?  I want to write a script to set up certain applications in certain workspaces (without having to do it manually each time)...

    Is there a way to switch between workspaces in Spaces from the comnand line?  I use several workspaces from Spaces, each workspace having a certain number of fixed applications running.  Rather than set all this up each time I log on, I'd like to write a script from the command line (I use gawk) to automate this. Currently I have a gawk script that, given a directory, opens a few xterms whose working directory is the given directory, and opens "preview" applied to a certain file in that directory.  However, at present I have to manually move an xterm through each workspace and run my gawk script in each workspace (applied to each directory that I'm working on).
    There must be a better way...

    Addendum: Can this be done via:   open -a Spaces --args xxx  , where xxx is some set of arguments (or something like this)?

  • How can I write a script to regularly transfer a file between two iMacs on a network?

    I keep all our family photo files (iPhoto Library) on my wife's iMac.  Because we can't share the library simultaneously, I want to automate the copying of the library from her iMac to mine say, once a week in the wee hours (it's a big file). Both of our iMacs are on our common (wired) home network.  Is there a way to write a script that will accomplish that?  If it matters, we both maintain independent external backup drives and use 'Time Machine' judiciously.  Thanks in advance for any guidance!!!

    Hi Paul,
    http://fmforums.com/forum/topic/85381-applescript-to-copy-file-from-network-volu me/
    http://stackoverflow.com/questions/5134568/copy-a-file-in-applescript

  • How can I write a script or create a macro for gaming.

    Now I know this may be a petty and or silly question for most apple users but I am going to throw it out there anyway. I play an online game called Battle Pirates. When you make an attack you have up to 5 ships to control. I am looking for a way to control multiple ships with a "macro" or "script" and using only 1 key. For example: Select ship 2, 3, and 4 while leaving ship 1 and 5 alone. Yea I know it is childish but indulge me. Hahaha.
    I know you can write Macros with Windows and you can even use something called "Auto Hotkey". I just wanted to see if anyone knew of a way to do this with what Apple already has in place. What I have commonly found out with Apple products is that since I have come from being a Windows user to Apple, I usually overthink the process. LOL. Mac's are soooooo much easier....if you know where to start.
    Any help would be greatly appreciated! By the way, I have read the tutorial on "Script Editor" but I am having trouble understanding it mostly because you kinda would have to have SOME programming knowledge. Obviously I lack in that area. Thanks for bearing with me.

    Can you expand on that? How do you use automator in your game? Can you give me a rough idea of how and what you do with it? I have watched a tutorial on Automator and it seems more useful for documents.

  • Bridge CS6: How do you write a script to assign a shortcut to "Batch" and "Image Processor"?

    Many times a day I need to access "Batch" and "Image Processor" in Bridge.
    There is no shortcut, so I have to go the Tools-Photoshop-Batch and Tools-Photoshop-Image Processor menu - the items I need are locked into a second level menu.
    Which is impractical.
    I remember, when I started out with Photoshop many years ago, I downloaded "Deke Keyes" from Deke McClelland, which included keystrokes for "Batch" and "Image Processor".
    From the Bridge forum I learned that you cannot assign shortcuts in Bridge CS6.
    So the general opinon was that a script was used to assign the shortcuts.
    Could you please tell me how to do that?
    Thanks!
    PS: I tried to assign shortcuts via the Mac OS X Mountain Lion keyboard preferences (applications), but it did not work.

    Hi,
    in the exit:Event of the 1st date field add this FormCalc script:
    DateField2 = Num2Date(Date2Num($.formattedValue, "DD.MM.YYYY") + 21, "DD.MM.YYYY")
    You may have to change th date pattern  "DD.MM.YYYY" in the way you need it.

  • How to i write a script that makes multiple selections in a pdf and exports them to excel?

    I have a large number of PDFs
    Not all the PDFs contain information we need. We want to be able to automate a script that extracts certain info from the PDFs and opens them in a certain format in excel.
    Acrobat allows me to make a single selection and export as excel.
    How do i export multiple parts to excel from the pdfs and ensure that the resulting excel is in a format that i can use without much fixing needed (e.g. merged cells)?

    This type of process can't really be done using JavaScript. You would need to read the contents of the file, word by word, decide (based on some logic) what data to extract, and then collect it and at the end export to a plain-text file. Not a simple process...

  • How do I COMBINE Post Script font sets?

    Okay... I have a fair amount of fonts. But an annoying number of them are the exact same font, but with different parts of the same whole.
    (I'm using Font Explorer X, btw. And the missing screenfonts ina set are indicated in red)
    For instance, one PS version of Arial has:
    normal
    italic
    bold (red)
    black (red)
    And the next version of Arial has:
    Arial has:
    normal (red)
    italic (red)
    bold
    black
    This problem is the same in FontBook and Suitcase, btw.
    Thanks in advance,
    e

    See these:
    Font Management in OS X
    http://images.apple.com/pro/pdf/L311277AFontTTv4.pdf
    http://www.creativetechs.com/tips/SVC-fonts/Fonts-2007-SVC.pdf
    http://dl.extensis.com/downloads/SC/EN/P/FontsBest_Practices_inOSX.pdf
    http://www.macworld.com/article/44942/2005/05/julyworkingmac.html

  • How to auto-update of script logics after adding new dimension members?

    Hi Experts,
    Just wanna ask if BPC has a functionality that would automatically update/validate and save my script logic whenever I add new dimension members. I've added new PL accounts but they are not automatically added to my calculated BS Net Income. I had to re-validate and save my logic for it to be included in my logic and for the amounts to be computed correctly.
    Thanks,
    Marvin

    Hi Marvin,
    There is no functionality as such. we need to configure the script as and when we make any changes in the dimension members.
    Regards
    Raman

  • How to write a script to ask the streaming video (FLV) to do something after it is finised playing...

    How do I write a script to ask a streaming video to go to
    play a next movie clip or to do something after it is finised
    playing automatically?

    follow the link here to get the fla example which I have just
    embeded a movie file straight on the root timeline and then I add
    another layer for scripting. look at the last frame of the timeline
    where I have add a very simple gotoAndPlay script.
    hope ths is what u looking for. otherwise you really need to
    get flash 8. or hopefully someone coming along on this forum and
    solve the MX problem for you.
    good luck.
    http://www.lauthiamkok.net/scripting_languages/ActionScript/Flash_8/video%20object/
    get this file - embeded video.fla

  • Can someone help me write a script for Soundbooth

    If I have 50 files in C:\MyMusic and want to
    Match Volume in Soundbooth CS5 how can I write a script to do that?

    The only other way I've seen to do this with a library of that size is SoundConverter by Steve DeKorte. It would be time consuming to do, but there is a feature to "normalize volume" on all files being converted. Th other drawback is that as long as you are " converting" from mp3 to mp3, you have to save the "converted" files to a different directory. It won't overwrite during the normalization process.
    I had a library of more than 92,000 songs in 14,000 folders and 46,000 subfolders  up till last October. I had gone through it twice to "clean up and mormalize" it over six years' time. The transport seized on the drive as I was preparing to back everything up on DVD, and I was unable to recover the data on the discs when it happened. I was duly distraught when I lost all that music, but as I look back onthe last eight months, I've had a lot less hassles from "tinkering" with all those files all the time.

  • How Can I write Script for Indesign set left indent

    I really need two scripts for indesign set left indent:
    1. If the left indent is: 8, 16, 24, 32, 40, 48, 56mm... set the first -8mm; if the left indent is 0, set the left indent 8mm, first -8mm.
    2. Whatever the first indent is, set the first 8mm.
    Can someone help me?

    Hi, Trevor
    I use change by list as below:
    grep {leftIndent:48mm} {leftIndent:56mm}
    grep {leftIndent:40mm} {leftIndent:48mm}
    grep {leftIndent:32mm} {leftIndent:40mm}
    grep {leftIndent:24mm} {leftIndent:32mm}
    grep {leftIndent:16mm} {leftIndent:24mm}
    grep {leftIndent:8mm} {leftIndent:16mm}
    grep {firstLineIndent:8mm, leftIndent:48mm} {firstLineIndent:8mm, leftIndent:56mm}
    grep {firstLineIndent:8mm, leftIndent:32mm} {firstLineIndent:8mm, leftIndent:48mm}
    grep {firstLineIndent:8mm, leftIndent:24mm} {firstLineIndent:8mm, leftIndent:32mm}
    grep {firstLineIndent:8mm, leftIndent:16mm} {firstLineIndent:8mm, leftIndent:24mm}
    grep {firstLineIndent:8mm, leftIndent:8mm} {firstLineIndent:8mm, leftIndent:16mm}
    grep {firstLineIndent:-8mm, leftIndent:48mm} {firstLineIndent:-8mm, leftIndent:56mm}
    grep {firstLineIndent:-8mm, leftIndent:32mm} {firstLineIndent:-8mm, leftIndent:48mm}
    grep {firstLineIndent:-8mm, leftIndent:24mm} {firstLineIndent:-8mm, leftIndent:32mm}
    grep {firstLineIndent:-8mm, leftIndent:16mm} {firstLineIndent:-8mm, leftIndent:24mm}
    grep {firstLineIndent:-8mm, leftIndent:8mm} {firstLineIndent:-8mm, leftIndent:16mm}
    but not that perfect,
    I want to useing jave "if{}" or "for{}" to write this script, but I don't kown the syntext.

Maybe you are looking for

  • Doesn't slide to unlock in my iPad

    My iPad is not slide the " slide to unlock " when the message box says " Find my iPad alert ", doesn't tap the ok. When I restart using Home Button and Sleep/Wake Button, doesn't slide the " slide to unlock " and I see the "Find my iPad alert", my iP

  • HT5621 I want to reset my password

    My nane is lezin evens my ID is [email protected] I want to change my password because more friend use My password

  • "ServiceLayer Module has stopped working" in Vista

    Hi all My PC Suite was working just fine until recently when this error message repeatedly pops up - "ServiceLayer Module has stopped working". The only way to stop it is to terminate the PC Suite in processes on the Windows Task Manager. I have unin

  • NMAS based token for radius authentication towards checkpoint firewall

    hi, i'm looking for token based access towards a checkpoint firewall. i found out about radius, and think that's the way to go. our user administration is NW65SP2 & Edir 8.7.3 based. has anyone a success story about a token based radius server based

  • Problem about CL_ABAP_TYPEDESCR

    Hi Buddies,    There was a strange problem which I encountered today.When I called the method cl_abap_typedescr=>describe_by_data to obtain the components of the table DD01T, the length of each component of this table was doubled.After I used this co