Changing the file extension by entering a "?" in JFileChooser

Hi,
I've encountered a weird thing in JFileChooser. If you open the chooser, type at least one "?" in the field for the filename and then hit the approve button, the file extension will change to the text you entered as the filename.
To reproduce this problem, simply launch the JWSFileChooserDemo hit the "Open a File..."-button and as the filename enter something like "?deadbeef". Now click the open button and you will see that the file extension changes to "?deadbeef".
This is a really strange behaviour in my opinion.
I'm using Windows 7 with java 6u16, but the issue is the same on windows xp sp3. Perhaps on linux too. I'll give it a try as soon as I can.
Has anyone else encountered that problem?
Best regards
Edited by: Wurstsalat on Mar 23, 2010 10:30 AM

To reproduce this problemThis is not a problem but rather a feature. I did not know of this till now. Thanks for informing.
As Kevin pointed out this is related to filtering of files.
?deadbeefThis will match all the files which start with any letter followed by "deadbeef". So, ? is a wildcard meaning any one character. Other wildcard can be *, which means any number of characters. Try this:
*.txt
a*.txt
*.jp*g
??.txt I don't know other wildcards...
Thanks!

Similar Messages

  • Changing the file extension in Oracle Spool

    Hi All,
    I need to spool some specific data for the entire year. I'm using date parameter for selecting the month wise data.
    In single parameter I’m retrieving file_name,From_date and to_date.
    But by default spool file is getting generated with .lst extension, Please let me know if any one has any idea for changing the file extension in spool, Below is code for your reference.
    SET heading off;
    SET termout off;
    DEFINE L_DATE=&P_DATE; --here I’m passing Month and year value e.g. ‘JAN-09’
    DEFINE L_FILENAME='Invoice_Header_&L_DATE';
    SPOOL d:/&L_FILENAME;
    SELECT invoice_id || invoice_date
      FROM apps.ap_invoices_all
    WHERE invoice_date >= '01-&L_DATE'
      AND invoice_date <= last_day('01-&L_DATE')
    AND ROWNUM <= 2;
    SPOOL off;   Thanks in Advance,
    Arun

    Thanks Saubhik for replying.
    I got the solution at
    http://www.dbforums.com/oracle/886693-spool-text-file.html
    Regards,
    Arun
    Edited by: user2988171 on Oct 19, 2010 4:04 PM

  • Pse 7 changes the file extensions, by using a -1 up to 6 times on a photo, how to stop this problem.

    I cannot keep up with my photos, they somehow change the file extension by adding
    a -1 over and over, how can I stop this process
    to keep a single file extension?

    I checked out the backup/sync, it is not turned on after checking.   Also I do not have a second computer as a backup, I use an Esata drive of 1 TB.
    I have a photo called Rose.jpg, later I try to open the file and it tell be its lost.  I try to reconnect, no luck, then I manually try to find the file and its called Rose-1.jpg or up to Rose-1-1-1-1-1-1.jpg or Rose-1-1-1-1-1-1_edited.jpg.  I do not understand what is taking place in my computer with my photos.   I have about 17,000 photos and I am having a real problem.
    Any help would be appreciated.  sghmotorhome

  • Change the file extension

    Hello everybody,
    I want to change the file extension using java. For example the file is xyz.dat it will change to xyz.data. Is there any method which will do this task.
    smh

    http://javaalmanac.com/egs/java.io/RenameFile.html

  • Can i change the file extension from .html to .cfm in Muse?

    Can I change the file extension from .html to .cfm in Muse?  Then I could use my old file names.

    Muse only supports .html as a page extension at this time.
    Thanks,
    Vinayak

  • I recently had some 8mm film transferred to DVD. I am trying to edit the film clips using Premier Elements 4.0.  Some of the film clips copy into the project but others don't. I tried copying the VOB filed onto my hard drive and then changing the file ext

    I recently had some 8mm film transferred to DVD. I am trying to edit the film clips using Premier Elements 4.0. so I can reburn the films on a single BluRay disc. Some of the film clips copy into the project but others don't. I tried copying the VOB filed onto my hard drive and then changing the file extensions on the VOB files to MPEG but this was no help. Some of the VOB files contain numerous film clips but my software does not appear to be able to recognize them as such. I need to know if replacing my old Premier Elements with the new Version 13 would solve this problem or not. Any advice would be greatly appreciated!
    Bob

    Bob
    What do you have now.....
    What computer operating system do you have?
    We can go into the finer points of source and your intentions, but for now it would appear that you are using SD 4:3 source media to get to a HD 16:9 result. Lots to discuss in this regard.
    What was given to you on the DVD disc? DVD-VIDEO 4:3 or something else?
    If DVD-VIDEO on DVD disc, you should expect to find on the disc a folder named VIDEO_TS. That is your target for your video files.
    If you were given a DVD-VIDEO on DVD disc, then all you want from it are the video files, specifically
    VTS_01_1.VOB, VTS_01_2.VOB, and so on through that series until possibly getting to
    VTS_02_1.VOB, and so on. How many files you have beyond the VTS_01_1.VOB file will depend on the size of the DVD-VIDEO.
    Does the above scenario apply to you?
    The alternative might be someone giving a DVD disc (data disc) which contains just the VTS files mentioned which were copied from
    the VIDEO_TS Folder. So, you do not get the whole VIDEO_TS Folder, just the essential video files. Does this scenario apply to you.
    I see no need to replace your Premiere Elements 4 with a later version unless you have a huge project and need a later version that will be a 64 bit application running specifically on Windows 7, 8, or 8.1 64 bit computer.
    Consider...Premiere Elements 4 and if you have DVD-VIDEO on DVD....
    1. Place the DVD disc in the burner tray
    2. Open Premiere Elements 4 and set the project preset for NTSC DV Standard (assuming you are working in a NTSC setup)
    3. Go to
    Get Media
    "DVD, Digital Camera, Mobile Phone, Hard Drive Camcorder, Card Reader"
    "Adobe Premiere Elements - Media Downloader" and its Advanced dialog.
    Set the Source in the latter dialog for the drive which has your DVD disc inserted in its tray
    You should see your VTS_01_1.VOB thumbnail in the "Adobe Premiere Elements - Media Downloader" Advanced dialog.
    With this VOB selected, click on Get Media to get the file from there into the project.
    Should work fine.
    Complications may be involved if the people who processed your footage gave you something other what is described above.
    Please review and consider, and then we can plan our project strategy accordingly.
    Thank you.
    ATR

  • Same file name at Target with change in file extension

    Hi,
    I am working on File to File scenario. I need to create target file name similar to the source file name. This can be achieved by using ASMA. But my requirement is to change the file extension for the target file.
    For example:
    Source File u2013 InvoiceNotification.txtu2026.Then target file should create as
    Target File - InvoiceNotification.csv
    This can be achieved by using OS Command unix script in the receiver communication channel.
    Is there any better way of doing this..say something like Dynamic Configuration or Variable substitution?
    Thank you.

    Hi Achuth,
    I think you are doing content conversion at the receiver side. Go ahead with ASMA, get the file name.
    DynamicConfigurationconf = (DynamicConfiguration)container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKeyFileName = DynamicConfigurationKey.create("http:/"+"/sap.com/xi/XI/System/File","FileName");
    conf.put(FileName, a);
    return "";
    In the receiver file adapter, keep the extension as .CSV. That's enough.
    Else you can follow as said by Abhishek Salvi. Either way you can achieve the requirement.
    Thanks,

  • Changing the file format

    hi guys,
    i hv a requirnment in which i need to read a file which is in .CGL format on a shared network path or application server which is nt possible to read directly so i need to first change the format of the file to .CSV and then read it using the FM KCD_CSV_FILE_TO_INTERN_CONVERT .
    so plz  tel me how to change the file extension
    thanks
    shivraj

    Not quite sure how you arrived at conclusion that CGL must be converted to CSV... CGL might turn out to be just a plain text file (e.g. many log files have .LOG extension but are just plain texts), in which case you can simply read it directly. Whether you'll be able to make sense of the file data - is another question and it depends on what is in that CGL file. Again, conversion to CSV might not even help.
    If CGL file is a proprietary format, you might not be able to read it in SAP at all without using some third-party tool.
    More info on CGL extension:
    http://pcsupport.about.com/od/fileextensions/f/cglfile.htm

  • Changing .dmg file extension doesn't work as expected

    Hi everybody,
    I wanted to change the file extension of an image of a floppy disk creating using Disk Uitility. The original extension is ".dmg". Changing this extension in the Finder window to ".flp" seems to work --- but only at first sight.
    Looking at the directory using Terminal, the image file now has the extension of ".flp.dmg". This is creating a lot of problems, for instance when using VMWare Fusion which does not want to mount disk image files with an extension not equal to ".flp".
    How to solve the problem?
    Try renaming the file in the Terminal using the command "mv". This really changed the file name. Worked for me!
    Question:
    Is this a problem of the Finder? (or a feature I don't understand?)
    Best Regards,
    Matthias

    In Finder, first ensure that Show Extension is selected in the Get Info window, then back in Finder, file.dmg can be manually altered to file.flp. A query will arise, "do you want to really change this to .flp?" will be asked and confirm that this is how you want it. Its new extension will remain visible.

  • Changing Movie File Extensions

    I have a bunch of .avi (home videos) that I want to upload into my iTunes Library.  Using handbrake, this would take weeks.  Why can't I simply change the file extension from .avi to .m4v or .mp4 and drag it into iTunes.  I've tried this once but iTunes isn't recognizing it.  Is my only option the long, tedious one?
    Thanks!

    AVI files are a completely different form of file to, for example, .mp4. To change from one to the other you have to re-code the entire file. Changing the extension has no effect on the file - its only function is to tell the Finder what program to use to open it. An AVI file with an .mp4 extension is still an AVI file and iTunes won't play it.

  • Is there a way to change the LUt extension form .CUBE to .cube. on export. TX

    Is there a way to change the LUt extension form .CUBE to .cube. on export with this script in photoshop For MAC:
    Chris Cox wrote:
    The file extensions are written by the export plugin.  (which incidentally has a comment that two studios wanted all caps extensions, but I failed to write down which ones in the comments)
    To change the filenames, you'd want to add something at the end of doExportLUTs() that uses the supplied path and substitutes the desired extensions, then renames the file.
    Thank you
    // Export Color Lookup Tables automation in JavaScript
    // IN_PROGRESS - why can't ColorSync Utility open any profile with a grid of 160 or larger?
    // 150 works, 160 fails -- sent samples in email to Apple on Nov 8, 2013; they are investigating
    // DEFERRED - right to left filenames (Arabic) come out wrong because of appending "RGB" and file extensions
    // This seems to be a bug in JavaScript's handing of strings, not sure we can solve it easily.
    // It might possibly be handled by checking bidi markers in UTF8 stream and adding custom handling for appending text/extensions.
    @@@BUILDINFO@@@ ExportColorLookupTables.jsx 1.0.0.0
    // BEGIN__HARVEST_EXCEPTION_ZSTRING
    <javascriptresource>
    <name>$$$/JavaScripts/ExportColorLookupTables/Menu=Color Lookup Tables...</name>
    <menu>export</menu>
    <enableinfo>true</enableinfo>
    <eventid>9AA9D7D6-C209-494A-CC01-4E7D926DA642</eventid>
    </javascriptresource>
    // END__HARVEST_EXCEPTION_ZSTRING
    #target photoshop
    const appUIState = app.displayDialogs;
    app.displayDialogs = DialogModes.NO; // suppress all app dialogs
    app.bringToFront(); // make Photoshop the frontmost app, just in case
    // on localized builds we pull the $$$/Strings from a .dat file
    $.localize = true;
    // from Terminology.jsx
    const classApplication = app.charIDToTypeID('capp');
    const classProperty = app.charIDToTypeID('Prpr');
    const enumTarget = app.charIDToTypeID('Trgt');
    const eventGet = app.charIDToTypeID('getd');
    const eventSet = app.charIDToTypeID('setd');
    const kcolorSettingsStr = app.stringIDToTypeID("colorSettings");
    const kDither = app.charIDToTypeID('Dthr');
    const keyTo = app.charIDToTypeID('T   ');
    const typeNULL = app.charIDToTypeID('null');
    const typeOrdinal = app.charIDToTypeID('Ordn');
    const kFloatWindowStr = app.stringIDToTypeID("floatWindow");
    const typePurgeItem = app.charIDToTypeID('PrgI');
    const enumClipboard = app.charIDToTypeID('Clpb');
    const eventPurge = app.charIDToTypeID('Prge');
    const keyExportLUT = app.charIDToTypeID( "lut " );
    const keyFilePath = app.charIDToTypeID( 'fpth' );
    const keyDescription = app.charIDToTypeID( 'dscr' );
    const keyCopyright = app.charIDToTypeID( 'Cpyr' );
    const keyDataPoints = app.charIDToTypeID( 'gPts' );
    const keyWriteICC = app.charIDToTypeID( 'wICC' );
    const keyWrite3DL = app.charIDToTypeID( 'w3DL' );
    const keyWriteCUBE = app.charIDToTypeID( 'wCUB' );
    const keyWriteCSP = app.charIDToTypeID( 'wCSP' );
    const kScriptOptionsKey = "9AA9D7D6-C209-494A-CC01-4E7D926DA642"; // same as eventID above
    const sGridMin = 7; // these must match the slider range defined in the dialog layout
    const sGridMax = 256;
    const sGridDefault = 32;
    // our baseline UI configuration info
    var gSaveFilePath = ""; // overwritten by document path
    var gDescription = ""; // overwritten by document name
    var gCopyright = ""; // "Adobe Systems Inc., All Rights Reserved";
    var gGridPoints = sGridDefault;
    var gDoSaveICCProfile = true;
    var gDoSave3DL = true;
    var gDoSaveCUBE = true;
    var gDoSaveCSP = true;
    gScriptResult = undefined;
    // start doing the work...
    main();
    app.displayDialogs = appUIState; // restore original dialog state
    gScriptResult; // must be the last thing - this is returned as the result of the script
    function readOptionsFromDescriptor( d )
      if (!d)
      return;
      if (d.hasKey(keyFilePath))
      gSaveFilePath = d.getString( keyFilePath ); // will be overridden by UI
      if (d.hasKey(keyDescription))
      gDescription = d.getString( keyDescription ); // will be overridden always
      if (d.hasKey(keyCopyright))
      gCopyright = d.getString( keyCopyright );
      if (d.hasKey(keyDataPoints))
      var temp = d.getInteger( keyDataPoints );
      if (temp >= sGridMin && temp <= sGridMax)
      gGridPoints = temp;
      if (d.hasKey(keyWriteICC))
      gDoSaveICCProfile = d.getBoolean( keyWriteICC );
      if (d.hasKey(keyWrite3DL))
      gDoSave3DL = d.getBoolean( keyWrite3DL );
      if (d.hasKey(keyWriteCUBE))
      gDoSaveCUBE = d.getBoolean( keyWriteCUBE );
      if (d.hasKey(keyWriteCSP))
      gDoSaveCSP = d.getBoolean( keyWriteCSP );
    function createDescriptorFromOptions()
      var desc = new ActionDescriptor();
      desc.putString( keyFilePath, gSaveFilePath ); // will be overridden by UI
      desc.putString( keyDescription, gDescription ); // will always be overridden by document name
      desc.putString( keyCopyright, gCopyright );
      desc.putInteger( keyDataPoints, gGridPoints );
      desc.putBoolean( keyWriteICC, gDoSaveICCProfile );
      desc.putBoolean( keyWrite3DL, gDoSave3DL );
      desc.putBoolean( keyWriteCUBE, gDoSaveCUBE );
      desc.putBoolean( keyWriteCSP, gDoSaveCSP );
      return desc;
    function doExportUI()
      // DEFERRED - it might be nice to be able to run without UI
      //  Right now we can't, but someone could modify the script if they so desire
      const sDescription = localize("$$$/AdobeScript/Export3DLUT/Description=Description:");
      const sCopyright = localize("$$$/AdobeScript/Export3DLUT/Copyright=Copyright:");
      const sQuality = localize("$$$/AdobeScript/Export3DLUT/Quality=Quality");
      const sGridPoints = localize("$$$/AdobeScript/Export3DLUT/GridPoints=Grid Points:");
      const sFormatsToSave = localize("$$$/AdobeScript/Export3DLUT/Formats=Formats");
      const sOpenButton = localize("$$$/JavaScripts/psx/OK=OK");
      const sCancelButton = localize("$$$/JavaScripts/psx/Cancel=Cancel");
      const strTextInvalidType = localize("$$$/JavaScripts/Export3DLUT/InvalidType=Invalid numeric value. Default value inserted.");
      const strTextInvalidNum = localize("$$$/JavaScripts/Export3DLUT/InvalidNum=A number between 7 and 256 is required. Closest value inserted.");
      const strNoExportsSelected = localize("$$$/JavaScripts/Export3DLUT/NoExportTypesSelected=No export types were selected.");
      const strExportPrompt = localize("$$$/JavaScripts/Export3DLUT/ExportColorLookup=Export Color Lookup");
      const strUntitledLUT = localize("$$$/JavaScripts/Export3DLUT/UntitledLUTFilename=untitled.lut");
      const sSaveICC = localize("$$$/AdobeScript/Export3DLUT/ICCProfile=ICC Profile");
      // these are not localized, since they refer to file format extensions
      const sSave3DL = "3DL";
      const sSaveCUBE = "CUBE";
      const sSaveCSP = "CSP";
      // strings similar to JPEG quality
      const sPoor = localize("$$$/AdobeScript/Export3DLUT/Poor=Poor");
      const sLow = localize("$$$/AdobeScript/Export3DLUT/Low=Low");
      const sMedium = localize("$$$/AdobeScript/Export3DLUT/Medium=Medium");
      const sHigh = localize("$$$/AdobeScript/Export3DLUT/High=High");
      const sMaximum = localize("$$$/AdobeScript/Export3DLUT/Maximum=Maximum");
      const ui = // dialog resource object
      "dialog { \
      orientation: 'row', \
      gp: Group { \
      orientation: 'column', alignment: 'fill', alignChildren: 'fill', \
      description: Group { \
      orientation: 'row', alignment: 'fill', alignChildren: 'fill', \
      st: StaticText { text:'Description:' }, \
      et: EditText { characters: 30, properties:{multiline:false}, text:'<your description here>' } \
      copyright: Group { \
      orientation: 'row', alignment: 'fill', alignChildren: 'fill', \
      st: StaticText { text:'Copyright:' }, \
      et: EditText { characters: 30, properties:{multiline:false}, text:'<your copyright here>' } \
      qual: Panel { \
      text: 'Quality', \
      orientation: 'column', alignment: 'fill', alignChildren: 'fill', \
      g2: Group { \
      st: StaticText { text:'Grid Points:' }, \
      et: EditText { characters:4, justify:'right' } \
      drp: DropDownList {alignment:'right'} \
      sl: Slider { minvalue:7, maxvalue:256, value: 32 }, \
      options: Panel { \
      text: 'Formats', \
      orientation: 'column', alignment: 'fill', alignChildren: 'left', \
      ck3DL: Checkbox { text:'3DL', value:true }, \
      ckCUBE: Checkbox { text:'CUBE', value:true } \
      ckCSP: Checkbox { text:'CSP', value:true } \
      ckICC: Checkbox { text:'ICC Profile', value:true } \
      gButtons: Group { \
      orientation: 'column', alignment: 'top', alignChildren: 'fill', \
      okBtn: Button { text:'Ok', properties:{name:'ok'} }, \
      cancelBtn: Button { text:'Cancel', properties:{name:'cancel'} } \
      const titleStr = localize("$$$/AdobeScript/Export3DLUT/DialogTitle/ExportColorLookupTables=Export Color Lookup Tables");
      var win = new Window (ui, titleStr ); // new window object with UI resource
        // THEORETICALLY match our dialog background color to the host application
        win.graphics.backgroundColor = win.graphics.newBrush (win.graphics.BrushType.THEME_COLOR, "appDialogBackground");
      // poor, low, medium, high, max
      var MenuQualityToGridPoints = [ 8, 16, 32, 64, 256 ];
      function GridPointsToQualityMenuIndex( num )
      var menu = MenuQualityToGridPoints;
      var menuItems = menu.length;
      if (num <= menu[0])
      return 0;
      if (num >= menu[ menuItems-1 ])
      return (menuItems-1);
      for (var i = 0; i < (menuItems-1); ++i)
      if ((num >= menu[i]) && (num < menu[i+1]))
      return i;
      return 0; // just in case of a logic failure
      // insert our localized strings
      var drop = win.gp.qual.g2.drp; // for easier typing
      drop.add('item', sPoor ); // 0
      drop.add('item', sLow ); // 1
      drop.add('item', sMedium ); // 2
      drop.add('item', sHigh ); // 3
      drop.add('item', sMaximum ); // 4
      drop.selection = drop.items[2]; // Medium
      win.gp.description.st.text = sDescription;
      win.gp.copyright.st.text = sCopyright;
      win.gp.qual.text = sQuality;
      win.gp.qual.g2.st.text = sGridPoints;
      win.gp.options.text = sFormatsToSave;
      win.gp.options.ck3DL.text = sSave3DL;
      win.gp.options.ckCUBE.text = sSaveCUBE;
      win.gp.options.ckCSP.text = sSaveCSP;
      win.gp.options.ckICC.text = sSaveICC;
      win.gButtons.okBtn.text = sOpenButton;
      win.gButtons.cancelBtn.text = sCancelButton;
      // set starting parameters
      win.gp.description.et.text = gDescription;
      win.gp.copyright.et.text = gCopyright;
      win.gp.options.ckICC.value = gDoSaveICCProfile;
      win.gp.options.ck3DL.value = gDoSave3DL;
      win.gp.options.ckCUBE.value = gDoSaveCUBE;
      win.gp.options.ckCSP.value = gDoSaveCSP;
      // global flag/hack to keep the UI pretty
      var gGlobalPreventChanges = false;
      with (win.gp.qual)
      sl.value = gGridPoints;
      g2.et.text = gGridPoints;
      drop.selection = drop.items[ GridPointsToQualityMenuIndex(gGridPoints) ];
      // global flag is ugly, but recursive change calls are uglier
      g2.et.onChange = function () {  if (gGlobalPreventChanges) { return; }
      gGlobalPreventChanges = true;
      var val = Number(this.text);
      this.parent.parent.sl.value = val;
      drop.selection = drop.items[ GridPointsToQualityMenuIndex(val) ];
      gGlobalPreventChanges = false; };
      sl.onChanging = function () {   if (gGlobalPreventChanges) { return; }
      gGlobalPreventChanges = true;
      var val = Math.floor(this.value);
      this.parent.g2.et.text = val;
      drop.selection = drop.items[ GridPointsToQualityMenuIndex(val) ];
      gGlobalPreventChanges = false; };
      // DEFERRED - we should also set the value if the same menu item is selected again (reset)
      // but the JSX toolkit doesn't support that
      drop.onChange = function()
      if (gGlobalPreventChanges) { return; }
      gGlobalPreventChanges = true;
      var theSelection = this.selection.text;
      if (theSelection != null) { // only change if selection made
      var theSelectionIndex = this.selection.index;
      var newGridPoints = MenuQualityToGridPoints[ theSelectionIndex ];
      win.gp.qual.g2.et.text = newGridPoints;
      win.gp.qual.sl.value = newGridPoints;
      gGlobalPreventChanges = false;
      win.onShow = function ()
      this.qual.sl.size.width = 128;
      this.layout.layout(true);
      win.gButtons.cancelBtn.onClick = function () { this.window.close(2); };
      // validate inputs when the user hits OK
        var gInAlert = false;
      win.gButtons.okBtn.onClick = function ()
      if (gInAlert == true)
      gInAlert = false;
      return;
      var gridText = win.gp.qual.g2.et.text;
      var w = Number(gridText);
      var inputErr = false;
      if ( isNaN( w ) )
      if ( DialogModes.NO != app.playbackDisplayDialogs )
      gInAlert = true;
      alert( strTextInvalidType );
      gInAlert = false;
      win.gp.qual.g2.et.text = sGridDefault;
      win.gp.qual.sl.value = sGridDefault;
      drop.selection = drop.items[ GridPointsToQualityMenuIndex(sGridDefault) ];
      return false;
      if ( (w < sGridMin) || (w > sGridMax) )
      if ( DialogModes.NO != app.playbackDisplayDialogs )
      gInAlert = true;
      alert( strTextInvalidNum );
      gInAlert = false;
      if ( w < sGridMin)
      inputErr = true;
      drop.selection = drop.items[ GridPointsToQualityMenuIndex(sGridMin) ];
      win.gp.qual.g2.et.text = sGridMin;
      win.gp.qual.sl.value = sGridMin;
      return false;
      if ( w > sGridMax)
      inputErr = true;
      drop.selection = drop.items[ GridPointsToQualityMenuIndex(sGridMax) ];
      win.gp.qual.g2.et.text = sGridMax;
      win.gp.qual.sl.value = sGridMax;
      return false;
      if (inputErr == false)
      win.close(true);
      return;
      win.center(); // move to center the dialog
      var ret = win.show();  // dialog display
      if (2 == ret)
      return false; // user cancelled
      // user hit OK, copy values from dialog
      gDescription = win.gp.description.et.text;
      gCopyright = win.gp.copyright.et.text;
      gGridPoints = win.gp.qual.sl.value;
      gDoSave3DL = win.gp.options.ck3DL.value;
      gDoSaveCUBE = win.gp.options.ckCUBE.value;
      gDoSaveCSP = win.gp.options.ckCSP.value;
      gDoSaveICCProfile = win.gp.options.ckICC.value;
      // if no files are going to be saved, then we have zero work to do
      if ((false == gDoSaveICCProfile) && (false == gDoSave3DL) &&
      (false == gDoSaveCUBE) && (false == gDoSaveCSP) )
      // tell the user that no formats were selected
      alert( strNoExportsSelected );
      gScriptResult = 'cancel'; // quit, returning 'cancel' (dont localize) makes the actions palette not record our script
      return false;
      // prompt user for directory and output base filename
      // default to directory and filename of current document
      var currentDocumentPath
      try
      // if the file has no path (not saved), then this throws
      var documentPath = app.activeDocument.fullName.fsName; // Get the OS friendly file path and name
      documentPath = documentPath.replace(/\....$/,''); // remove extension, if there is one
      documentPath = documentPath + ".lut"; // add dummy extension
      currentDocumentPath = File ( documentPath );
      catch (e)
      // if there was no document path, default to user's home directory
      var defaultName = "~/" + strUntitledLUT;
      currentDocumentPath = File(defaultName);
      var fname = currentDocumentPath.saveDlg(strExportPrompt);
      if (fname == null)
      return false;
      gSaveFilePath = fname.fsName;
      return true;
    function doExportLUTs( path )
      const keyUsing     = charIDToTypeID( 'Usng' );
      const eventExport = charIDToTypeID( 'Expr' );
      var desc = new ActionDescriptor();
      var desc2 = new ActionDescriptor();
      desc2.putString( keyFilePath, path );
      desc2.putString( keyDescription, gDescription );
      desc2.putInteger( keyDataPoints, gGridPoints );
      // assemble the full copyright string, if needed
      var copyrightAssembled = gCopyright;
      if (gCopyright != "")
      var theDate = new Date();
      // the year is from 1900 ????
      var theYear = (theDate.getYear() + 1900).toString();
      // Localization team says to just use the year
      var dateString = theYear;
      copyrightAssembled = localize("$$$/JavaScripts/Export3DLUT/Copyright=(C) Copyright ") + dateString + " " + gCopyright;
      desc2.putString( keyCopyright, copyrightAssembled );
      // select output format
      desc2.putBoolean( keyWriteICC, gDoSaveICCProfile );
      desc2.putBoolean( keyWrite3DL, gDoSave3DL );
      desc2.putBoolean( keyWriteCUBE, gDoSaveCUBE );
      desc2.putBoolean( keyWriteCSP, gDoSaveCSP );
        desc.putObject( keyUsing, keyExportLUT, desc2 );
      try
      var resultDesc = executeAction( eventExport, desc, DialogModes.NO );
      catch (e)
      if ( e.number != 8007 ) { // don't report error on user cancel
      var str = localize("$$$/JavaScripts/Export3DLUT/ExportLUTFailed=Unable to run the Export Color Lookup plugin because ");
      alert( str + e + " : " + e.line );
      gScriptResult = 'cancel'; // quit, returning 'cancel' (dont localize) makes the actions palette not record our script
      return false;
      return true;
    function doRenderGrid( points )
      // call the grid rendering plugin to do the work
        const keyRenderGrid = charIDToTypeID( "3grd" );
      const keyDataPoints2 = charIDToTypeID( 'grdP' );
      var args = new ActionDescriptor();
        args.putInteger( keyDataPoints2, points);
      try
      var result = executeAction( keyRenderGrid, args, DialogModes.NO );
      catch (e)
      if ( e.number != 8007 ) { // don't report error on user cancel
      var str = localize("$$$/JavaScripts/Export3DLUT/RenderGridFailed=Unable to render color grid because ");
      alert( str + e + " : " + e.line );
      gScriptResult = 'cancel'; // quit, returning 'cancel' (dont localize) makes the actions palette not record our script
      return false;
      return true;
    function resizeDocumentInPixels( width, height )
      var myDocument = app.activeDocument;
      var originalRulerUnits = app.preferences.rulerUnits;
      app.preferences.rulerUnits = Units.PIXELS;
      myDocument.resizeCanvas( width, height, AnchorPosition.MIDDLECENTER)
      app.preferences.rulerUnits = originalRulerUnits;
    function GetColorSettings()
      var desc1 = new ActionDescriptor();
      var ref1 = new ActionReference();
      ref1.putProperty( classProperty, kcolorSettingsStr );
      ref1.putEnumerated( classApplication, typeOrdinal, enumTarget );
      desc1.putReference( typeNULL, ref1 );
      var result = executeAction( eventGet, desc1, DialogModes.NO );
      var desc2 = result.getObjectValue( kcolorSettingsStr );
      return desc2;
    function GetColorConversionDitherState()
      var settings = GetColorSettings();
      if (settings.hasKey(kDither))
      return settings.getBoolean( kDither );
      else
      return null;
    function ConvertTo16Bit()
      const eventConvertMode = charIDToTypeID( 'CnvM' );
      const keyDepth = charIDToTypeID( 'Dpth' );
      var modeDesc16Bit = new ActionDescriptor();
      modeDesc16Bit.putInteger( keyDepth, 16 );
      var result = executeAction( eventConvertMode, modeDesc16Bit, DialogModes.NO );
    // state = true or false
    function SetColorConversionDither( state )
      var desc1 = new ActionDescriptor();
      var ref1 = new ActionReference();
      ref1.putProperty( classProperty, kcolorSettingsStr );
      ref1.putEnumerated( classApplication, typeOrdinal, enumTarget );
      desc1.putReference( typeNULL, ref1 );
      var desc2 = new ActionDescriptor();
      desc2.putBoolean( kDither, state );
      desc1.putObject( keyTo, kcolorSettingsStr, desc2 );
      executeAction( eventSet, desc1, DialogModes.NO );
    function PurgeClipboard()
      var desc1 = new ActionDescriptor();
      desc1.putEnumerated( typeNULL, typePurgeItem, enumClipboard );
      var result = executeAction( eventPurge, desc1, DialogModes.NO );
    // This helps us avoid resizing existing document views in tabbed document mode.
    // This is new functionality, and will not work in older Photoshop versions.
    function MoveDocumentToNewWindow()
      var desc1 = new ActionDescriptor();
      var result = executeAction( kFloatWindowStr, desc1, DialogModes.NO );
    function main()
      try
      var tempDoc = null;
      var tempDoc2 = null;
      // do basic troubleshooting first
      // make sure there is a document
      if (!app.activeDocument)
        gScriptResult = 'cancel'; // quit, returning 'cancel' (dont localize) makes the actions palette not record our script
      return;
      // check the document mode
      var mode = app.activeDocument.mode;
      if (mode != DocumentMode.RGB
      && mode != DocumentMode.LAB
      && mode != DocumentMode.CMYK)
      var str = localize("$$$/JavaScripts/Export3DLUT/UnsupportedColorMode=Could not export Color Lookup Tables because only RGB, LAB, and CMYK color modes are supported.");
      alert(str);
        gScriptResult = 'cancel'; // quit, returning 'cancel' (dont localize) makes the actions palette not record our script
      return;
      // check the document depth, for safety
      var depth = app.activeDocument.bitsPerChannel; // an object, not a number - why? I have no idea...
      var bitsPerChannel = 1;
      if (depth == BitsPerChannelType.EIGHT)
      bitsPerChannel = 8;
      else if (depth == BitsPerChannelType.SIXTEEN)
      bitsPerChannel = 16;
      else if (depth == BitsPerChannelType.THIRTYTWO)
      bitsPerChannel = 32;
      else
      var str = localize("$$$/JavaScripts/Export3DLUT/UnsupportedImageDepth=Could not export Color Lookup Tables because only 8, 16, and 32 bits/channel are supported.");
      alert(str);
        gScriptResult = 'cancel'; // quit, returning 'cancel' (dont localize) makes the actions palette not record our script
      return;
      // Check layer types: background plus adjustments only
      // For now, don't check each layer - a multiply solid layer still works as a color adjustment, as does selective blending
      // Users will get odd results from other layer types (layer masks, pixel layers, etc.)
      try
      app.activeDocument.backgroundLayer.visible = true;
      catch (e)
      if (activeDocument.layers.length == 1)
      alert( localize("$$$/JavaScripts/Export3DLUT/NoAdjustmentLayers=Could not export Color Lookup Tables because this document has no adjustment layers.") );
      else
      alert( localize("$$$/JavaScripts/Export3DLUT/NoBackground=Could not export Color Lookup Tables because this document has no background.") );
        gScriptResult = 'cancel'; // quit, returning 'cancel' (dont localize) makes the actions palette not record our script
      return;
      // look for last used params via Photoshop registry, getCustomOptions will throw if none exist
      try
      var desc = app.getCustomOptions(kScriptOptionsKey);
      readOptionsFromDescriptor( desc );
      catch(e)
      // it's ok if we don't have any existing options, continue with defaults
      // set some values from the document
      gDescription = app.activeDocument.name;
      // ask the user for options, bail if they cancel at any point
      if ( doExportUI() == false)
        gScriptResult = 'cancel'; // quit, returning 'cancel' (dont localize) makes the actions palette not record our script
      return;
      // we're good to go, so save our parameters for next time
      app.putCustomOptions(kScriptOptionsKey, createDescriptorFromOptions() );
      // remove file extension from filePath, if there is one
      gSaveFilePath = gSaveFilePath.replace(/\....$/,'');
      // calculate the size of image we need
      var width = gGridPoints * gGridPoints;
      var height = gGridPoints;
      if (mode == DocumentMode.CMYK)
      height = gGridPoints*gGridPoints;
      // duplicate the user document so we don't mess it up in any way
      tempDoc = app.activeDocument.duplicate("temporary");
      // make the temporary document active
      app.activeDocument.name = tempDoc;
      // to avoid resizing existing document views in tabbed mode
      MoveDocumentToNewWindow();
      // convert 8 bit documents to 16 bit/channel for improved quality of merged adjustments
      if (bitsPerChannel == 8)
      ConvertTo16Bit();
      depth = BitsPerChannelType.SIXTEEN;
      // resize the temporary canvas to our target size
      resizeDocumentInPixels( width, height )
      // select background layer
      tempDoc.activeLayer = tempDoc.backgroundLayer;
      // render lookup base grid
      var worked = doRenderGrid( gGridPoints );
      if (worked != true)
      tempDoc.close( SaveOptions.DONOTSAVECHANGES );
      return; // error should have already been shown, and there is not much we can do
      // do not flatten here -- the export automatically gets flattened data
      // and we may need layers for LAB->RGB conversion below
      // export the chosen formats
      worked = doExportLUTs( gSaveFilePath );
      if (worked != true)
      tempDoc.close( SaveOptions.DONOTSAVECHANGES );
      return; // error should have already been shown, and there is not much we can do
      // for LAB documents to export 3DLUT (which are inherently RGB), we have to do additional work
      // As a bonus, this works for CMYK as well!
      if ( mode != DocumentMode.RGB )
      var filePath = gSaveFilePath + "RGB";
      var oldDitherState = GetColorConversionDitherState();
      try
      SetColorConversionDither(false);
      const targetProfileName = "sRGB IEC61966-2.1";
      // new document temp2 in sRGB, matching depth of original
      var originalRulerUnits = app.preferences.rulerUnits;
      app.preferences.rulerUnits = Units.PIXELS;
      tempDoc2 = app.documents.add( width, gGridPoints, 72, "temp2",
      NewDocumentMode.RGB, DocumentFill.WHITE,
      1.0, depth, targetProfileName );
      app.preferences.rulerUnits = originalRulerUnits;
      // make the new doc active
      app.activeDocument.name = tempDoc2;
      // to avoid resizing existing document views in tabbed mode
      MoveDocumentToNewWindow();
      // insert grid
      worked = doRenderGrid( gGridPoints );
      if (worked == true)
      tempDoc2.selection.selectAll();
      tempDoc2.activeLayer = tempDoc2.backgroundLayer;
      tempDoc2.selection.copy();
      tempDoc2.close( SaveOptions.DONOTSAVECHANGES );
      tempDoc2 = null;
      // make sure temp1 is active
      app.activeDocument.name = tempDoc;
      // resize for RGB grid
      resizeDocumentInPixels( width, gGridPoints );
      tempDoc.selection.selectAll();
      tempDoc.paste(true);
      PurgeClipboard(); // so we don't leave an odd, large item on the clipboard
      tempDoc.selection.deselect();
      tempDoc.flatten();
      // convert temp1 to sRGB
      tempDoc.convertProfile( targetProfileName, Intent.RELATIVECOLORIMETRIC, true, false );
      // export the chosen formats
      worked = doExportLUTs( filePath );
      // at this point we still have to clean up, even if the call failed, so fall through
      else
      tempDoc2.close( SaveOptions.DONOTSAVECHANGES );
      catch (e)
      if ( e.number != 8007 ) { // don't report error on user cancel
      var str = localize("$$$/JavaScripts/Export3DLUT/UnableToConvertRGB=Unable to convert image to RGB because ");
      alert( str + e + " : " + e.line );
      if (tempDoc2 != null) tempDoc2.close( SaveOptions.DONOTSAVECHANGES );
      gScriptResult = 'cancel'; // quit, returning 'cancel' (dont localize) makes the actions palette not record our script
      // always reset the dither state
      SetColorConversionDither( oldDitherState );
      PurgeClipboard(); // so we don't leave an odd, large item on the clipboard
      } // if not RGB
      // always close temp document without saving
      tempDoc.close( SaveOptions.DONOTSAVECHANGES );
      catch (e)
      if ( e.number != 8007 ) { // don't report error on user cancel
      var str = localize("$$$/JavaScripts/Export3DLUT/UnableToExport=Unable to export LUT because ");
      alert( str + e + " : " + e.line );
      // always close temp document without saving
      if (tempDoc != null) tempDoc.close( SaveOptions.DONOTSAVECHANGES );
      gScriptResult = 'cancel'; // quit, returning 'cancel' (dont localize) makes the actions palette not record our script

    Hi blabla12345,
    (untested and without warranty)
    replace this line:
    const sSaveCUBE = "CUBE";
    with this:
    const sSaveCUBE = "cube";
    Have fun

  • How do I add a movie from my laptop to iTunes, what should be the file extension.

    How do I add a movie from my laptop to iTunes, what should be the file extension.

    The extension is usually .mov, .m4v, or .mp4.   But you can't just change the extension.  The movies have to be encoded in a particular fomat.  Anything downloaded from iTunes or plays in Quicktime player will be fine.

  • Why do the file extensions (.jpg .gif .png) no longer appear when I click on a previously saved image to use that image's file name (particularly important when saving a series of images using the same root name)?

    I save a lot of images using firefox, often times from a large batch or series of images. It used to be that I would click on a previously saved image and the entire file name including the file extension (i.e. image_example.jpg) would appear in the "save as" line. Now when I click on a previously saved file, the file name appears without the file extension (i.e. image_example). Which means I have to manually type .jpg every time. For a large collection of images that I am hoping to use the same root file name and then add chronological numbers at the end, this has become incredibly frustrating, especially as it is a previously unnecessary task.
    I am using a new Macbook Pro and maybe there's something Apple related to this...? It did not happen on my old PowerBook G4. I have file extensions turned on in System Preferences.
    It should be noted that I have searched high and low and have even gone into the Apple Genius Bar where they were just confused as I was and of course ended by urging me to use Safari (shocker!) as it has all kinds of new extensions and bells and whistles. I seriously feel alone on an island with this dumb, hard to google problem. Thanks so much for any help anyone out there might have.
    I mean: is this as simple as changing a setting in about:config?
    Your assistance is greatly appreciated.

    Thanks for your response Mylenium, however like I mentioned multiple times, I did change all of my trackpad/scrolling settings in system preferences.  And if I wanted to use a normal mouse (or a tablet), I would've gotten an iMac instead of a MacBook Pro.  I travel often and work all over the place, not always with access to a decently sized workspace that would be required for using a mouse or tablet.

  • On ESR 17, the DOCX attachments in my e-mail (I use Optonline) ignores the file extension. (my e-mail works fine with IE). This was fine with Firefox 10.0

    I have been using Firefox for a long time. I installed ESR 17 recently. Since then I can't open DOCX files in my e-mail (optonline.net). It comes up as "eFax Messanger files". It obviously does not reconginze the file extension because whe i try to open it using Word it reads it as if it was a text file. If I use IE I have no problem opening the same attachment in my e-mail. I know atleast two other people who have the same problem.

    See:
    *https://support.mozilla.org/kb/change-firefox-behavior-when-open-file
    *http://kb.mozillazine.org/File_types_and_download_actions
    *https://support.mozilla.org/kb/Managing+file+types
    Try to delete the mimeTypes.rdf file in the Firefox Profile Folder to reset all file actions.
    *http://kb.mozillazine.org/mimeTypes.rdf
    *http://kb.mozillazine.org/File_types_and_download_actions#Resetting_download_actions

  • I'm having problems uploading video taken with my iPhone 4 to Photobucket.  FB will not accept the file extension which is ex. IMG_423.  They will play on my computer and will upload to Facebook.  Why is the phone taking video with this file instead of so

    I'm having problems uploading video taken with my iPhone 4 to Photobucket.  FB will not accept the file extension which is ex. IMG_423.  They will play on my computer and will upload to Facebook.  Why is the phone taking video with this file instead of something like .mov or mp4.  How can I change the extension after the fact and avoid it in the future?

    You said, "the 4 also has signal and wifi whereas the 5 has only wifi". By "signal", I'm assuing that you mean cellular signal. If so, that means your iPhone 4 is still active on your cellular number and your iPhone 5 is not. Contact your carrier to sort out which phone is active on your account.

Maybe you are looking for

  • Is it possible to datamerge more than one image per page?

    I am building a product catalogue using datamerge.  Is it possible to data merge more than one image per page? (ie I have a logo, product image and dimensioned drawing to go with each product page) What would the coding be for the Data Field Name? Wo

  • Balancing field "Segment" in line item 001 not filled while posting through

    HI All, I am experiencing the below error while processing FB70 transaction in Foreign currency with Tax codes (earlier this problem was not there, this is happening recently). The error description as given below. "Balancing field "Segment" in line

  • How to use automator to convert text to audio file

    I have a MS Word file which I would like to convert to an audio file using the text to audio file script available in automator. Forgive my ignorance but I am having difficulty in finding how to do this. Can anyone give me a step by step approach. Th

  • AP Checks Cashed

    For AP checks cashed, do we run transaction code FCKR. We will upload the file from the bank through this transaction code, I understand. But will it also hit teh correct account (vendor, g/l account). Or is there another transaction to do it. Or do

  • Tracks of album split into 2 albums

    iTimes 11.1.3 -- some of my albums are split into sections that actually appear as if they are entirely separate albums. In all cases, these are albums that had been downloaded from iTunes Store (years ago). For example, I have 3 albums. For simplici