ID and Mathmagic : batch equation conversion by scripting ?

Hello,
My configuration : MacOS X + ID 6 + Mathmagic
In ID, I have a text document with LaTex expressions, between \[ and \] tags.
With a shortcut, I can convert these expressions in Mathmagic equation, one by one, when cursor is placed between tags.
I have more than 800 expressions to convert, so I'm looking for a scripting solution to batch convert.
I'd like to know if it is possible to write a script to process these actions on the document:
1. Find  Latex expression between tags and place the cursor within (possibly by finding opening tag \[ and placing cursor after)
2. activate  Mathmagic shortcut to convert the expression in Mathmagic equation
I tried to use Rorohiko Action Recorder, but I didn't managed to record actual "Find" action after recording "opening Find menu" action.
Any advice welcome
TIA
Nicolas

Hi Nicolas
Your task can be automated using applescript. Since I dont have mathmagic in my computer I am not able to test right now. Try with applescript. Or mail me @ [email protected] so that we can use teamviewer or something else to make it.
Thanks

Similar Messages

  • How run a batch file from VBS script?

    I have written a script in which I create a batch file that I want to run. Running it from the Start menu with "Run..." works fine but I would like to do it automatically from the script. I can't find a command that works but I am a beginner, so I'm hoping someone's got a solution?!

    Hi again!
    Thank you for your help but I've just discovered that my problem probably doesn't have to do with the way that I call for the batch file. It's more like this:
    The batch file is run but it only does its job some of the times... The batch contains one name of a converter application (Convert.exe) and the names of some databases and files. I've been told that the conversion should work if Convert.exe is located in the same folder as the files. Which it also does, if I run the batch from "Run..." but not from my code.
    I had it working for a while when I had fiddled (as I said, I'm a beginner at this) with setting some drives, such as userDrv and changing some paths in the script settings. Since I didn't really know what I was doing though, I didn't save these settings when closing down DIAdem and now it's not working again. When it worked, it only worked for the file where my .VBS was saved. The point of the program is to convert files in different folders so that wasn't enough.
    Just for clearity: I can't write the name as "C:\My Folder..." because the batch file name and the folder it is situated in is different each time so I have variables for the path and the batch, but that part seems to work. (Call ExtProgram(batFilename_) where batFilename_ includes the path).  
    So I guess what I need to understand is how the different drives work or maybe I need to somehow change my path settings?

  • Batch HDR Merging/Toning Script

    I've seen a number of different posts on these forums about trying to do this and I never really found a complete and suitable solution. It also has really annoyed me that adobe never implemented this (and it's not possible to do with actions because the action just runs a script and you can't record the HDR toning settings, the dialog always pops up, its in the script). So I finally had some time to get my hands dirty with ExtendScript and I have created a fully featured script complete with UI that allows batch creation of HDR tonned images in photoshop.
    The code I got working from various snipets of code I found around the 'net and single stepping through the MergeToHDR.jsx script that is built into photoshop.
    This has only been partially tested on photoshop CC on a mac. Hopefully I made it portable enough and it will work on windows and older versions. I don't think the MergeToHDR script has changed much in the last several versions (and that is mainly what I call to do the work) so I think it should work. If you have issues please let me know.
    My motivation for this script was coming up with a way to do batch HDR toning for timelapse and so this script's features lean toward using it for that end. I really didn't want to buy another separate program for doing this like photomatix, when I knew it should at least be possible to do in photoshop.
    I uploaded the script to github:
    https://github.com/davidmilligan/PhotoshopBatchHDR/blob/master/Batch%20HDR.jsx
    How to use:
    Drop the script in the '[photoshop folder]/presets/scripts' folder and restart photoshop if it is already running.
    The script should appear as a menu item under File>Automate>Batch HDR...
    A dialog will appear where you specify all the settings for the batch
    Input Section:
    Click browse and select the source folder that contains the images to be merged/toned
    Specify "Number of Brackets" this is how many separate images to group into a single HDR output image (the script will group the images in the source folder in order based on this parameter). You can use a value of 1, which means each image in the source folder is separate and will be toned and output. (I find that many times when shooting RAW, 14 bits is ample to capture the full dynamic of the scene, so I do not waste storage space and shutter acutations using more than one exposure, just make sure to ETTR, also post-processing with this script will be faster)
    If there are other files in your source folder (for example .xmp files) that you need to exclude you can specify a filte. For example: *.cr2
    Typically for timelapse you are using a tripod and do not need to have photoshop align the images, but I provided that capability for anyone who might need it b/c it was easy to enable. Note that enabling this will make the process MUCH slower.
    Toning Section:
    These settings are all the same as the photoshop HDR toning dialog for "Local Adaptation"
    To preview what your toning settings will look like you can select any file(s) in your sequence by clicking "Select File(s)..." under "Preview". The file(s) you select will open and merge (if more than one file). When that's finished you can click the "Update Preview" button to apply the current toning settings and see what they will look like (I can't do the fast, automatic previews like the builtin dialog, sorry - somebody from adobe want to show me how to do this?)
    You can see what the settings will look like at another point in your sequence by clicking the "Select File(s).." button again. (I recommend previewing a shot near the beginning, middle, and end of your sequence)
    The dialog prevents you from using anything in photoshop while its open so I provided a zoom to allow you to zoom in on the preview
    The tone curve you must enter as a comma separated list of points (sorry, ScriptUI is not really adequate to create the graphical histogram overlay for the curves like in the builtin dialog). The points are grouped into x,y pairs so for example: x1,y1,x2,y2,etc. Typically you will start with 0,0 and end with 255,255 (note that 255 is the max, full white). Like the curves tool, x represents the input and y represents the output
    Output Section:
    Click browse and select a folder for the script to save the output files to
    The rest of this section should be self explanitory. NOTE: If you select to output 32bit files, the toning will not be applied, the files will simply be merged into a 32bit HDR image and saved.
    Once you have specified the input and output folders the OK button should be enabled, when you are ready, click OK to start the process
    Go watch a movie or take a nap, this is going to take a while. The script will display a progress window showing you how far along the proces is (the photoshop progress windows may occasionally appear on top of it, I usually just move them up a little so I can see both)
    Limitations:
    Only the local adaptation method is supported. It's really the only one I ever use, and I didn't really feel like implementing the other ones, but feel free to modify the script yourself to add this support
    You canot load or save presets from the builtin toning dialog. The format of the preset files is binary and would require reverse engineering of the format and it would be very difficult to read to the files in javascript anyway. If it were xml, it would be much easier, alas it is not. Feel free to grab a hex editor and do this yourself. For now you'll just have to copy all of the values of a preset by hand into the dialog if you want to use a preset. If I have more time this is something I might work on.
    Preview is slow because it has to do the actual full toning, I don't know a way to do the fast real time previews like the builtin dialog.
    I don't think the "Cancel" button on the progress window really works, once running, the script is too busy to register a click, anybody know how I might fix this?
    There may potentially be some ways to improve performance of this script in certain scenarios, IDK, but I'm just glad it works
    You're welcome Adobe, you can send me a check at:
    [REDACTED]
    [REDACTED]
    [REDACTED]
    Please hit me up with comments/suggestions,
    David

    Thank you for your script, it's very useful.
    I just changed a few things :
    The Checkboxes didn't work so I changed them :
    alignCheckBox.onChanged by alignCheckBox.onClick
    deghostCheckBox.onChanged by deghostCheckBox.onClick
    smoothEdgesBox.onChange by smoothEdgesBox.onClick
    And for best alignment, I changed :
    mergeToHDR.mergeFilesToHDR( currentFileList, false, hdrDeghosting ? kMergeToHDRDeghostBest : kMergeToHDRDeghostOff );
    by :
    mergeToHDR.mergeFilesToHDR( currentFileList, mergeToHDR.useAlignment, hdrDeghosting ? kMergeToHDRDeghostBest : kMergeToHDRDeghostOff );
    And lastly :
    My language is french so I had to modify loadPreset function because my own preset file contains the string "P a r   d é f a u t" in place of "D e f a u l t" so that the data is shifted.
    Here is the code :
    #target photoshop
    Batch HDR Script by David Milligan
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.
    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
    // BEGIN__HARVEST_EXCEPTION_ZSTRING
    <javascriptresource>
    <name>Batch HDR...</name>
    <menu>automate</menu>
    </javascriptresource>
    // END__HARVEST_EXCEPTION_ZSTRING
    //these lines import the 'Merge To HDR.jsx' script that is built in to photoshop, we will make calls to that script and some of the scripts that it includes
    var runMergeToHDRFromScript = true;
    var g_ScriptFolderPath = app.path + "/"+ localize("$$$/ScriptingSupport/InstalledScripts=Presets/Scripts");
    var g_ScriptPath = File( g_ScriptFolderPath+'/Merge To HDR.jsx' );
    $.evalFile( g_ScriptPath );
    //$.level = 2;
    //default settings:
    mergeToHDR.useAlignment = false;
    mergeToHDR.useACRToning = false;
    var numberOfBrackets = 3;
    var userCanceled = false;
    var sourceFolder;
    var outputFolder;
    var saveType = "JPEG";
    var jpegQuality = 10;
    var progress;
    var statusText;
    var progressWindow;
    var fileMask = "*";
    var outputFilename = "hdr_output_";
    var hdrRadius = 100;
    var hdrStrength = 0.5;
    var hdrGamma = 1.0;
    var hdrExposure = 0.0;
    var hdrDetail = 100;
    var hdrShadow = 0;
    var hdrHighlights = 0;
    var hdrVibrance = 20;
    var hdrSaturation = 30;
    var hdrSmooth = false;
    var hdrDeghosting = true;
    var hdrCurve = "0,0,255,255";
    var estTimeRemaining = "";
    var previewDoc;
    var originalDoc;
    function main()
        promptUser();
        //make sure user didn't cancel
        if(sourceFolder != null && outputFolder != null && sourceFolder.exists && outputFolder.exists && numberOfBrackets > 0)
            initializeProgress();
            var files =  sourceFolder.getFiles(fileMask);
            var currentFileList = new Array();
            for(var index = 0;  index < files.length; index++)
                if((index % numberOfBrackets) == numberOfBrackets - 1)
                    var start = new Date();
                    progress.value = 100 * index / files.length;
                    currentFileList.push(files[index]);
                    if(userCanceled) break;
                    if(numberOfBrackets > 1)
                        statusText.text = "Merging files "+(index-numberOfBrackets+2)+" - "+(index+1)+" of "+files.length + estTimeRemaining;
                        //for braketed exposures use the mergeToHDR script to merge the files into a single 32 bit image
                        mergeToHDR.outputBitDepth= 32;
                        mergeToHDR.mergeFilesToHDR( currentFileList, mergeToHDR.useAlignment, hdrDeghosting ? kMergeToHDRDeghostBest : kMergeToHDRDeghostOff );
                        statusText.text = "Toning files "+(index-numberOfBrackets+2)+" - "+(index+1)+" of "+files.length+ estTimeRemaining;
                    else
                        statusText.text = "Loading file "+(index+1)+" of "+files.length+ estTimeRemaining;
                        //otherwise just open the file
                        doOpenFile(files[index]);
                        statusText.text = "Toning file "+(index+1)+" of "+files.length+ estTimeRemaining;
                    progress.value = 100 * (index + numberOfBrackets / 2 ) / files.length;
                    if(userCanceled) break;
                    if(app.activeDocument != null)
                        //apply the actual tone mapping to the HDR image to get it back down to 8 bits
                        doHDRToning();
                    //save the result and close
                    //TODO: add leading zeros to index in filename
                    if(numberOfBrackets > 1)
                        statusText.text = "Saving result "+(index-numberOfBrackets+2)+" - "+(index+1)+" of "+files.length+ estTimeRemaining;
                    else
                        statusText.text = "Saving result "+(index+1)+" of "+files.length+ estTimeRemaining;
                    if(userCanceled) break;
                    doSaveFile(outputFolder.absoluteURI + "/" + outputFilename + ZeroPad(Math.round((index + 1)/numberOfBrackets), 5) );
                    activeDocument.close(SaveOptions.DONOTSAVECHANGES);
                    //reset our file list
                    currentFileList = new Array();
                    //calculate time remaining
                    var end = new Date();
                    var timeElapsed = end.getTime() - start.getTime();
                    var mins = timeElapsed / 60000 * ((files.length - index - 1) / numberOfBrackets);
                    estTimeRemaining = " | Remaining: " + ZeroPad((mins / 60).toFixed(0),2) + ":" + ZeroPad((mins % 60).toFixed(0),2);
                else
                    currentFileList.push(files[index]);
            progressWindow.hide();
    function doOpenFile(filename)
        const eventOpen = app.charIDToTypeID('Opn ');
        var desc = new ActionDescriptor();
        desc.putPath( typeNULL, new File( filename ) );
        desc.putBoolean( kpreferXMPFromACRStr, true ); //not sure what this does or if it is needed
        executeAction( eventOpen, desc, DialogModes.NO );
        //if we don't convert the image to 32bit the mergeToHDR script will not tone our image when we call it, it will simply downconvert it to 8 bit
        convertTo32Bit ();
    function convertTo32Bit()
        var idCnvM = charIDToTypeID( "CnvM" );
        var desc6 = new ActionDescriptor();
        var idDpth = charIDToTypeID( "Dpth" );
        desc6.putInteger( idDpth, 32 );
        var idMrge = charIDToTypeID( "Mrge" );
        desc6.putBoolean( idMrge, false );
        var idRstr = charIDToTypeID( "Rstr" );
        desc6.putBoolean( idRstr, false );
        executeAction( idCnvM, desc6, DialogModes.NO );
    function doSaveFile(filename)
        if(saveType == "JPEG")
            var jpgSaveOptions = new JPEGSaveOptions();
            jpgSaveOptions.embedColorProfile = true;
            jpgSaveOptions.formatOptions = FormatOptions.STANDARDBASELINE;
            jpgSaveOptions.matte = MatteType.NONE;
            jpgSaveOptions.quality = jpegQuality;
            activeDocument.saveAs(new File(filename), jpgSaveOptions, true /*Save As Copy*/, Extension.LOWERCASE /*Append Extention*/);
        else if(saveType == "TIFF")
            var tifSaveOptions = new TiffSaveOptions();
            tifSaveOptions.embedColorProfile = true;
            activeDocument.saveAs(new File(filename), tifSaveOptions, true /*Save As Copy*/, Extension.LOWERCASE /*Append Extention*/);
        else if(saveType == "TIFF LZW")
            var tifSaveOptions = new TiffSaveOptions();
            tifSaveOptions.embedColorProfile = true;
            tifSaveOptions.imageCompression = TIFFEncoding.TIFFLZW;
            activeDocument.saveAs(new File(filename), tifSaveOptions, true /*Save As Copy*/, Extension.LOWERCASE /*Append Extention*/);
        else if(saveType == "TIFF ZIP")
            var tifSaveOptions = new TiffSaveOptions();
            tifSaveOptions.embedColorProfile = true;
            tifSaveOptions.imageCompression = TIFFEncoding.TIFFZIP;
            activeDocument.saveAs(new File(filename), tifSaveOptions, true /*Save As Copy*/, Extension.LOWERCASE /*Append Extention*/);
        else
            activeDocument.saveAs(new File(filename), undefined, true /*Save As Copy*/, Extension.LOWERCASE /*Append Extention*/);
    function doHDRToning()
        //TODO: Reverse engineer the HDR Preset file format and allow user to select a preset file and create the ActionDescriptor from the file
        //create the ActionDescriptor that describes the HDR toning settings to use
        var hdDesc = new ActionDescriptor;
        hdDesc.putInteger( stringIDToTypeID( 'version' ), 6 );//I'm not sure what this does
        hdDesc.putInteger(  kmethodStr, 3 );// the toning method to use, 3 = local adaptation
        hdDesc.putDouble( stringIDToTypeID( 'radius' ), hdrRadius );
        hdDesc.putDouble( stringIDToTypeID( 'threshold' ), hdrStrength );// strength
        hdDesc.putDouble( stringIDToTypeID( 'center' ), hdrGamma );// gamma
        hdDesc.putDouble( stringIDToTypeID( 'brightness' ), hdrExposure );// exposure
        hdDesc.putDouble( stringIDToTypeID( 'detail' ), hdrDetail );
        hdDesc.putDouble( stringIDToTypeID( 'shallow' ), hdrShadow );
        hdDesc.putDouble( stringIDToTypeID( 'highlights' ), hdrHighlights );
        hdDesc.putDouble( stringIDToTypeID( 'vibrance' ), hdrVibrance );
        hdDesc.putDouble( stringIDToTypeID( 'saturation' ), hdrSaturation);
        hdDesc.putBoolean( stringIDToTypeID( 'smooth' ), hdrSmooth );
        hdDesc.putBoolean( stringIDToTypeID( 'deghosting' ), hdrDeghosting );
        //create the tone curve
        var cDesc = new ActionDescriptor;
        cDesc.putString( stringIDToTypeID( 'name' ), 'Default');
        var cList = new ActionList;
        var points = hdrCurve.split(',');
        for(var i = 0; i < points.length; i++)
            if(i % 2 == 1)
                var pDesc = new ActionDescriptor;
                pDesc.putDouble( stringIDToTypeID( 'horizontal' ), points[i-1] );
                pDesc.putDouble( stringIDToTypeID( 'vertical' ), points[i] );
                pDesc.putBoolean( keyContinuity , false );// ?????
                cList.putObject( charIDToTypeID( 'Pnt ' ), pDesc );
        cDesc.putList( stringIDToTypeID( 'curve' ), cList );
        hdDesc.putObject( kclassContour, classShapingCurve, cDesc );
        //call the script that actually invokes the toning plugin
        convertFromHDRNoDialog( outputBitDepth, hdDesc );
    function initializeProgress()
        progressWindow = new Window("palette { text:'Batch HDR Progress', \
            statusText: StaticText { text: 'Processing Images...', preferredSize: [350,20] }, \
            progressGroup: Group { \
                progress: Progressbar { minvalue: 0, maxvalue: 100, value: 0, preferredSize: [300,20] }, \
                cancelButton: Button { text: 'Cancel' } \
        statusText = progressWindow.statusText;
        progress = progressWindow.progressGroup.progress;
        progressWindow.progressGroup.cancelButton.onClick = function() { userCanceled = true; }
        progressWindow.show();
    function promptUser()
        var setupWindow = new Window("dialog { orientation: 'row', text: 'Batch HDR', alignChildren:'top', \
            leftGroup: Group { orientation: 'column', alignChildren:'fill', \
                inputPanel: Panel { text: 'Input', \
                    sourceGroup: Group { \
                        sourceBox: EditText { characters: 40, text: '' }, \
                        sourceBrowse: Button { text: 'Browse' } \
                    bracketGroup: Group{ \
                        bracketLabel: StaticText { text: 'Number of Brackets: ' }, \
                        bracketBox: EditText { characters: 2 }, \
                        filterLabel: StaticText { text: 'File Filter: ' }, \
                        filterText: EditText { characters: 5 }, \
                        alignCheckBox: Checkbox { text: 'Align' }\
                        deghostCheckBox: Checkbox { text: 'Deghost' }\
                toningPanel: Panel { text: 'Toning', orientation:'row', alignChildren:'top' } ,\
                outputPanel: Panel { text: 'Output', \
                    outputGroup: Group { \
                        outputBox: EditText { characters: 40, text: '' }, \
                        outputBrowse: Button { text: 'Browse' } \
                    outputOptionsGroup: Group { \
                        outputFilenameLabel: StaticText { text: 'Filename Format: ' }, \
                        outputFilenameText: EditText { characters: 10 }, \
                        outputFilenamePost: StaticText { text: '00001.jpg' }, \
                    saveSettingsGroup: Group { \
                        saveTypeLabel: StaticText { text: 'Save As: ' }, \
                        saveDropDown: DropDownList { }, \
                        jpegQualityLabel: StaticText { text: 'JPEG Quality (1-10): ' }, \
                        jpegQualityText: EditText { characters: 2}, \
                        outputBitDepthLabel: StaticText { text: 'Bit Depth', enabled:false }, \
                        outputBitDepthDropDown: DropDownList { enabled:false }, \
            rightGroup: Group { orientation: 'column', alignChildren:'fill', \
                okButton: Button { text: 'OK', enabled: false } \
                cancelButton: Button { text: 'Cancel' } \
        generateToningPanel(setupWindow.leftGroup.toningPanel);
        //shortcut variables
        var sourceBox = setupWindow.leftGroup.inputPanel.sourceGroup.sourceBox;
        var sourceBrowse = setupWindow.leftGroup.inputPanel.sourceGroup.sourceBrowse;
        var bracketBox = setupWindow.leftGroup.inputPanel.bracketGroup.bracketBox;
        var filterText = setupWindow.leftGroup.inputPanel.bracketGroup.filterText;
        var alignCheckBox = setupWindow.leftGroup.inputPanel.bracketGroup.alignCheckBox;
        var outputBox = setupWindow.leftGroup.outputPanel.outputGroup.outputBox;
        var outputBrowse = setupWindow.leftGroup.outputPanel.outputGroup.outputBrowse;
        var outputFilenameText = setupWindow.leftGroup.outputPanel.outputOptionsGroup.outputFilenameText;
        var saveDropDown = setupWindow.leftGroup.outputPanel.saveSettingsGroup.saveDropDown;
        var jpegQualityText = setupWindow.leftGroup.outputPanel.saveSettingsGroup.jpegQualityText;
        var jpegQualityLabel = setupWindow.leftGroup.outputPanel.saveSettingsGroup.jpegQualityLabel;
        var outputBitDepthDropDown = setupWindow.leftGroup.outputPanel.saveSettingsGroup.outputBitDepthDropDown;
        var outputBitDepthLabel = setupWindow.leftGroup.outputPanel.saveSettingsGroup.outputBitDepthLabel;
        var okButton = setupWindow.rightGroup.okButton;
        var cancelButton = setupWindow.rightGroup.cancelButton;
        var toningPanel = setupWindow.leftGroup.toningPanel;
        var deghostCheckBox = setupWindow.leftGroup.inputPanel.bracketGroup.deghostCheckBox;
        //set default values
        bracketBox.text = numberOfBrackets;
        filterText.text = fileMask;
        //mergeToHDR.useAlignment = true;
        alignCheckBox.value = mergeToHDR.useAlignment;
        deghostCheckBox.value = hdrDeghosting;
        outputFilenameText.text = outputFilename;
        jpegQualityText.text = jpegQuality;
        saveDropDown.add("item", "JPEG");
        saveDropDown.add("item", "TIFF");
        saveDropDown.add("item", "TIFF LZW");
        saveDropDown.add("item", "TIFF ZIP");
        saveDropDown.add("item", "PSD");
        saveDropDown.selection = 0;
        outputBitDepthDropDown.add("item", "8");
        outputBitDepthDropDown.add("item", "16");
        outputBitDepthDropDown.add("item", "32");
        outputBitDepthDropDown.selection = 0;
        //event handlers
        sourceBox.onChange = function()
            sourceFolder = new Folder(sourceBox.text);
            okButton.enabled = sourceFolder != null && outputFolder != null && sourceFolder.exists && outputFolder.exists;
        sourceBrowse.onClick = function()
            sourceFolder = Folder.selectDialog ("Select the source folder");
            if(sourceFolder != null)
                sourceBox.text = sourceFolder.fullName;
            okButton.enabled = sourceFolder != null && outputFolder != null && sourceFolder.exists && outputFolder.exists;
        bracketBox.onChange = function() { numberOfBrackets = bracketBox.text; };
        filterText.onChange = function() { fileMask = filterText.text; };
        alignCheckBox.onClick = function() { mergeToHDR.useAlignment = alignCheckBox.value; };
        deghostCheckBox.onClick = function() { hdrDeghosting = deghostCheckBox.value; };
        outputBox.onChange = function()
            outputFolder = new Folder(outputBox.text);
            okButton.enabled = sourceFolder != null && outputFolder != null && sourceFolder.exists && outputFolder.exists;
        outputBrowse.onClick = function()
            outputFolder = Folder.selectDialog ("Select the output folder");
            if(outputFolder != null)
                outputBox.text = outputFolder.fullName;
            okButton.enabled = sourceFolder != null && outputFolder != null && sourceFolder.exists && outputFolder.exists;
        outputFilenameText.onChange = function() { outputFilename = outputFilenameText.text; };
        saveDropDown.onChange = function()
            saveType = saveDropDown.selection.text;
            jpegQualityText.enabled = saveDropDown.selection.text == "JPEG";
            jpegQualityLabel.enabled = saveDropDown.selection.text == "JPEG";
            if(saveDropDown.selection.text == "JPEG")
                outputBitDepthDropDown.selection = 0;
            outputBitDepthDropDown.enabled = saveDropDown.selection.text != "JPEG";
            outputBitDepthLabel.enabled = saveDropDown.selection.text != "JPEG";
        jpegQualityText.onChange = function() { jpegQuality = jpegQualityText.text; };
        outputBitDepthDropDown.onChange = function()
            outputBitDepth = outputBitDepthDropDown.selection.text;
            toningPanel.enabled = outputBitDepth != 32;
        okButton.onClick = function() { setupWindow.hide(); cleanUpPreviews(); };
        cancelButton.onClick = function() { sourceFolder = null, setupWindow.hide(); cleanUpPreviews(); };
        saveDropDown.onChange();
        outputBitDepthDropDown.onChange();
        setupWindow.show();
    function cleanUpPreviews()
        if(originalDoc != null)
            originalDoc.close(SaveOptions.DONOTSAVECHANGES);
            originalDoc = null;
        if(previewDoc != null)
            previewDoc.close(SaveOptions.DONOTSAVECHANGES);
            previewDoc = null;
    function generateToningPanel(toningPanel)
        var leftToningGroup = toningPanel.add("group{orientation:'column',alignChildren:'fill'}");
        var rightToningGroup = toningPanel.add("group{orientation:'column',alignChildren:'fill'}");
        var presetGroup = leftToningGroup.add("group{orientation:'row'}");
        var presetDropDown = presetGroup.add("dropdownlist");
        var loadPresetButton = presetGroup.add("button", undefined, "Load Preset");
        var edgePanel = leftToningGroup.add("panel",undefined,"Edge Glow");
        var radiusSlider = createSliderControl(edgePanel.add("group"), "  Radius: ", "px", 0, 500, 0, hdrRadius, function(newValue){ hdrRadius = newValue; });
        var strengthSlider = createSliderControl(edgePanel.add("group"), "Strength: ", "", 0, 4.0, 2, hdrStrength, function(newValue){ hdrStrength = newValue; });
        var edgeGroup = edgePanel.add("group");
        var smoothEdgesBox = edgeGroup.add("checkbox",undefined, "Smooth Edges");
        var detailPanel = leftToningGroup.add("panel",undefined,"Tone and Detail");
        var gammaSlider = createSliderControl(detailPanel.add("group"), "  Gamma: ", "", 0.1, 2.0, 2, hdrGamma, function(newValue){ hdrGamma = newValue; });
        var exposureSlider = createSliderControl(detailPanel.add("group"), "Exposure: ", "", -5.0, 5.0, 2, hdrExposure, function(newValue){ hdrExposure = newValue; });
        var detailSlider = createSliderControl(detailPanel.add("group"), "     Detail: ", "%", -300, 300, 0, hdrDetail, function(newValue){ hdrDetail = newValue; });
        var advancedPanel = leftToningGroup.add("panel",undefined,"Advanced");
        var shadowSlider = createSliderControl(advancedPanel.add("group"), "  Shadow: ", "%", -100, 100, 0, hdrShadow, function(newValue){ hdrShadow = newValue; });
        var highlightSlider = createSliderControl(advancedPanel.add("group"), " Highlight: ", "%",  -100, 100, 0, hdrHighlights, function(newValue){ hdrHighlights = newValue; });
        var vibranceSlider = createSliderControl(advancedPanel.add("group"), "  Vibrance: ", "%",  -100, 100, 0, hdrVibrance, function(newValue){ hdrVibrance = newValue; });
        var saturationSlider = createSliderControl(advancedPanel.add("group"), "Saturation: ", "%",  -100, 100, 0, hdrSaturation, function(newValue){ hdrSaturation = newValue; });
        var toningCurvePanel = leftToningGroup.add("panel{text:'Toning Curve',alignChildren:'fill'}");
        var curveBox = toningCurvePanel.add("edittext", undefined, hdrCurve);
        //right side (preview panel)
        var previewGroup = rightToningGroup.add("panel", undefined, "Preview");
        var selectPreviewButton = previewGroup.add("button",undefined,"Select File(s)...");
        var previewButton = previewGroup.add("button",undefined,"Update Preview");
        var zoomGroup = previewGroup.add("group");
        zoomGroup.add("statictext",undefined, "zoom");
        var zoomBox = zoomGroup.add("edittext { text: '100', characters: 3, enabled: false } ");
        var previewZoomSlider = previewGroup.add("slider { minvalue: 10, maxvalue: 200, value: 100, enabled: false }");
        //default values
        smoothEdgesBox.value = hdrSmooth;
        previewButton.enabled = app.documents.length > 0;
        var presetFiles = getPresetFiles();
        var updateSliders = function()
            radiusSlider(hdrRadius);
            strengthSlider(hdrStrength);
            smoothEdgesBox.value = hdrSmooth;
            exposureSlider(hdrExposure);
            gammaSlider(hdrGamma);
            detailSlider(hdrDetail);
            shadowSlider(hdrShadow);
            highlightSlider(hdrHighlights);
            vibranceSlider(hdrVibrance);
            saturationSlider(hdrSaturation);
            curveBox.text = hdrCurve;
        if(presetFiles.length > 0)
            for(var f in presetFiles)
                presetDropDown.add("item", presetFiles[f].displayName.replace(".hdt",""));
            presetDropDown.selection = 0;
            loadPreset(presetFiles[0]);
            presetDropDown.onChange = function()
                loadPreset(presetFiles[presetDropDown.selection.index]);
                updateSliders();
        //event handlers
        loadPresetButton.onClick = function()
            loadPreset(null);
            updateSliders();
        smoothEdgesBox.onClick = function () { hdrSmooth = smoothEdgesBox.value; };
        curveBox.onChange = function () { hdrCurve = curveBox.text; };
        selectPreviewButton.onClick = function()
            var selectedFiles = File.openDialog("Select file(s) to load for preview", function(){return true;}, true);
            if(selectedFiles != null)
                cleanUpPreviews();
                if(selectedFiles instanceof Array)
                    if(selectedFiles.length > 1)
                        mergeToHDR.outputBitDepth= 32;
                        mergeToHDR.mergeFilesToHDR( selectedFiles, false, -2 );
                    else
                        doOpenFile(selectedFiles[0].fullName);
                else
                    doOpenFile(selectedFiles.fullName);
                originalDoc = app.activeDocument;
                previewButton.enabled = originalDoc != null;
                zoomBox.text = getZoomLevel();
                previewZoomSlider.value = getZoomLevel();
        previewButton.onClick = function()
            if(originalDoc != null)
                var tempOutputBitDepth = outputBitDepth;
                outputBitDepth = 16;
                if(previewDoc != null)
                    previewDoc.close(SaveOptions.DONOTSAVECHANGES);
                previewDoc = originalDoc.duplicate("HDR Preview");
                app.activeDocument = previewDoc;
                setZoomLevel(previewZoomSlider.value);
                convertTo32Bit();
                doHDRToning();
                outputBitDepth = tempOutputBitDepth;
                waitForRedraw();
                zoomBox.enabled = previewDoc != null;
                previewZoomSlider.enabled = previewDoc != null;
        zoomBox.onChange = function()
            if(previewDoc != null)
                previewZoomSlider.value = zoomBox.text;
                setZoomLevel(previewZoomSlider.value);
        previewZoomSlider.onChange = function()
            if(previewDoc != null)
                zoomBox.text = previewZoomSlider.value.toFixed(0);
                setZoomLevel(previewZoomSlider.value);
        updateSliders();
    function createSliderControl(group,label,postLabel,min,max,round,value,onValueChanged)
        var ignoreChange = false;
        group.add("statictext", undefined, label);
        var slider = group.add("slider",undefined,value,min,max);
        slider.alignment = "fill";
        var box = group.add("edittext",undefined,value);
        box.characters = 6;
        group.add("statictext", undefined, postLabel);
        slider.onChange = function()
            if(!ignoreChange)
                ignoreChange = true;
                box.text = slider.value.toFixed(round);
                onValueChanged(slider.value);
                ignoreChange = false;
        box.onChange = function()
            if(!ignoreChange)
                ignoreChange = true;
                slider.value = box.text;
                onValueChanged(box.text);
                ignoreChange = false;
        return function(newValue)
            slider.value = newValue;
            box.text = newValue.toFixed(round);
    //forces a redraw while a script dialog is active (for preview)
    var waitForRedraw = function()
        var desc = new ActionDescriptor();
        desc.putEnumerated(charIDToTypeID("Stte"), charIDToTypeID("Stte"), charIDToTypeID("RdCm"));
        executeAction(charIDToTypeID("Wait"), desc, DialogModes.NO);
    function getZoomLevel()
        var ref = new ActionReference();
        ref.putEnumerated( charIDToTypeID("Dcmn"), charIDToTypeID("Ordn"), charIDToTypeID("Trgt") );
        var desc = executeActionGet(ref);
        return Number(desc.getDouble(stringIDToTypeID('zoom'))*100).toFixed(1);
    function setZoomLevel( zoom )
        if(zoom < 1 ) zoom =1;
        var ref = new ActionReference();
        ref.putEnumerated( charIDToTypeID("capp"), charIDToTypeID("Ordn"), charIDToTypeID("Trgt") );
        var getScrRes = executeActionGet(ref).getObjectValue(stringIDToTypeID('unitsPrefs')).getUnitDoubleValue(s tringIDToTypeID('newDocPresetScreenResolution'))/72;
        var docRes = activeDocument.resolution;
        activeDocument.resizeImage( undefined, undefined, getScrRes/(zoom/100), ResampleMethod.NONE );
        var desc = new ActionDescriptor();
        ref = null;
        ref = new ActionReference();
        ref.putEnumerated( charIDToTypeID( "Mn  " ), charIDToTypeID( "MnIt" ), charIDToTypeID( 'PrnS' ) );
        desc.putReference( charIDToTypeID( "null" ), ref );
        executeAction( charIDToTypeID( "slct" ), desc, DialogModes.NO );
        activeDocument.resizeImage( undefined, undefined, docRes, ResampleMethod.NONE );
    function ZeroPad(number,numZeros)
        var result = number.toString();
        while(result.length < numZeros)
            result = "0" + result;
        return result;
    var getPresetFiles = function()
        var presetFolder = new Folder(app.path + "/Presets/HDR Toning");
        return presetFolder.getFiles("*.hdt");
    var loadPreset = function(presetFile)
        if(presetFile == null)
            presetFile = File.openDialog("Select Preset","*.hdt");
        if(presetFile != null)
            var tmpStr = new String();
            var binaryData = new Array();
            presetFile.encoding = "BINARY";
            presetFile.open('r');
            while(!presetFile.eof)
                var ch = presetFile.readch();
                if ( ch.charCodeAt(0) == 0 ){
                    tmpStr += ' ';
                else {
                    tmpStr += ch;
                binaryData.push(ch.charCodeAt(0));
            presetFile.close();
            if(binaryData.length >= 40)
                // init start position for reading datas
                // start position for english version ( string "D e f a u l t" is in the preset file )
                var startPos = 38;
                if ( tmpStr.search ("P a r   d é f a u t") > -1 ){
                    // start position for french preset file version ( string "P a r   d é f a u t" is in the preset file ) (==> + 6 bytes)
                    startPos = 44;
                // if your preset file can't be read, try this : open it in notepad to see the string "D e f a u l t" in your language and add the code here to set startPos to 38 + diff between the length of ("D e f a u l t") and length of ("D e f a u l t" in your language)
                var curvePointCount = getUInt16(binaryData, startPos);
                if(binaryData.length >= 104 + curvePointCount * 4)
                    var curvePointStr = "";
                    for(var i = 0; i < curvePointCount; i++)
                        curvePointStr += getUInt16(binaryData, startPos + 4 + i * 4) + "," + getUInt16(binaryData, startPos + 2 + i * 4) + ((i < curvePointCount - 1) ? "," : "");
                    hdrCurve = curvePointStr;
                    hdrStrength =  getFloat32(binaryData,8);
                    hdrRadius = getFloat32(binaryData, startPos + 10 + 5 * curvePointCount);
                    hdrExposure = getFloat32(binaryData, startPos + 34 + 5 * curvePointCount);
                    hdrSaturation = getFloat32(binaryData, startPos + 38 + 5 * curvePointCount);
                    hdrDetail = getFloat32(binaryData, startPos + 42 + 5 * curvePointCount);
                    hdrShadow = getFloat32(binaryData, startPos + 46 + 5 * curvePointCount);
                    hdrHighlights = getFloat32(binaryData, startPos + 50 + 5 * curvePointCount);
                    hdrGamma = getFloat32(binaryData, startPos + 54 + 5 * curvePointCount);
                    hdrVibrance = getFloat32(binaryData, startPos + 58 + 5 * curvePointCount);
                    hdrSmooth = getUInt16(binaryData, startPos + 62 + 5 * curvePointCount) != 0;
                else
                    alert("Error Loading File", "Error", true);
            else
                alert("Error Loading File", "Error", true);
    function getUInt16(byteArray,offset)
        return byteArray[offset] * 0x100 + byteArray[offset + 1];
    function getUInt32(byteArray,offset)
        return byteArray[offset] * 0x1000000 + byteArray[offset + 1] * 0x10000 + byteArray[offset + 2] * 0x100 + byteArray[offset + 3];
    function getFloat32(byteArray,offset)
        var bytes = getUInt32(byteArray,offset);
        var sign = (bytes & 0x80000000) ? -1 : 1;
        var exponent = ((bytes >> 23) & 0xFF) - 127;
        var significand = (bytes & ~(-1 << 23));
        if (exponent == 128)
            return sign * ((significand) ? Number.NaN : Number.POSITIVE_INFINITY);
        if (exponent == -127) {
            if (significand == 0) return sign * 0.0;
            exponent = -126;
            significand /= (1 << 22);
        } else significand = (significand | (1 << 23)) / (1 << 23);
        return sign * significand * Math.pow(2, exponent);
    main();

  • IDOC for Batch Master Conversion

    Hi,
    Is there any IDOC for Batch Master Conversion (Transaction : MSC2N) ?
    The data being maintained is in Basic data 1 and classification tabs.
    Regards,
    Esha Raj

    Hello,
    I faced the problem with BATMAS03.  When drilling down to F'tn BAPI_BATCH_SAVE_REPLICA I could that one and similar BATMAS03 get to work with filling following set of fields.  Adapt of course the values to you're system.
    BAPIBATCH_SAVE_REPLICA_
    MATERIAL = 000000000000033001
    BATCH = 12543872
    PLANT = D010
    CLASSALLOCATIONS
    CLASS_TYPE 023
    OBJECTKEY 00000000000003300112543872 (in our case MATNR&BATCH combination, dependend on system setting Plant could also be needed)
    CLASSNUM FROZEN_FINISHED (Classification Class)
    OBJECTTABLE MCH1
    CLASSVALUATIONSCHAR
    CLASS_TYPE 023
    OBJECTKEY 00000000000003300112543872
    OBJECTTABLE MCH1
    CHARACT LOBM_ZUSTD
    VALUE_CHAR X
    This works now fine and similar for the BATMAS IDOC
    Hope this is helpfull for you.
    Dirk

  • About the effect for batch level conversion from material to plant level

    Dears,
    Now  we use batch management at material level in our system, now we want to change to batch level from material level to plant level, what effects or risks it will bring during the process of conversion?
    Thanks a lot
    Zhongkai

    Hi
    check the following SAP help link it is very helpful:
    http://help.sap.com/saphelp_40b/helpdata/es/d2/1d4b6e5733d1118b3f0060b03ca329/content.htm
    at the link you can find the following
    Specify batch level and activate status management
    In this IMG activity, you specify the following:
    the level at which batch numbers are unique
    whether batch status management is active in the client
    the plants in which batch status management is active
    the initial status of new batches
    Batch level
    Batch numbers can be unique at the following levels:
    at plant level
    at material level
    at client level for a material
    If you choose plant level, the batch number is unique in conjunction with the respective material and the plant. If you choose material level, the batch number is unique together with the material. At client level, the batch number is unique in the whole client.
    To change the batch level, you have to start a conversion program. This program first checks whether conversion is possible and outputs an error log containing all batch numbers that occur more than once at the new level. Now you need to manually transfer these batch records to numbers within Inventory Management using a transfer posting 'material to material'.
    If you change the level from plant level to a higher level, it is possible that batches with the same batch numbers in different plants are actually identical. In this case, all you have to do is remove stocks (including previous period stocks) so that all batches with the same batch numbers, except one, can be reorganized.
    When you convert from plant level to material level, the material is then to be handled in batches in all plants in which it is defined.
    Standard settings
    In the standard R/3 System, batches are unique at plant level.
    Activities
    To change the batch level, proceed as follows:
          1. Choose the level at which you want your batches to be unique.
          2. Save the new settings and choose Back.
          3. Select function Batch level -> Conversion.
          4. If necessary, carry out the conversion in test mode first.
    Further notes
    Note that you cannot reset conversion from plant level to a higher level in the standard.
    If you create a client by copying an existing client, initially, there are no settings in the target client at batch level. The system makes the settings in the target client only when you have carried out an activity (maintaining master data or posting a goods movement, for example).
    SETTINGS BEFORE/AFTER CLIENT COPY:
    Source client Target client
    Client level Material level
    Material level Material level
    Plant level Plant level
    Batch status management
    Batch status management is an additional function provided by the standard R/3 System.
    Standard settings
    Batch status management is not active in the standard R/3 system.
    Activities
    To activate batch status management, proceed as follows:
          1. Choose Batch status management active.
          2. Save the new setting and choose Back.
          3. Choose Batch status management -> conversion.
          4. If necessary, carry out the conversion in test mode first.
    Further notes
    Batch status management is linked to the batch level. At material and at plant level, the status management settings are valid within the client, that is for all plants. However, if you have defined batches to be unique at plant level, you have to select the plants in which status management is to be active using function Plants with status management.
    If you activate status management, all existing batches are assigned status 'unrestricted'. If you deactivate status management, the systems transfers all restricted batches to unrestricted stock within conversion. Restricted stock only exists if status management is active.
    If you create a client by copying an existing client, status management is automatically activated if batches exist in the target client, independent of the settings in the source client. If no batches exist in the target client, it is not activated. In this case, you have to activate or deactivate status management manually, if required.
    Plants with batch status management
    Activities
    To select the plants in which status management is to be active, proceed as follows:
          1. Set characteristic Batch status management for those plants in which batch status management is to be active.
          2. Save your settings and choose function Back.
          3. Choose function Batch status management -> conversion
          4. If necessary, carry out the conversion in test mode first.
    Initial status of a new batch
    Using this function, you can specify for each material type which initial status new batches are to be assigned. However, if you use a quality management system, this specifies the status of the batches.
    Hope it will help
    Best Regards

  • Batch color conversion

    Have large number of book files in pdf format sent by a client. Other than the covers, all pages are grey, but they are in cmyk format. Our digital press will track those as color prints and we will be charged accordingly. I have Quite a Box of Tricks installed and can batch with it, but it drastically changes the images, blowing out the whites and plugging up the blacks. Acrobat 7's built in conversions work great, just can't batch them. Would like to use batch command to convert to greyscale using the built-in Grey Gamma 1.8 setting, but there is no such batch installed and that command doesn't seem to be available for me to create a batch using it. Is there a workaround?

    Without a program like Pitstop Server (which would do the job admirably), it will take some time, but you could take a large batch, or all of the files and combine them (in order) with the "create pdf from multiple files" command, refry the whole doc (as an eps) in distiller with the "B&W press setting" and extract the files after that. It's a workaround, but requires serious attention.

  • Batch Image Conversion

    Can iPhoto 4.x do batch image conversion of JPGs to TIFFs, and vice versa?
    Is there freeware for Apple Macs that can do this? Photoshop is too rich for my blood.
    Thanks.

    Unfortunately, you have posted to the Photoshopn (PsE's big-brother) General Discussions Forum. There is a very good, and active Ps Elements Forum, where your question will be answered. I will Move your thread to the Ps Elements Forum, and your link, plus any e-mail subscriptions will follow.
    Good luck,
    Hunt
    [Moved to Photoshop Elements Forum]

  • Calling a batch file in sql scripts

    Hi friends,
    I am looking for a way to call any batch file in sql scripts.I am avoiding to use DBMS_SCHEDULER package because my application server and database server are diifferent .
    I am using the sql script in application server.plz help.

    <ironic>
    Ah, I see. This of course explains everything.
    </ironic>
    Now to be serious: there is no way to run a batch script from SQL. The tools which submit SQL Statements to the database are often capable of doing so; host in SQL*Plus can issue OS commands, the host builtin in Forms does it too, and with dbms_scheduler you can run a shell script on the database server.
    So depending on the tools you are using there are several ways to run OS commands. So far you didn't tell us what you want to do with what tools in which version you want to do it. So to only answer is: this is not possible. You cannot run a batch script from plain SQL.
    cheers

  • Automatic and manual batch determination at the time of Goods receipt

    hi,
    where i can have the settings for automatic and manual batch determination at the time of Goods receipt and goods issue..
    E.g.: If i am receiving material from vendor then my requirement is system will generate batch automatically...
    Where  we can get this setting?
    Tx
    Uts

    Dear,
    You assign the batch number either
    Manually
    Automatically, using internal batch number assignment, refer to Customizing for Batch Management under Internal batch number assignment.
    Internal batch number assignment is activated for the complete client, unless you exempt individual plants or materials using a customer exit (see Configure customer exits for intern. batch number assignment in Customizing for Batch Management).
    The R/3 System informs you that the internal batch number assignment is active. You are however only informed once per transaction, for example, when you enter the first item on the multiple-entry screen.
    Please refer: http://help.sap.com/saphelp_45b/helpdata/en/25/283cb44f7811d18a150000e816ae6e/frameset.htm
    Regards,
    Syed Hussain.

  • How to make a selection of a layer delete content and paste another content with Photoshop scripting..?

    how to make a selection of a layer delete content and paste another content with Photoshop scripting..?

    There is a more specific Forum …
    Photoshop Scripting

  • Vendor Material No. and Vendor Batch field in MIGO for GR against Order

    HI,
      I received a very specific requirment for one of our client: Client need the field Vendor Material No. and Vendor Batch in the detail data --> material and batch tab in MIGO transcation for A01 (Goods receipt ) against R08 (Order), this is for good receipt against Process Order, Here though the vendor does not come in picture , these field are required. These field are appearing in GR(A01 against Purchase order(R01)
    Regards
    Rahul

    Hi,
    First of all, why do you want Vendor Batch no & material no while doing receipt against process order.  You can enter the same while doing a GR against Purchase order & same can be tracked using some reports.
    As you said, since you are doing a receipt against the Process order, vendor doesn't come in picture. Hence the vendor batch no: or vendor material no: wont be populated as per Std.SAP.  You can check for some enhancements/BAdi's in MIGO transaction to populate the same.
    Thanks & Regards,

  • Need of value mapping  and fixed values in (conversions)under graphical map

    hi.
    helo all.
    i just want to know what  is the need of value mapping  and fixed values in (conversions)under graphical mappping.
    can any body explain me with real time example .
    waiting for your response.
    bye.
    regards.
    seeta ram.

    Hi Seetha Ram,
       Value mapping:  Where we maintain a table of values which are mapped.
    based on the incoming value we can send the respective resultant value.
        for Eg: for language SAP maintains as EN  --> English  etc
    can u refer these
    http://help.sap.com/saphelp_nw04/helpdata/en/2a/9d2891cc976549a9ad9f81e9b8db25/frameset.htm
    Re: Value mapping table
    Thanks and Regards
    Harsha Vardhan.P
    **Reward points if found useful**

  • In Firefox 2.0+ you can go to Advanced JavaScript Settings and check a box to allow scripts to change status bar text. How do I do this is Firefox 10.0.1?

    In Firefox 2.0+ you can go to Advanced JavaScript Settings and check a box to allow scripts to change status bar text. How do I do this is Firefox 10.0.1?

    Two items in the Advanced JavaScript window were removed as of the Firefox 4.0 version, but they are still available thru about:config .
    Type '''about:config''' in the URL bar and hit Enter. <br />
    ''If you see the warning, you can confirm that you want to access that page.''
    Filter = '''dom.disable_window_status_change''' = double-click to toggle to '''false''' to allow websites to mess with status text.

  • What do the symbol and stand for in the following script? not like displa

    What do the symbol *>* and *>>* stand for in the following script? It is displacement? They do not like displacement symbols.
    $JAVA_HOME/bin/java -cp $CLASSPATH $JVM_OPT $SYS_OPT
    oracle.sysman.integration.coherence.EMIntegrationServer *>* $COHERENCE_
    HOME/mgmtnode.log *>>* $COHERENCE_HOME/mgmtnode.err &
    Thank you

    jverd wrote:
    BigDaddyLoveHandles wrote:
    But the example, if it's correct, seems to be using >> to redirect stderr, not to append stdout. The OP should identify what OS and what shell they are using.In any unix shell I'm aware of, > is overwrite and >> is append.Which is why he said "seems to be using >> to redirect stderr". Which I read to mean that BDLH also found it to be incorrect but some "corner-product" shell may do this sort of thing (not that I know, or have heard, of any that do). ;-)
    In a bourne family shell, the initial construct would cause stdout to replace the log file and append the err file, and would not redirect stderr.
    If you want to send stdout to one file and stderr to another, with overwrite, it'd be
    command > logfile 2> errfile
    Correct, of course. ;-)
    And, of course, changing either of those ">" symbols to ">>" would append (that stream), but you've already said that. ;-)

  • What do symbol ^ and stand for in the following script?

    What do symbol *^* and *>>>* stand for in the following script?
    Does *(int)* means that (temp ^ (temp >>> 32) return the int format?
    long temp = Double.doubleToLongBits(salary);
    result = PRIME * result + (int) (temp ^ (temp >>> 32));
    return result;
    Thank you very much

    jetq wrote:
    What do symbol *^* and *>>>* stand for in the following script?In Java, this is referred to as "code", script could be confused with Javascript, which is not Java at all.
    The previous reply will help you find all you need to know.
    Does *(int)* means that (temp ^ (temp >>> 32) return the int format?"format" refers to how a value is converted to text. (Sometimes how it is to be parsed as well)
    "(int)" casts the long value to an int value (signed 32-bit)
    long temp = Double.doubleToLongBits(salary);
    result = PRIME * result + (int) (temp ^ (temp >>> 32));This will treat -0.0 as being different to 0.0. If this is undesirable, you can do something like...
    long temp = aDouble != +0.0d ? Double.doubleToLongBits(aDouble) : 0L;
    result = PRIME * result + (int) (temp ^ (temp >>> 32));

Maybe you are looking for

  • ORABPEL START-UP ERROR!!!!!!!! - Connection Pool Deployment failure

    I have installed BPEL Process Manager with Weblogic 8.1SP4. I am using Oracle Database 9.2.0.5.0 for Oracle BPEL Process Manager installation. Also i have made following changes for JDBC thin driver accordingly. <JDBCConnectionPool CapacityIncrement=

  • Not charging unless on docking station

    my son's 30 gig won't charge on the regular charger...will only chage on the docking station....and then can't get it to shut off....please help ipod 30 gig   Windows XP  

  • Compatibility w/ HPUX11i

    Our servers' OS version will be upgraded to HPUX11i soon. We have web applications running on a WLS5.1 and a couple of Web Services running on WLS8.1. Have those platforms been certified for HPUX11i ??? Please advise. Thanks Sami

  • Count of Work flow and dataflow in a single job

    Hi, We would like to know the count of all the worlflow,dataflow which is present in a single job. Basically we want to know what are all the things are called in side the job and how many? Is there any way to acheive this by seeing the repositary ta

  • Can't import some MP3s into Centrale

    $Can't import some MP3s into Centrale?I've been using Centrale with my X-Fi for a couple of years and have managed to tag and import 000s of mp3s wothout problem. I recently downloaded 2 series of podcasts from Absoluteradio and despite all attempts,