Using RAW+JPEG stacking script, but can't get JPEG as default thumbnail for stack. Help!

I am currently using this script I found elsewhere on Adobe forums. However, doing this function only will stack everything with the raw files on top. I am using a 5D MKIII now and Bridge CS4 can't generate the CR2 previews, so I need JPEGs to see what a file is for general editing. How do I get this stack script to put the JPEGS on top instead of the raw files?
(script originally posted by Paul Riggot in another forum)
#target bridge  
   if( BridgeTalk.appName == "bridge" ) { 
AutoStack = MenuElement.create("command", "Auto Stack", "at the beginning of submenu/Stack", "zx1");
AutoStack.onSelect = function () {
   stackEm();
function stackEm(){
app.document.sorts = [{ name:"name",type:"string", reverse:false}];
var jpgs = Folder(app.document.presentationPath).getFiles ("*.jpg");
app.document.deselectAll();
for(var a in jpgs){
var Name = decodeURI(jpgs[a].name).replace(/\.[^\.]+$/, '');
var stacks = Folder(app.document.presentationPath).getFiles(Name+".*");
if(stacks.length < 2) continue;
for(var z in stacks){ app.document.select(new Thumbnail(stacks[z]));}
StackFiles();
app.document.deselectAll();
function StackFiles(){
app.document.chooseMenuItem('submenu/Stack');
app.document.chooseMenuItem('StackGroup');

I wonder if you have time if you could test this script for me please?
What it does (tries to do) is to create JPGs from the raw files in the same folder as the CR2 (raw) files.
N.B. IT WILL OVERWRITE ANY JPGS IN THE SAME FOLDER IF THE NAMES MATCH!
So please try it on a folder with raw files only.
The idea being it might be quicker to generate jpegs from the embedded thumbnail rather than shoot both raw/jpg?
T.I.A.
#target bridge  
if( BridgeTalk.appName == "bridge" ) { 
AutoStackJpgs = MenuElement.create("command", "Create Stack JPGs", "at the beginning of submenu/Stack", "sj1");
AutoStackJpgs .onSelect = function () {
app.document.deselectAll();
var items = app.document.getSelection("crw,cr2,tiff,raw,rw2,dng,nef,orf,erf,mos,dcr,raf,srf,pef,x3f");
for (var a =0; a<items.length;a++){
var JPEG = new File(items[a].path.substr(0,items[a].path.lastIndexOf ('.'))+".jpg");
tempFile=new File(items[a].path);
var fileString='';
tempFile.open('r');
tempFile.encoding = 'BINARY';
fileString=tempFile.read();
tempFile.close();
for(var w =0;w<6;w++){
var startJpg=fileString.search(/\xFF\xD8\xFF/);
if(startJpg != -1){
if(testJPG()){
var endJpg = fileString.search(/\xFF\xD9/);
fileString = fileString.substr(0,endJpg+2);
JPEG.open('w');
JPEG.encoding = 'BINARY';
JPEG.write(fileString);
JPEG.close();
var newThumb = new Thumbnail(JPEG);
newThumb.rotation = items[a].rotation;
break;
}else{
fileString = fileString.substr(20);
continue;
function testJPG(){
var result=false;
fileString = fileString.substr(startJpg);
var endTest = fileString.search(/\xFF\xD9/);
if(endTest > 204800 ? result= true : result= false);
return result;

Similar Messages

  • I can run a slide show using apple tv and itunes but can't get the slides to run in a specific order

    I can run a slideshow (of pictures) using Apple TV and ITunes but can't get the pictures to run in the order I set them up with in my hard drive directory

    Welcome to the Apple Community.
    Websites and third party Apps need enabling before they will allow AirPlay of Video content. Some Website/App developers have not enabled their products, some simply haven't got around to it yet, others have stated that they won't be enabling AirPlay (likely as a result of licensing issues).
    I have created a User Tip to list Apps that have been tested with Video Airplay, if you have any Apps that you have tested please leave details in the comments at the bottom of the User Tip or email me if you don't have commenting privileges.

  • Itunes error message "file cannot be found..." I know the file is somewhere since I find it when I do a system search and it plays, but can't get itunes to see it.  Any help?

    itunes error message "file cannot be found..." I know the file is somewhere since I find it when I do a system search and it plays, but can't get itunes to see it.  Any help?

    Hello pwithero,
    The following article details the process of indicating to iTunes the correct location for the affected file.
    iTunes: Finding lost media and downloads
    http://support.apple.com/kb/TS1408
    Cheers,
    Allen

  • Want to use iphone 4s as ipod but can't get past activation

    My brother sent his iPhone 4s in to have a replacement.  When he got the new one back he never used it and he closed his account with ATT.  He has a work phone that is paid for him now and doesn't need it.  I asked him if he'd send it to me to use.  I wanted to use it as an iPod, but I can't get past the activation.  I'm being told by the phone that I need a sim card to activate it but I don't have a sim and I have phone service already so I don't need to go get it turned on.  It's a perfect little piece of equipment that I'd love to use but I can't.  Can anyone please help me?

    USING AN IPHONE AS AN IPOD
    Restore your phone as new.  Place a SIM card into the phone and connect it your computer with iTunes open and follow the activation assistant to activate the iphone.  Once the iphone have been activated remove the SIM card and turn on imessage in settings/messages.  Only your Apple ID should appear in the “You can be reached by imessage at” and “Start new conversation from” fields.  Read the following article for help http://support.apple.com/kb/HT3406

  • HT5649 when i connect my iphone to my pc, itunes is not recognizing it.  PC is authorized but can't get phone to show up.  Any help or suggestions on how to fix?

    When I connect my iphone to itunes it does not appear under devices.  Can't get the two to connect and pc is authorized.  Any suggestions?

    Hello Lori,
    It sounds like your iPhone is not being seen in iTunes anymore. I recommend the troubleshooting steps from the article named:
    iOS: Device not recognized in iTunes for Windows
    http://support.apple.com/kb/ts1538
    Here is an overview of the troubleshooting to be done:
    1. Update iTunes
    2. Check the USB cable
    3. Verify that Apple Mobile Device Support is installed
    4. Restart the Apple Mobile Device Service
    5. Verify that the Apple Mobile Device USB Driver is installed
    6. Check for third-party software conflicts
    If the issue persists, try uninstalling iTunes and its associated apps with this article:
    Removing and reinstalling iTunes and other software components for Windows Vista, Windows 7, or Windows 8
    http://support.apple.com/kb/ht1923
    Thank you for using Apple Support Communities.
    Regards,
    Sterling

  • Bought used ipo touch 5th gen but can't get it to work with my library

    hi bought used 5th gen ipod touch on ebay but it doesn't show in my library when i connect it all i get on the ipod is a message saying do you trust this computer when i prees yes nothing happens.

    Is your account listed in Settings>iCloud? If not y ohave to first delete the iCloud account from the iPod by going to the bottom of the screen. You have to enter the password for the listed ID. That is part of the Activation Lock
    iCloud: Find My iPhone Activation Lock in iOS 7
    Withou that or without getting the previous owner to remove the device from their account
    Find My iPhone Activation Lock: Removing a device from a previous owner’s account
    The iPod is not usable to you. If you can get either of the above two thnks done. restore the iPPod via iTunes and set it up with your account
    iTunes: Restoring iOS software

  • Just downloaded the 7.1 IOS update and I'm able to stream my music from the cloud. Does this use up data and how can I get it to stop pausing for periods of time?

    Just downloaded the 7.1.1 IOS update and I'm able to stream my music from the cloud. I'm wondering how I can stream more than just my purchased music?And does this use up data? Also, how can I get playback to stop pausing for periods of time? It is a wifi thing??

    If streaming music when connected to your carrier's cellular network, it uses cellular data.
    Only the music you purchased from the iTunes Store can be streamed unless you have purchased iTunes Match.
    If there is a slow down at the server where the music is stored or high traffic, steaming can be paused. You can also download a song from the iTunes Store cloud to your iPhone so it doesn't need to be steamed.

  • I recently purchased an airport extreme base station. I want to replace my older linksys wireless router. I had a successful set up but can not get it to talk to broadband modem, I am missing something but what?

    I recently purchased an airport extreme to replace my older linksys wireless router. had a successful set up but can not get connected to the internet. for some reason, which I am sure is apparent to others, i am missing some needed info to connect to the dsl broadband modem that I have.  would love some good tips.

    Try this:
    Turn off or remove power from the DSL model, the router, and your computer. Wait not less than one minute. Restore power to the modem and wait until the status lights indicate a connection to the ISP. Next, restore power to the router and wait until the status light shows connection to the modem. Last, turn on the computer. Check your Network preferences to be sure they are configured for a DHCP connection and that the router has received a valid IP address (not 169.xxx.xxx.xxx).

  • I am a first time user trying to download a movie to my PC. I created and verified my apple ID, but can't get into the itunes store.

    I am a first time user trying to download a movie to my PC. I created and verified my apple ID, but can't get into the itunes store. Please help.

    Why not?  What, if any, errors are occurring when trying to access the itunes store?
    Is iTunes actually installed?

  • I recently purchased a camera that creates RAW files not currently acceptable to my PS CS5I downloaded Adobe Camera RAW 6.7 but can't get it to process my RAW files.

    I am on a Mac running OS 10.9.5.  I run Photoshop CS5 12.1 x64. When I tried to download AdobeCamerRaw -6.7 I got a message the AdobePatchinstaller couldn't be opened because the identity of the developer cannot be confirmed.  I then changed the settings in my system preferences to permit the opening of the AdobePatchinstaller.  I then closed bridge and phootshop, restarted them, but no luck.  When I view my images in Bridge I see the thumbnails of my jpg images, but instead of thumbnails of the RAW images I just get a a thumbnail that says RAW and a picture of a jewelers loop over a couple of snapshots. I used Grab to capture that logo-like thumbnail, but can't get it into this page.

    What brand and model of camera do you have?

  • I have a packardbell laptop with photoshop elements 8 installed from new. I have used it on several occasions but I cannot get it to run now.  When I open a photo using elements the Adobe box pops up saying that the programme has unexpectedley quit? can a

    I have a packardbell laptop with photoshop elements 8 installed from new. I have used it on several occasions but I cannot get it to run now.  When I open a photo using elements the Adobe box pops up saying that the programme has unexpectedley quit? can anyone help me please as I have several photos to edit before the end of this month. Many thanks for any help

    The "restore disk" is built into the Mac. See About Recovery.
    Need more specifics about what error messages you got while installing Adobe Flash.
    However, you can almost avoid Flash altogether by setting YouTube to play the HTML5 version instead.
    Click the Try something new! link at the bottom of the YouTube page.
    I don't know about the sound issue. Might be hardware as you think. Try other headphones to check.

  • My itunes is on an old computer.  So old that I can't update it and so Haven't used it in two years.  How can I move it to my new laptop and make sure this doesn't happen again?  Very frustrated that I've spend $$ but can't get my music.

    My itunes is on an old computer.  So old that I can't update it and so Haven't used it in two years.  How can I move it to my new laptop and make sure this doesn't happen again?  Very frustrated that I've spend $$ but can't get my music.
    I want so set up itunes on my laptop and make sure that I get all of my old music and any music shared from my sons' itunes accounts.  Do I have to set up itunes on my new laptop first and then use the same logins?  Really concerned about losing any music, etc.

    These are two possible approaches that will normally work to move an existing library to a new computer.
    Method 1
    Backup the library with this User Tip.
    Deauthorize the old computer if you no longer want to access protected content on it.
    Restore the backup to your new computer using the same tool used to back it up.
    Keep your backup up-to-date in future.
    Method 2
    Connect the two computers to the same network. Share your <User's Music> folder from the old computer and copy the entire iTunes library folder into the <User's Music> folder on the new one. Again, deauthorize the old computer if no longer required.
    Both methods should give the new computer a working clone of the library that was on the old one. As far as iTunes is concerned this is still the "home" library for your devices so you shouldn't have any issues with iTunes wanting to erase and reload.
    I'd recommend method 1 since it establishes an ongoing backup for your library.
    Note if you have failed to move contacts and calendar items across you should create one dummy entry of each in your new profile and iTunes should  merge the existing data from the device.
    If your media folder has been split out from the main iTunes folder you may need to do some preparatory work to make it easier to move. See make a split library portable.
    Should you be in the unfortunate position where you are no longer able to access your original library or a backup then then see Recover your iTunes library from your iPod or iOS device for advice on how to set up your devices with a new library with the maximum preservation of data.
    tt2

  • Thanks so much for the offer of help. I'm using 10.9.2 OSX. I have Numbers 2.3 (554). I tried the new version but it was "dumbed down" so much (to make it usable on multiple platforms) that it was of no use on iMac.   I still can't get my contacts to open

    Thanks so much for the offer of help. I'm using 10.9.2 OSX. I have Numbers 2.3 (554). I tried the new version but it was "dumbed down" so much (to make it usable on multiple platforms) that it was of no use on iMac.
    I still can't get my contacts to open in Numbers like they used to do. I have a group of five addresses in a test folder in Mail called "untitled group." But no amount of pasting, dragging, etc can get them to open up in Numbers. My "real" folder has almost 100 addresses so I can't do it one by one.
    Thoughts?
    Thanks again.
    Bob

    Bob,
    You can place contacts in a table In Numbers by the following methods:
    Numbers 2.3:
    drag from contacts
    Numbers 3.2
    copy from contacts, then paste into Numbers
    In both cases you need to open System preferences, then select the "Security & Privacy panel and allow Numbers aaccess your contacts information.

  • I just got iphone 5c and i am not happy with it. It uses to much data and i don't even know how. I can't get the ringtones i want for my contacts.I got it on my free upgrade but i want to take it back and get something else but where i got it they say i c

    I just got iphone 5c and i am not happy with it. It uses to much data and i don't even know how. I can't get the ringtones i want for my contacts.I got it on my free upgrade but i want to take it back and get something else but where i got it they say i can't because i don't have the earbuds and i have serches or them. now i am suck with a phone i don't like at all until my next upgrade. this is very dishearten

    1. If you are this unhappy with that phone, and the lost earbuds is the only thing stopping you from taking it back, why do not just buy some earbuds. That way you can get rid of that phone. It all depend upon how much you want to get rid of that phone.
    2. Yet if you are stuck with that iPhone, here is something might help you to control the data usage. By design, iPhones do turn off WiFi when they go dormant. So if a download is in progress and so forth when the phone goes dormant, it will switch to use cellular data, if this setting is left on. Therefore, from multi-sources I have learned that if you keep your iPhone connected to a power source, then it will stay connected to the available WiFi.

  • I use an Epson Stylus Office BX320FW printer with my IMac.  Since upgrading OSX, I have lost the ability to print and scan.  I have downloaded printer drivers from both Epson and Apple.  I am using the printer in wifi mode but can not get it print or scan

    Hi Everybody,
    I use an Epson Stylus Office BX320FW printer with my IMac.  Since upgrading OSX, I have lost the ability to print and scan.  I have downloaded printer drivers from both Epson and Apple.  I am using the printer in wifi mode but can not get it print or scan.  How do I uninstall the Epson software and start all over again?
    nickel_man_65

    Not using any mouse pad, I have a very smooth desktop. But I just tried to use a sheet of A4 printing paper, but no result, the problem persisted.
    Someone on this forum suggested, that USB3 may interfere with the magic mouse.
    I have 2 LaCie HDD's about 70 cm away from the mouse, I use them on Thunderbolt. But in operation or not - the result is the same, the mouse plays up! Just now I was clicking the desktop and the mouse created a new folder!!
    Thanks for the advice, Bee
    Cheers, Gerd

Maybe you are looking for