Need Help in Scripting Turning Off JPEG Processing in ACR

Back in 2005 (Win PS CS) I wrote a javascript script which allows me to batch add captions, headlines, author, etc to JPEG image files.  When CS3 came along I found I needed to turn off ACRs JPEG processing before I ran the script and on again after the script ran.  I now need to do the same thing for PS CS4 and soon CS5.  I have tried to create two (one off - another for on) actions to do that but they don't appear to work.  Can this be done by an action?  If it can done by an action can it be scripted?
I want to thank Michael L. Hale for the great code below which worked in PS CS3:
// Oct 3, 2007 this code from from Michael L Hale - Adobe Forums - Photoshop Scripting
// This code allows one to determine and/or set the state of jpeg file handling in ACR
// (i.e. get current user setting for edit->pref->file handling->file compatibility->prefer Adobe Camera Raw for JPEG files.
// Usage: cameraRawJPEG(bool)
//   JpegState = cameraRawJPEG();  // true if open jpegs in ACR is on, else false
//    cameraRawJPEG(false);  // turns OFF "open jpegs in ACR"
//    cameraRawJPEG(true);  // turns ON "open jpegs in ACR"
    var ref = new ActionReference();
    ref.putProperty( charIDToTypeID( "Prpr" ), charIDToTypeID( "FlSP" ) );
    ref.putEnumerated( charIDToTypeID( "capp" ), charIDToTypeID( "Ordn" ), charIDToTypeID( "Trgt" ) );
    if(bool != undefined && bool.constructor == Boolean){
        var desc = new ActionDescriptor();
        desc.putReference( charIDToTypeID( "null" ), ref );
        var desc1 = new ActionDescriptor();
        desc1.putBoolean( stringIDToTypeID( "cameraRawJPEG" ), bool );
        desc.putObject( charIDToTypeID( "T   " ), charIDToTypeID( "FlSv" ), desc1 );
        executeAction( charIDToTypeID( "setd" ), desc, DialogModes.NO );
    return executeActionGet(ref).getObjectValue(charIDToTypeID( "FlSP" )).getBoolean(stringIDToTypeID( "cameraRawJPEG" ));
Using the scriptlistener I was able to get the code below, but it doesn't work. I think for the same reason that regular actions Edit --> Preferences -->Camera Raw -->Jpeg & Tiff Handling -->Disable JPEG support  doesn't work:
// ===ACR JPEG Off ====================================================
function ACR_JPEG_Off() {
var idDlt = charIDToTypeID( "Dlt " );
    var desc3 = new ActionDescriptor();
    var idnull = charIDToTypeID( "null" );
        var ref2 = new ActionReference();
        var idActn = charIDToTypeID( "Actn" );
        ref2.putName( idActn, "jpeg-off" );
        var idASet = charIDToTypeID( "ASet" );
        ref2.putName( idASet, "Default Actions" );
    desc3.putReference( idnull, ref2 );
  executeAction( idDlt, desc3, DialogModes.NO );
  return;

Thanks Michael!  I hoped you'd respond. The CS4 ACR JPEG support interface has changed from CS3, so that may be why you code doesn't work.
I don't think I copied the log file incorrectly, but I can try again.  Can you please please explain your original script - I can't quite get it.
I also tried just using an action - Edit-->Preferences-->Camera Raw-->JPEG & Tiff Handling -->Disable JPEG support but that doesn't work.  I wonder if I need to set both the JPRG and Tiff settings to make it work???
Thanks,
Steve

Similar Messages

  • I need an application which turn off wifi automaticly when my Ipod Toch is locked (for save battery charge), i hate every time to turn it off manually please help ASAP!!!

    I need an application which turn off WiFi automaticly when my Ipod Toch is locked (for save battery charge)
    I hate every time to turn it off manually when I go sleep please help ASAP!!!
    If I forget to turn of wifi on my device after my 8hour dream it's battery will be discharged. and ofcourse alert do not ring. pls help urgent!!!
    Thanks

    Suggestion:
    Turn off your device before bed.

  • Need help to find out link between process order and purchase order.

    Hi All,
    Need help to find out link between process order and purchase order.
    We have purchase order, we can find out associated process order in MD09 (No Purchase Requisition found in Purchase order). When I tired to replicate this scenario with same material in system but not able to do.
    Please suggest me what needs to check to get purchase order link to process order.. (this is not subcontracting )
    Edited by: SAP PQ on Sep 26, 2011 5:24 PM
    Thanks,
    SAP PQ
    Edited by: SAP PQ on Sep 26, 2011 5:24 PM

    MD09 is pegging. In SAP pegging is dynamic, meaning that there's no fixed link between purchase order and process order in your case.
    This is why you did not get the same result when you tried again later.
    Such a link can exist only if you do direct procurement for the order.

  • Need help , when we turn on the mac i can hear the fan and there is a picture of the world flashing for about a minute or 2 on start up . But the fan I can hear non stop ?

    need help , when we turn on the mac i can hear the fan and there is a picture of the world flashing for about a minute or 2 on start up . But the fan I can hear non stop ?

    A flashing question mark or globe appears when you start your Mac

  • How to turn off OSB process

    Hi,
    I have two OSB processes (Proxy,Messaging and BS) which are activated in the session.Now I want to turn off one of them. Is it possible to do it or do I need to delete the corresponding proxy+business process?
    Another question-If I have a running OSB process and if say transformation fails, then how do I debug it? I have seen the "Test Console" however i will be used only when we supply the data if I am not wrong!
    Any pointers would be helpful?
    Regards
    Prabal

    You can not turn-off an OSB service. OSB Service are stateless.
    Use Eclipse Workshop and OSB 10gR3. With this release you can debug OSB services.
    http://download.oracle.com/docs/cd/E13159_01/osb/docs10gr3/userguide/appendixdebugging.html
    Marc

  • Help me please, turn off trouble

    Hi.. I need your suggest about my lovely HP CQ40 416 AU It`s occasionally when shut down or turn off wont go off, but restart ! do you know why ? please help me...

    Error 20, 21, 23, 26, 28, 29, 34, 36, 37, 40
    These errors typically occur when security software interferes with the restore and update process. FollowTroubleshooting security software issues to resolve this issue. In rare cases, these errors may be a hardware issue. If the errors persist on another computer, the device may need service.

  • Need help to create report with jpeg/gif image

    Hello,
    I need help with creating a form with a special jpeg/gif seal. I never done this Java. Until now, I created all forms with ansi C++ with HP escape characters to draw lines, boxs, and text. This form will contain boxes which is populated with database information read from a text file.
    Since this form contains a special seal on the upper right, I don't think it can be done with old fashion ansi C++. How can I create a form with Java and create it as a simple exe to just print the form to a specified printer.
    Thanks,
    John

    Hi,
    I am creating a form with boxes (lines and text). What is special about this form is that it has an image jpeg or gif at the top right corner. Is is a state department seal. Up to this form, I had used ansi C++ and print out escape HP character to print out the lines, boxes, and text. I have no idea how to print out the image. I am new to JAVA and only 1 class in it. Is there sample code out there to create this type of form with the image? I need a starting point.
    Thanks,
    John

  • Help. Ipod Turns Off Randomly And Freezes!?

    My Ipod will randomly turn off sometimes, quite often actually. It turns off and I can't turn it back on unless I plug it into a computer. Then it will turn on but it will say Please Wait. Very Low Battery. Then I have to play around with it by plugging and unplugging it until it turns on and the ironic part is that once it turns on it is almost full battery? I really don't know how to fix this?

    I suggest bringing it to a local apple store that has a genius bar or calling apple technical support to see if they can help you out. It might be a well known problem that they'll fix for free, or you might have to pay to get it fixed.

  • I can't check for updates, under Help, it's turned off

    I can't look for updates. When I go to Help, check for updates, it is turned off.
    == This happened ==
    Every time Firefox opened
    == I don't know. Never used this before.

    You can start the Firefox program as Administrator via the right-click context menu.
    See [http://vistasupport.mvps.org/run_as_administrator.htm vistasupport.mvps.org: Run As Administrator]

  • I need help my phone shut off

    So today I was using my iphone and clicked on the sleep button on the top and then my phone never turned back on. It has never been dropped or anything. I need help what should I do??

    I am not sure why but I would not be worried about it, unless it starts doing that often. Mine did it just once in almost 6 months

  • Need Help with scripting for Automator/AppleScript.

    Hi everybody,
    I am building a small app for my mac, What I need is a script that can rename a file that I drop on it.
    and example being:
    example.jpg
    (when I drop it on the app, I want the app to change the filename of the document to "Image.jpg"
    I have tried this with Automator, but it requires that I specify the file to be changed, what I need is something that will change the name of any file I drag onto it.
    I am using it for application specific files.
    Kind regards,
    Pete.
    iBook G4; 60GB Hard Drive, 512MB RAM, Airport Extreme    

    Open the Script Editor in the
    /Applications/AppleScript/ folder and enter the
    following:
    on open(the_file)
    tell application "Finder"
    set name of the_file to "Image"
    end tell
    end open
    Save this script as an application.
    (11347)
    this script compiled correctly; however when run it returned the following error "Can't set name of (the_file) to "Image.jpg"
    I am also given the option of editing the script or just quitting.
    thanks for your help

  • Need a digit to turn off machine

    after suffering from the dreaded overclocking lockout and recovering my machine using MSI's marvelous jumper - Thought i'd fried the thing until I read the manual.
    Obviously, the bios was then cleared
    The problem I now have is that when I close down my machine, it does'nt automatically turn off but brings up the windows  XP 'its now safe to turn off your machine' screen. A button press on the case and it goes off.
    Is there something in the bios that will shut the machine down automatically as before?

    has apic got turned off in advanced bios features

  • Error message: "Java Script turned off, Enable Java Script" How to do this? I have gone into "Tools--then Options--Then checked Java Script--Then the "OK/Save" Button but this has not helped. What is the right course of action?

    Java Script is disabled on my HP laptop. I have done the obvious things. It still will not enable Java Script. What do I try next?

    Start Firefox in [[Safe Mode]] to check if one of the add-ons is causing the problem (switch to the DEFAULT theme: Tools > Add-ons > Themes).
    * Don't make any changes on the Safe mode start window.
    See:
    * [[Troubleshooting extensions and themes]]
    * [[Troubleshooting plugins]]
    If it does work in Safe-mode then disable all extensions and then try to find which is causing it by enabling one at a time until the problem reappears.
    * Use "Disable all add-ons" on the [[Safe mode]] start window to disable all extensions.
    * Close and restart Firefox after each change via "File > Exit" (Mac: "Firefox > Quit"; Linux: "File > Quit")

  • Need help writing script for Digital DAQ

    Hello,
    I am trying to write an aquisition program for digital input coming from a hall sensor.  I will be passing a magnet over a hall sensor on a motor and want to record the number of rotations.  I have pasted together a script based on various websites, but it isn't functioning the way I want.  I would like to be able to collect data points indefinately, or fixed, and then print out the resulting count.  I have attepted to use the ctypes wrapper in Python.  The NI functions remain unchanged though, so if you don't know Python it shouldn't be a problem to read.  I am using a NI PCI-6503. 
    NI PCI-6503
    NI PCI-6503
    NI PCI-6503
    The code:
    # C:\Program Files\National Instruments\NI-DAQ\Examples\DAQmx ANSI C\Analog In\Measure Voltage\Acq-Int Clk\Acq-IntClk.c
    import ctypes
    import numpy
    nidaq = ctypes.windll.nicaiu # load the DLL
    # Setup some typedefs and constants
    # to correspond with values in
    # C:\Program Files\National Instruments\NI-DAQ\DAQmx ANSI C Dev\include\NIDAQmx.h
    # the typedefs
    int32 = ctypes.c_long
    uInt32 = ctypes.c_ulong
    uInt64 = ctypes.c_ulonglong
    float64 = ctypes.c_double
    TaskHandle = uInt32
    # the constants
    DAQmx_Val_ChanForAllLines = int32(0)
    def CHK(err):
    """a simple error checking routine"""
         if err < 0:
              buf_size = 200
              buf = ctypes.create_string_buffer('\000' * buf_size)
              nidaq.DAQmxGetErrorString(err,ctypes.byref(buf),buf_size)
              raise RuntimeError('nidaq call failed with error %d: %s'%(err,repr(buf.value)))
    # initialize variables
    taskHandle = TaskHandle(0)
    max_num_samples = 1000
    # array to gather points
    data = numpy.zeros((max_num_samples,),dtype=numpy.float64)
    # now, on with the program
    CHK(nidaq.DAQmxCreateTask("",ctypes.byref(taskHandle)))
    CHK(nidaq.DAQmxCreateDIChan(taskHandle,'Dev1/port1/line1',"", DAQmx_Val_ChanForAllLines))
    CHK(nidaq.DAQmxStartTask(taskHandle))
    read = int32()
    CHK(nidaq.DAQmxReadDigitalU32(taskHandle,int32(-1),float64(1),DAQmx_Val_GroupByChannel,data.ctypes.data,max_num_samples,ctypes.byref(read),None))
    print "Acquired %d points"%(read.value)
    if taskHandle.value != 0:
         nidaq.DAQmxStopTask(taskHandle)
         nidaq.DAQmxClearTask(taskHandle)
    print "End of program, press Enter key to quit"
    raw_input()
    This script returns "Acquired 1 points" immediately, regardless of how many times the hall sensor has been switched.  
    I apologize for the sloppy code, but I understand very little of the underlying principles of these DAQ functions, despite reading their documentation.  Seeing as how the code does not return an error, I am hoping there is just a minor tweak or two that will be farily obvious to someone with more experience.  
    Thanks

    Hey Daniel,
    Most of this script is from http://www.scipy.org/Cookbook/Data_Acquisition_with_NIDAQmx. 
    I needed to run the ReadDigitalU32 function in Python loop because my DAQ device did not support timed aquistion and I don't have LabView.  
    import numpy
    import time
    import ctypes
    nidaq = ctypes.windll.nicaiu # load the DLL
    # Setup some typedefs and constants
    # to correspond with values in
    # C:\Program Files\National Instruments\NI-DAQ\DAQmx ANSI C Dev\include\NIDAQmx.h
    # the typedefs
    int32 = ctypes.c_long
    uInt32 = ctypes.c_ulong
    uInt64 = ctypes.c_ulonglong
    float64 = ctypes.c_double
    TaskHandle = uInt32
    # the constants
    DAQmx_Val_Cfg_Default = int32(-1)
    DAQmx_Val_Volts = 10348
    DAQmx_Val_Rising = 10280
    DAQmx_Val_FiniteSamps = 10178
    DAQmx_Val_GroupByChannel = 0
    DAQmx_Val_ChanForAllLines = int32(0)
    # initialize variables
    taskHandle = TaskHandle(0)
    max_num_samples = 10000
    data = numpy.zeros((max_num_samples,),dtype=numpy.float64)
    read = uInt32()
    bufferSize = uInt32(10000)
    def CHK(err):
    """a simple error checking routine"""
         if err < 0:
              buf_size = 200
              buf = ctypes.create_string_buffer('\000' * buf_size)
              nidaq.DAQmxGetErrorString(err,ctypes.byref(buf),buf_size)
              raise RuntimeError('nidaq call failed with error %d: %s'%(err,repr(buf.value)))
    # Start up DAQ
    CHK(nidaq.DAQmxCreateTask("",ctypes.byref(taskHandle)))
    CHK(nidaq.DAQmxCreateDIChan(taskHandle,"Dev?/port?/line?","", DAQmx_Val_ChanForAllLines))
    CHK(nidaq.DAQmxStartTask(taskHandle))
    #initialize lists and time 1 
    t1 = time.time()
    times = []
    points = []
    while True:
         try:
              CHK(nidaq.DAQmxReadDigitalU32(taskHandle,int32(-1),float64(1),
              DAQmx_Val_GroupByChannel,data.ctypes.data,uInt32(2*bufferSize.value)
             ,ctypes.byref(read), None))
              t2 = time.time()
             #data[0] is the position in the numpy array 'data' that holds the value aquired
             #from your device
             points.append(data[0])
             times.append(t2 - t1) 
             t1 = time.time()
             #Choose time interval between data aquisition
             time.sleep(.02)
         except KeyboardInterrupt:
              break
    #process the lists of points and time intervals as you so choose
    Thanks for the help!
    Paul

  • Need help with script to save iPhoto RSS pix to album

    Hi all. I'm a very green Applescripter needing some pointers.
    Goal: Create a script to "save" pictures from subscribed RSS feeds in iphoto (they get automatically deleted when they fall off the RSS feed).
    I can "add" or "duplicate" the images from the subscribed album to my "archive" album but I can't figure out how to tell if I've already copied an image or not. Is there some way to say something like:
    if RssPhoto exists in ArchiveAlbum then
    don't copy
    else
    do copy
    end if
    I tried doing a file name comparison but iphoto adds a incremental number to the filename so it ends up failing the comparison.
    Thanks for any help.

    'I tried doing a file name comparison ...' - please show your code, and respective RSS url(s).

Maybe you are looking for

  • How to set product Id for event booking order?

    We take paid bookings for a number of events through the year. Since the event booking information is identical for every event (only the event details change), we have implemented this by embedding the HTML from a standardised web form into each eve

  • PaperCaptureSvc not working in Cluster env.

    Hi ! The config: ADEP 10 SP1, Windows 2008 R2 (SP1) x64, Jboss 5.1 , MSSQL 2008 We built a cluster and when we are trying to simply OCR a TIF document using adminui, the returned error message is always : I started a single node and the message is th

  • Merging Records with same or NULL values

    Hi, create table AS_ITM (id_itm NUMBER, diff_1 VARCHAR2(20), diff_2 VARCHAR2(20)); insert into as_itm values (22188212, 'J068', 'C001'); select id_itm, diff_1, diff_2 from as_itm; output: 22188212     J068     C001 create table RK_DIFF_DESC (diff_id

  • No space to download

    Hi folks, me again !! so i have this 1tb drive, loads of space on it, using mountain lion, have a 500gb spare drive attached and i go to download a file to get told there is no space try emptying your documents, !!!.  There is only one folder in ther

  • Migration Assistant from Time Machine not working, Migration Assistant from Time Machine not working

    Hello, A friend of mine recently bought a new Macbook Pro.  I believe it is a 2.8 Ghz i7 model. Anyway, they wanted to transfer all of their stuff from a 5 year old Macbook (running Snow Leopard) to their new Macbook Pro (running Lion) and they asked