Modified version of the GL2DW extension

Hi everyone (and especially MenuMachine users),
After looking at the problems on this forum I have looked at the code of the GL2DW extension and have modified/fixed it in a couple of ways in order to address some issues:
1) the extension is now tolerant of any errors copying components or templates. If these errors occur, you will still see an error message but the conversion process will not abort. The extension will also use the Library folder if it can't find the Snippets folder.
2) the extension will no longer modify any MenuMachine code. This is important if you are still using MenuMachine to manage your menus in the converted site.
I have posted the patched extension here:
http://menumachine.com/download/GL2DW.zip
Hopefully this helps many of you.
As far as I can tell there is no official license or copyright notice for the GL2DW software so I think it's OK for me to post a modified version. If anyone at Adobe objects please contact me directly at [email protected] and hopefully we can work something out.

I was giving the GL2DW extension a try while trying to write up a step-by-step tutorial, and ran into a problem. Does the extension (this one, or the original from Adobe) not allow for editable template content in the head section? I know DW assumes the whole head section is locked unless an editable region is defined, but GoLive assumes the head section is editable, with head locked regions defined instead.
If I export a site from GL to DW, then make a change to a template file, the page-specific head content is lost. Is that the case for others too? Page-specific head content isn't supported?
If that's the case, the best solution I've come up with involves a relatively complex find and replace that gets rid of the head lock comments and wraps head editable comments around any head content above and below the template's head content. Seems like a pretty big problem though that could result in losing a good bit of site code if you weren't looking for it.

Similar Messages

  • Discard the Modified version of the data model

    Dear all,
    In BI 7.0, I have created a cube and activate it. Then, we modify the cube and save . The system now have 2 version(A & M) of the cube. If I decide that I don't want the modified version of the cube, is there any way we can delete the modifed vesion and do the enhance from activate version of the cube?
    Best Regards,
    Jeff

    In BW 3.5 there is a menu entry InfoCube -> Cancel Changes. This removes your changes and sets it back to the activated version. You should have the same entry in BI 7.0.
    Best regards
    Dirk
    Edited by: Dirk Herzog on Mar 11, 2008 1:51 PM

  • Does the newest version support the Delicious extension?

    Does the latest version of Firefox support the Delicious extension. This extension allows me to access Delicious as a sidebar. I do not want to upgrade if this extension is not yet available.

    You can force it to work on Firefox 10 by using the Add-on Compatibility Reporter:
    https://addons.mozilla.org/es-ES/firefox/addon/add-on-compatibility-reporter/?src=ss

  • Can I publish a modified version of the portable version of Firefox

    I want to create my own distribution Firefox
    Can I download the portable version of Firefox and add some add ons and modifications and then re-publish it ?
    If the answer is no
    What is the way to create my own distribution Firefox?
    Thanks

    As I understand it the portable version is already modified by a third party developer. The portable version is based on Firefox, and I presume it thus inherits trademark & copyright controls from Mozilla/Firefox.
    In addition to the link in the above post also see
    *http://www.mozilla.org/foundation/trademarks/index.html
    You will note from the link in the first post that there are fairly heavy restrictions if you use the Firefox name and logo, and furthermore restrictions on what you must & must not do if you modify Firefox even when you do not use the name.

  • I want the phone version of my site to use the same url as the desktop version. How can I do this without the "phone" extension in the url?

    How do I get the phone version of my site to use the same url as the desktop version -- without the "phone" extension.  when someone posted a link to my site, they posted it from their phone and it included /phone. Now when people click on it - - it goes straight to the phone version of the site.

    Please refer to similar post here :
    https://forums.adobe.com/thread/1577934?sr=inbox
    Thanks,
    Sanjit

  • LR HTML Web Gallery -- modified version with great features is available

    For anyone using the default Lightroom HTML Web Gallery, one of our associates here has offered a modified version with some great added features.
    John Beardsworth's site -- Lightroom Solutions - http://lightroomsolutions.com/ -- is a wonderful resource for LR tips, plug-ins, information, etc. 
    The default HTML gallery is fine, but I always found it lacked features.  I mentioned this to Ian Lyons (http://www.computer-darkroom.com/) a couple of years ago, and he sent me a modified version with the ability to specify up to 100 rows by using sliders instead of the grid.  When I tried John's modified version, it had some other good features.  I thought.... what if the two modified versions could be combined?  So, I shot John an email, and low and behold, he uploaded a new version of the gallery to his site.  Thank you, Ian and John!
    Here is the link:
    http://lightroomsolutions.com/my-tweaked-built-in-html-gallery/
    Here are the added features that I find most useful:
    Number of rows (up to 100) and columns can be specified using sliders rather than the grid
    Thumbnail images can be sized to your specification
    Filename can be placed on each thumbnail, and you specify size of text
    Clicking the large image advances to the next image rather than returning to the top of the thumbnail page (no need to use the 'next' link)
    See the site for other added features.  (If you already have John's version, the newer version has the same file name and went online April 17, 2013.)
    PLEASE NOTE:  John Beardsworth's HTML gallery is NOT supported by John or Adobe, and is offered "as-is."
    I hope others will find this as useful and I have.
    John

    I've done a version of this where the large file links to the medium and it works no problem. code is based on tutorial code I've already written..
    I'd need to see more code to see where the issue might be..
    Here's what I have:
    (I opted not to put the files in "content", also ignore margin-top, it's not relevent to this)
    AddGridPages {
    template='grid.html',
    rows=model.nonCSS.numRows,
    columns=model.nonCSS.numCols,
    AddCustomCSS {
    filename='resources/css/custom.css',
    AddResources {
    source='resources',
    destination='resources',
    AddPhotoPages {
    template='detail.html',
    variant='_large',
    destination="",
    AddPhotoPages {
        template='medium.html',
        variant='_medium',
        destination="",
    In medium.html
    <div id="detailContainer">
    <div style="margin-top:<%= margintop %>px;">
    <img src="bin/images/med/<%= image.exportFilename %>.jpg" alt="$image.metadata.description"/></div>
    </div>
    in detail.html
    <div id="detailContainer">
    <div style="margin-top:<%= margintop %>px;">
    <a href="<%= image.exportFilename %>_medium.html"><img src="bin/images/photo/<%= image.exportFilename %>.jpg" alt="$image.metadata.description"/></a></div>
    </div>

  • Wanted: a modified version of PlaceMultipagePDF -- to impose

    SCRIPT TO IMPOSE AN INCOMING PDF
    I need a script that uses a modified version of the sample script supplied with CS4 (called PlaceMultiPagePDF.jsx, or the Applescript equivalent). Instead of placing the pages sequentially:
    1 –> 1
    2 –> 2
    3 –> 3...
    the script would place the PDF pages in 2-Up Perfect Bound imposition order. The arrangement is outlined in the attached document. It would be very flexible to allow for any combination of signature lengths. As a simple example, for a 8-page booklet, the script would place the pages from the PDF in this order in InDesign:
    1 –> 2
    2 –> 3
    3 –> 6
    4 –> 7
    5 –> 6
    6 –> 5
    7 –> 4
    8 –> 1
    I have written a Pidgin BASIC code that handles the page sequencing (see attached document), but I have to steer clear of actually scripting it -- my programming skills end at MS BASIC ca 1986 (which I still use occasionally on my 512k Fat Mac as I can't get anything out of modern BASIC). Why did they ever complicate things with Java and the like?
    Anyway, I have manually stepped through my flowchart several times and haven't come across an error, so all that is required ("all" he says, in hope) is to interrupt the pages coming from the PDF, and instead of 1 -> 1, 2->2... the script steps in and says "Whoa there... you're not going to page 315, you're going to page 297. Would it be that simple? As simple as inserting a bit of renumbering code as per my flowchart?
    I hope so.
    If anyone is interested, please let me know.

    Thanks for the script, Jongware, but it is not quite what I need.I think yours generates one huge saddle-stitch arrangement, whereas I want the ability to generate a group of smaller ones (effectively a variable-length perfect-bound arrangement), thus my listing of "numbers of sheets" in each signature as the input.
    Someone has been kind enough to write an Applescript that does the job. I haven't fully tested it, but really, what is there to test? It seems to work for me. One problem: it can't handle InDesign page numbers other than plain numbers, but I can work around that if I need to. Imposition from InDesign here I come -- run the script, paste the output into Page Range of the Export dialog box, and stand back while the bytes fly.
    If a script could be run from the open Export window (to allow setting up of the various options), this script (or a JS version) could be carried one step further, not that I'm wanting to at this stage. The start page and the various signature lengths could be entered; options set up in the Export window; then the script could:
    1. Generate the imposed number sequence and place them into the Page Range field of the active document;
    2. Export the PDF;
    3. Call on PlaceMultipagePDF, set to automatically create a new InDesign document and place the PDF pages.
    It would be a very flexible, simple way of obtaining variable-length, 2-Up imposition from InDesign.
    SCRIPT TO IMPOSE VARIABLE-LENGTH 2-UP SIGNATURES
    set start to 1 -- overwrite with your starting page number
    set s to {8, 1, 0} -- overwrite with the number of pages in each signature; any number of signatures allowed; must have 0 at end to stop.
    set n to 1
    set begin to start
    set _end to start - 1 + 4 * (item n of s)
    set outputStr to ""
    repeat
    set a to _end
    set b to begin
    set c to begin + 1
    set d to _end - 1
    set halfway to (begin + _end) / 2
    repeat while b < halfway
    set outputStr to outputStr & a & ","
    set outputStr to outputStr & b & ","
    set outputStr to outputStr & c & ","
    set outputStr to outputStr & d & ","
    set a to a - 2
    set b to b + 2
    set c to c + 2
    set d to d - 2
    end repeat
    set n to n + 1
    if item n of s = 0 then exit repeat
    set begin to _end + 1
    set _end to _end + 4 * (item n of s)
    end repeat
    set the clipboard to outputStr
    return outputStr

  • Is it possible to change iWork files on your iMac without having to upload the modified version to iCloud and downloading it again for the next use ?

    Recently I am getting more and more familiar with Numbers, Pages, KeyNote and I have to acknowledge they look smart in many aspects compared to Office for Mac programs ( ..only a bit of time to learn some minor things..). But what really surprises me is that while shifting from MobileMe to ICloud, Apple is not providing a real , full-service, cloud-computing platform for those who , like me, makes use of it mostly for work or business purposes.. I mean, you can do whatever from your Ipad or Iphone ( besides clearly ignoring the necessity one may build up folders with any kind of file in it, not just one categoory..) and every file you manage from these mobile devices, get saved and stored in the new modified version.. But try doing the same form your Imac or McBook Air and you wil have to download from Icloud your file, work on it and having to re-upload onto Icloud back again ==> syncing is not authomatic as it used to be by Idisk in MobileMe  !!.. A real nightmare for those who work with Apple, in my opinion.
    One last thing.. I am having trouble at dragging and dropping PDF files onto Icloud, doesn't accept its format.. Although PDF files are mentioned as acceptable at Pages , for example...
    I can't see the reasons for all this.. At first I thought this was all being done in order to move more and more users from Windows office to IWork programs, if it were for this, I'd be keen on changing, also because I love Iworks programs.. But I found out it's not !.. Unless people at Apple think that all business driven users of former MobileMe should quit their Imac and start working 8-10 hrs a day with the Ipad   :-) !!
    No fear, I know there are plenty of cloud-computing services doing the same as IDisk, but I can't understand why Apple has given so little attention to such needs, that , I guess, are probably the same by many other Mac users..
    Thankful for any help-support-opinion on this,
    Maurizio

    m,
    You can submit Feedback to Apple from the Numbers menu. That's the official channel for comments about the app and suggestions for improvement. The Apple officials don't visit these discussions except to maintain the decorum.
    Jerry

  • "Another program on your computer would like to modify Firefox with the following add-on" - how do I allow extensions?

    I cannot get extensions to run or enable, nor does the browser remember my preference.
    For example, after I install or Enable an extension, when I restart Firefox I get a tab for every extension that forces me to check "Allow this installation" after the prompt "Another program on your computer would like to modify Firefox with the following add-on".
    Moreover, when I click 'Options' on an installed extension, Firefox freezes permanently.
    Note that I DO NOT have any extensions.* files in my Profile folder, nor do they appear.
    I am trying to get MozRepl running. I am able to install it, but the menu option does not get added in the 'Tools' menu. Moreover none of the installed extensions are able to add to the menu.
    I've tried every solution in the following links
    https://support.mozilla.org/en-US/questions/929335
    http://kb.mozillazine.org/Preferences_not_saved
    https://support.mozilla.org/en-US/kb/how-to-fix-preferences-wont-save
    I have made the Profiles\ folder and all subfolders Read-only, including the files.
    I have tried the "Reset Firefox to its default state".
    I have tried uninstalling (including removing all profiles/data) and re-installing Firefox, and I get the same issues.
    My operating system is Windows 7 and I have McAfee SiteAdvisor Enterprise Plus and McAfee VirusScan Enterprise + AntiSpyware Enterprise.

    Check that Firefox isn't set to run as Administrator.
    Right-click the Firefox desktop shortcut and choose "Properties".
    Make sure that all items are deselected in the "Compatibility" tab of the Properties window.
    * Privilege Level: "Run this program as Administrator" should not be selected
    * "Run this program in compatibility mode for:" should not be selected
    Also check the Properties of the firefox.exe program in the Firefox program folder (C:\Program Files\Mozilla Firefox\).

  • Framemaker uses $filename for short file name, can we edit this to change appearance? We do not want the short file name of long filename to include the .fm extension can this be removed or modified to make this happen?

    Framemaker uses <$filename> for short file name, can we edit this to change appearance? We do not want the short file name of long filename to include the .fm extension can this be removed or modified to make this happen? In compiling our books it would be helpful to not have this extension appear as it then requires us to create extra files without them.

    See: System Variables

  • What is this error message about, "The system extension "/Library/Frameworks/PrivateTunnel.framework/Versions/Current/Extensions/tap.ke xt" was installed improperly and cannot be used"?

    It appears as a window with the following text, "System extension cannot be used.  The system extension “/Library/Frameworks/PrivateTunnel.framework/Versions/Current/Extensions/tap.ke xt” was installed improperly and cannot be used.  Please try reinstalling it, or contact the product's vendor for an update."
    I close it by clicking "Ok", and it doesn't seem to affect the system performance in any way, but it's annoying knowing that it's there.  The problem is quite old, and has persisted through several OSX updates.

    hello,
    I have the same problem. does anyone have any ideas on what's going on and or how to fix it.
    Thanks!!
    Luis

  • The system extension "/Library/Frameworks/PrivateTunnel.framework/Versions/Current/Extensions/tap.ke xt" was installed improperly and cannot be used. Please try reinstalling it, or contact the product's vendor for an update.

    My MacBookPro freezes and i have to force shut it down and restart.
    It then gives me these errors...
    The system extension “/Library/Frameworks/PrivateTunnel.framework/Versions/Current/Extensions/tun.ke xt” was installed improperly and cannot be used. Please try reinstalling it, or contact the product’s vendor for an update.
    The system extension “/Library/Frameworks/PrivateTunnel.framework/Versions/Current/Extensions/tap.ke xt” was installed improperly and cannot be used. Please try reinstalling it, or contact the product’s vendor for an update.
    What does this mean? How can I fix it so it doesn't freeze again.
    (All software up to date)

    hello,
    I have the same problem. does anyone have any ideas on what's going on and or how to fix it.
    Thanks!!
    Luis

  • Does the current SSRS version supports the xlsb excel file extension?

    I've found answers that the SSRS doesn't support the xlsb file type but it was way back 2013:
    https://social.msdn.microsoft.com/forums/sqlserver/en-US/94c57862-281e-480a-b442-c2e907778bd8/ssrs-excel-render-and-save-as-excel-binary-xlsb
    Does the current version (Reporting Services 2012) of Reporting Services already support this kind of file? Where can I see the list of file type that the Reporting Services is supporting?

    Hi zoldyk15,
    In Reporting Services 2012, it doesn’t support .xlsb render. For your requirement, you could provide Microsoft a feature request at
    https://connect.microsoft.com/SQLServer so that we can try to modify and expand the product features based on your needs.
    If you have any question, please feel free to ask.
    Best regards,
    Qiuyun Yu
    Qiuyun Yu
    TechNet Community Support

  • I am having trouble downloading an extension for flash, despite having the most up to date flash version for Adobe Manager Extension CC. What would cause this to happen?

    I am having trouble downloading an extension for flash, despite having the most up to date flash version for Adobe Manager Extension CC. What would cause this to happen? It says I need to have flash 7 or higher. I have the most update flash available according to my browsers.

    If you are using Flash Pro CC 2014, please update Extension Manager CC to 7.2.1. Then please confirm whether Flash is shown in the product panel of Extension Manager CC. If not, please refer to Re: Why can't I see InDesign CC in my Extension Manager CC.

  • 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

Maybe you are looking for

  • Getting errors while creating asm disk groups

    while creating disk groups on 10gR2 database on linux redhat 5.3 im getting following errors : ERROR at line 1: ORA-15018: diskgroup cannot be created ORA-15031: disk specification '/dev/raw/raw4' matches no disks ORA-15025: could not open disk '/dev

  • Macbook Pro (retina) issues with Windows 8

    on MacbookPro (retina), running Windows 8 over Boot Camp, attempt to run Boot Camp Control Panel results in error message related with lack of administrative privileges to access the startup disk settings. Also, FaceTime HD camera is not available an

  • IPhone 6+ not available at local corporate store - INSTANT savings not available

    My wife and I are ready for upgrades, we were excited to learn about the trade-in promotion for a new 6 or 6+.  Be both have 4's in perfect condition.  We visited the "Verizon" store in St. Joseph MI.  We were told they are not a corporate store and

  • Storing a mutable ArrayList in cache

    Hi - I have an object as follows Entity { key k; collection<Person> personList; Each time, i get a new person, I want to add the person to the list. But when I try this, I get unsupported operation and found that the arraylist that I stored became im

  • Ipod touch restore keeps stopping mid download, what do I do?

    Trying to restore an Ipod touch that was used as a store demo and is locked. No one knows the code and the restore download keeps stopping mid download. What can I try next?