How to create "ALL" preferences of spotHealingBrushTool?

When I select spotHealingBrushTool in an action I can only put the brush diameter, etc, but not the
Mode:Normal
Type: Content-Aware
Sample All Layers: true
ScriptListener does not detect it.
Anyone has done this?
selectTool('spotHealingBrushTool');
// Missing:
// Mode:Normal
// Type: Content-Aware
// Sample All Layers: true
var idsetd = charIDToTypeID( "setd" );
    var desc51 = new ActionDescriptor();
    var idnull = charIDToTypeID( "null" );
        var ref16 = new ActionReference();
        var idBrsh = charIDToTypeID( "Brsh" );
        var idOrdn = charIDToTypeID( "Ordn" );
        var idTrgt = charIDToTypeID( "Trgt" );
        ref16.putEnumerated( idBrsh, idOrdn, idTrgt );
    desc51.putReference( idnull, ref16 );
    var idT = charIDToTypeID( "T   " );
        var desc52 = new ActionDescriptor();
        var idDmtr = charIDToTypeID( "Dmtr" );
        var idPxl = charIDToTypeID( "#Pxl" );
        desc52.putUnitDouble( idDmtr, idPxl, 40.000000 );
        var idHrdn = charIDToTypeID( "Hrdn" );
        var idPrc = charIDToTypeID( "#Prc" );
        desc52.putUnitDouble( idHrdn, idPrc, 50.000000 );
        var idAngl = charIDToTypeID( "Angl" );
        var idAng = charIDToTypeID( "#Ang" );
        desc52.putUnitDouble( idAngl, idAng, 0.000000 );
        var idRndn = charIDToTypeID( "Rndn" );
        var idPrc = charIDToTypeID( "#Prc" );
        desc52.putUnitDouble( idRndn, idPrc, 100.000000 );
        var idSpcn = charIDToTypeID( "Spcn" );
        var idPrc = charIDToTypeID( "#Prc" );
        desc52.putUnitDouble( idSpcn, idPrc, 25.000000 );
        var idIntr = charIDToTypeID( "Intr" );
        desc52.putBoolean( idIntr, true );
        var idflipX = stringIDToTypeID( "flipX" );
        desc52.putBoolean( idflipX, false );
        var idflipY = stringIDToTypeID( "flipY" );
        desc52.putBoolean( idflipY, false );
    var idcomputedBrush = stringIDToTypeID( "computedBrush" );
    desc51.putObject( idT, idcomputedBrush, desc52 );
executeAction( idsetd, desc51, DialogModes.NO );
function selectTool(tool) {
    var desc9 = new ActionDescriptor();
        var ref7 = new ActionReference();
        ref7.putClass( app.stringIDToTypeID(tool) );
    desc9.putReference( app.charIDToTypeID('null'), ref7 );
    executeAction( app.charIDToTypeID('slct'), desc9, DialogModes.NO );

Some notes before the code. I think the easiest way to work with presets is by name and embedded the preset in the script. But the preset names need to be unique. If the user already has a tool preset with the same name this script will use the first name match if finds.
File.prototype.writeByte = function(b) {
  this.write(String.fromCharCode(b));
function loadPreset(file){
    var desc = new ActionDescriptor();
    var ref = new ActionReference();
    ref.putProperty( charIDToTypeID( "Prpr" ), stringIDToTypeID( "toolPreset" ) );
    ref.putEnumerated( charIDToTypeID( "capp" ),charIDToTypeID( "Ordn" ), charIDToTypeID( "Trgt" ));
    desc.putReference( charIDToTypeID( "null" ), ref );
    desc.putPath( charIDToTypeID( "T   " ), new File( file ) );
    desc.putBoolean( charIDToTypeID( "Appe" ), true );
    executeAction(charIDToTypeID( "setd" ), desc, DialogModes.NO );
function selectTool(tool) {
    var desc = new ActionDescriptor();
        var ref = new ActionReference();
        ref.putClass( app.stringIDToTypeID(tool) );
    desc.putReference( app.charIDToTypeID('null'), ref );
    executeAction( app.charIDToTypeID('slct'), desc, DialogModes.NO );
function selectPreset(presetName){
    var desc = new ActionDescriptor();
    var ref = new ActionReference();
    ref.putName( stringIDToTypeID( "toolPreset" ), presetName );
    desc.putReference( charIDToTypeID( "null" ), ref );
    executeAction( charIDToTypeID( "slct" ), desc, DialogModes.NO );
var kSpotHealingBrush = 'spotHealingBrushTool';
// tool preset names should be unique. This example only uses one preset
// but the embedded preset could have as many presets as you need.
var toolPresetName = 'Spot Healing Brush Tool Hard Round 19 1';
selectTool(kSpotHealingBrush);
try{
    selectPreset(toolPresetName);// if a preset with that name already exists use it
}catch(e){// else load the preset(s) and try again
    // optional - create new preset file from embedded data and load. Delete all lines in catch if not  using fallback
    // data from a .tpl file. This data is for one preset but it could contain as many as you need
    var toolPresetBinaryArray = [56,66,84,80,0,0,0,3,0,0,0,1,56,66,73,77,116,112,116,112,0,0,4,124,0,0,0,1,0,0,0,40,0,83,0,112,0,111,0,116,0,32,0,72,0,101,0,97,0,108,0,105,0,110,0,103,0,32,0,66,0,114,0,117,0,115,0,104,0,32,0,84,0,111,0,111,0,108,0,32,0,72,0,97,0,114,0,100,0,32,0,82,0,111,0,117,0,110,0,100,0,32,0,49,0,57,0,32,0,49,0,0,0,0,0,16,0,0,0,1,0,0,0,0,0,20,115,112,111,116,72,101,97,108,105,110,103,66,114,117,115,104,84,111,111,108,0,0,0,25,0,0,0,4,102,108,111,119,108,111,110,103,0,0,0,100,0,0,0,0,77,100,32,32,101,110,117,109,0,0,0,0,66,108,110,77,0,0,0,0,78,114,109,108,0,0,0,0,79,112,99,116,108,111,110,103,0,0,0,100,0,0,0,0,66,114,115,104,79,98,106,99,0,0,0,1,0,0,0,0,0,13,99,111,109,112,117,116,101,100,66,114,117,115,104,0,0,0,8,0,0,0,0,68,109,116,114,85,110,116,70,35,80,120,108,64,51,0,0,0,0,0,0,0,0,0,0,72,114,100,110,85,110,116,70,35,80,114,99,64,89,0,0,0,0,0,0,0,0,0,0,65,110,103,108,85,110,116,70,35,65,110,103,0,0,0,0,0,0,0,0,0,0,0,0,82,110,100,110,85,110,116,70,35,80,114,99,64,89,0,0,0,0,0,0,0,0,0,0,83,112,99,110,85,110,116,70,35,80,114,99,64,57,0,0,0,0,0,0,0,0,0,0,73,110,116,114,98,111,111,108,1,0,0,0,5,102,108,105,112,88,98,111,111,108,0,0,0,0,5,102,108,105,112,89,98,111,111,108,0,0,0,0,14,117,115,101,84,105,112,68,121,110,97,109,105,99,115,98,111,111,108,1,0,0,0,5,102,108,105,112,88,98,111,111,108,0,0,0,0,5,102,108,105,112,89,98,111,111,108,0,0,0,0,15,98,114,117,115,104,80,114,111,106,101,99,116,105,111,110,98,111,111,108,0,0,0,0,15,109,105,110,105,109,117,109,68,105,97,109,101,116,101,114,85,110,116,70,35,80,114,99,0,0,0,0,0,0,0,0,0,0,0,16,109,105,110,105,109,117,109,82,111,117,110,100,110,101,115,115,85,110,116,70,35,80,114,99,64,57,0,0,0,0,0,0,0,0,0,9,116,105,108,116,83,99,97,108,101,85,110,116,70,35,80,114,99,64,105,0,0,0,0,0,0,0,0,0,0,115,122,86,114,79,98,106,99,0,0,0,1,0,0,0,0,0,0,98,114,86,114,0,0,0,4,0,0,0,0,98,86,84,121,108,111,110,103,0,0,0,2,0,0,0,0,102,83,116,112,108,111,110,103,0,0,0,25,0,0,0,6,106,105,116,116,101,114,85,110,116,70,35,80,114,99,0,0,0,0,0,0,0,0,0,0,0,0,77,110,109,32,85,110,116,70,35,80,114,99,0,0,0,0,0,0,0,0,0,0,0,13,97,110,103,108,101,68,121,110,97,109,105,99,115,79,98,106,99,0,0,0,1,0,0,0,0,0,0,98,114,86,114,0,0,0,4,0,0,0,0,98,86,84,121,108,111,110,103,0,0,0,0,0,0,0,0,102,83,116,112,108,111,110,103,0,0,0,25,0,0,0,6,106,105,116,116,101,114,85,110,116,70,35,80,114,99,0,0,0,0,0,0,0,0,0,0,0,0,77,110,109,32,85,110,116,70,35,80,114,99,0,0,0,0,0,0,0,0,0,0,0,17,114,111,117,110,100,110,101,115,115,68,121,110,97,109,105,99,115,79,98,106,99,0,0,0,1,0,0,0,0,0,0,98,114,86,114,0,0,0,4,0,0,0,0,98,86,84,121,108,111,110,103,0,0,0,0,0,0,0,0,102,83,116,112,108,111,110,103,0,0,0,25,0,0,0,6,106,105,116,116,101,114,85,110,116,70,35,80,114,99,0,0,0,0,0,0,0,0,0,0,0,0,77,110,109,32,85,110,116,70,35,80,114,99,0,0,0,0,0,0,0,0,0,0,0,12,117,115,101,66,114,117,115,104,80,111,115,101,98,111,111,108,0,0,0,0,24,117,115,101,80,114,101,115,115,117,114,101,79,118,101,114,114,105,100,101,115,83,105,122,101,98,111,111,108,0,0,0,0,27,117,115,101,80,114,101,115,115,117,114,101,79,118,101,114,114,105,100,101,115,79,112,97,99,105,116,121,98,111,111,108,0,0,0,0,9,117,115,101,76,101,103,97,99,121,98,111,111,108,0,0,0,0,0,83,116,109,83,98,111,111,108,0,0,0,0,0,83,116,109,66,98,111,111,108,0,0,0,0,0,83,116,109,73,98,111,111,108,0,0,0,0,0,83,116,109,65,98,111,111,108,0,0,0,0,0,73,109,112,115,98,111,111,108,0,0,0,0,0,83,109,112,83,101,110,117,109,0,0,0,0,83,109,112,84,0,0,0,0,83,114,99,78,0,0,0,0,83,109,109,83,101,110,117,109,0,0,0,0,83,109,109,84,0,0,0,0,67,110,116,87];
    var tempPresetFile = new File(Folder.temp+'/spotHealingBrushPreset.tpl');
    tempPresetFile.encoding = 'BINARY';
    tempPresetFile.open("w");
    tempPresetFile.seek(0, 0);
    for(i=0;i<toolPresetBinaryArray.length;i++){
        tempPresetFile.writeByte(toolPresetBinaryArray[i]);
    tempPresetFile.close();
    loadPreset(tempPresetFile);
    selectPreset(toolPresetName);// should work now the preset is loaded
To get the data from the .tpl file you need to create a preset with a unique name. In the Preset Manager you select the preset(s) and save a new set. Then run this script in ESTK. The needed data will be in the console. Copy and paste into the main script replacing the data in the toolPresetBinaryArray array. Note this only needs to be done once to get the data. Once you have the data it is no longer needed by the main script.
File.prototype.readByte = function() {
  return this.read(1).charCodeAt(0);
// run in ExtendScript Toolkit
// replace this file reference with the path to your preset file
var file = new File("~/desktop/Untitled Tool Presets.tpl");
var tag = new Array
file.open("r");
file.encoding = 'BINARY';
file.seek(0, 0);
for(i=0;i<file.length;i++){
tag.push(file.readByte());
$.writeln(tag);
file.close();
By embedding the preset you don't have to worry about distributing and installing the .tpl file with your script.

Similar Messages

  • How to create all Integration Directory with Directory API

    How to create all Integration Directory
    elements (Receiver determination, Interface Mapping, Communication channel Etc ) using Directory API
    Can we upload multiple elements in ID from list in Excel sheet

    Take a look to this "How TO", can be really helpful for your requirements:
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/a0336199-d3c7-2c10-c983-f8a945a4588c?QuickLink=index&overridelayout=true

  • How to Create all Pages text in Outline

    Adobe Indesign CS5 : How to Create all Pages text in Outline
    or how to Create Scripts for Create Outline Text
    One step Solution
    plz Freinds....
    thnx
    [email rmoved by forum host]

    Oh and sorry I don't know of a script.
    My last post was just a "warning" to whomever else may stumble on this thread. It was more for posterity, if it helps you then great. If it helps others then great.
    There are certain circumstances and unusual times where you'd need to do this. And I don't know of a way to automate it.
    You can get 3rd Party Acrobat PDF plugins that will do it (my mind has gone blank on their names?)
    Here's a nice tut with a transparency script also added http://www.stevewareham.com/text2outlines.php
    BUT if you want to do this in Acrobat Pro
    Add a Watermark under Document>Watermark>Add
    Make sure the text covers all the space in the PDF where text could lie
    Or you could use an image - say a full page black JPG or something
    Set the Opacity to 0
    the watermark will be added to all pages
    Then Advanced>Flattener Preview
    make sure Convert text to outlines is selected
    Select the option for All Pages in Document
    Click Appy
    Flatten the PDF and all the text should convert under the flattening

  • How to create an HGRID in OAF??? please help

    hi All, i am new oaf developer, i need to show party information as a tree (organization and its parties)
    do you have a simple example of how to do it? step by step how to create all needed for a Tree to work? i followed the seeded tutorials and created pages, but i cannot find the hgrid sample.
    thanks a lot!!
    Pablo.

    Refer Dev guide -> Chapter 4 -> Hgrid
    --Prasanna                                                                                                                                                                                                               

  • How to create a home page (with flash images) in Oracle Portal  10g

    Hi,
    I want to create a home page in Oracle Portal 10g using flash images.
    How to create all those things ?
    Weather it should be created in pages or pagegroups or HTML portlet / some other.
    please help me.

    You can find in knowledge exchange a script to create an flash file item type. With this installed you can add a flash file to an item region on a page.
    Grtz,
    Dirk

  • How do i set preferences in LR 2.4 to convert  all imports to DNG?

    How do i set preferences in LR 2.4 to convert all imports to DNG? Is there any downside to doing this automatically?

    There isn't a preference for automatically converting to DNG, instead you choose Convert to DNG within the File Handling section of the Import window.
    Within the Import section of the Preferences panel you need decide how the DNG files are to be created. The following screen shot is probably the best choice for Lr 2.4 and later.

  • My dad and I have shared an iTunes account for years and I just created a new apple id but I have no Idea how to get all those purchases to this new account. Help please?

    My dad and I have shared an iTunes account for years and I just created a new apple id but I have no Idea how to get all those purchases to this new account. Help please?

    The old Apple ID (presumably your dads) owns those songs and your new Apple ID does not.  However, your dad can authorize your iD to use the songs by going to Store > Authorize This Computer from your iTunes menu and entering his Apple ID and password.

  • How to create a group of contact from a multi-selection of mails in a mailbox to answer to all senders?

    How to create a group of contact from a multi-selection of mails in a mailbox to answer to all senders?

    Use Mail Scripts. Its Add Addresses function will collect all the addresses from all selected messages and allow you to select the ones you want to add and allow you to create groups as you go.

  • How to create a new account and copy all settings?

    I think my main user account is corrupted. So I want to create a new account and copy all of my settings, files etc..and more than likely piecemeal just incase my settings are what is corrupted. That way I can isolate the problem.
    I don't plan to delete the main account until satisfied and I also have my Time Machine backup plus my SuperDuper backup.
    I can/should be able to figure out how to create the new account, but I am very unclear on the best/easiest approach to copy in my iTunes files and settings, applications(is this even an issue), address book, email, etc? I should be able to find most everything underneath my home account folders but what else am I missing here? I don't want to find out the hard way.
    Please share some advice or perhaps a link/FAQ on how to approach.
    Thanks in advance.
    --Mickey

    use this [link|http://discussions.apple.com/message.jspa?messageID=6185507].

  • How to restore all inbox data after obliged to create new mail account

    After my Thunderbird account mysteriously disappeared I had to re-open another mail account. After difficulty I restored address book. But only about 30 percent of email inbox restored. How can I restore the rest, many of which were important to me.

    '''Background info to help you understand your mail account:'''
    As you saw in the Profile folder mail accounts, 'folders' you see in the Thunderbird FolderPane are actually Files; mbox files.
    Emails are downloaded to your Inbox and stored one after the other in the order they were downloaded. So, the emails are not stored as individual files, they are written into a text file which can get bigger and bigger if you do not manage the Inbox.
    Any emails you delete, from your point of view they disappear from Inbox and reappear in 'Deleted' folder (Also called Trash).
    In reality, those deleted emails are 'marked as deleted' and are still in the Inbox, but hidden. This means that if you had accidentally deleted an email, it would be easy to quickly get it back.
    However, the deleted emails are still taking up space, so to clean up the file and remove those 'marked as deleted' emails, you have to 'compact' the folder. If you do not compact your folders then you increase the possibilty of getting a corrupted file and losing emails.
    Using folders to organise emails into groups keeps the file size smaller and makes it easier to locate emails. It is also less risky. Smaller files also use less memory to open.
    '''How to create Folders:'''
    Select the mail account name in the Folder Pane. If you want to create them in 'Local Folders' account, select 'Local Folders'.
    * 'File' > 'New' > 'Folder'.
    * Give folder a name eg: Bills or Family or Friends etc
    * click on 'Create Folder' button.
    you can create as many folders as you need.
    '''How to move emails from one folder to another:'''
    There are a couple of ways to this, so you could try out the methods and choose the one you find most comfortable.
    Suggest you move one email first and then try to move a group.
    '''1. Using right click options.'''
    * Right click on highlighted/selected email in list
    * select: 'Move to' > mail account / Local Folder > select name of folder
    '''2. Using toolbar: '''
    * Select email in list so it is highlighted
    * 'Message' > 'Move to' > mail account > select: Folder'
    '''3. Drag and Drop method'''
    * Left click and keep down on hilighted email in list to grab
    * Move the mouse pointer to hover over the Folder you want; this is dragging the email,
    * Release the mouse to drop the email into that folder.
    '''How to highlight several emails:'''
    All the above methods work if you select one email or a highlighted group.
    '''To select a batch of email eg: 10 adjacent emails'''
    * click on first email
    * Press 'Shift' key and click on eg:10th email - all emails in between become highlighted.
    '''To select various emails to put them as a group.'''
    * Hold down 'Ctrl' key and use mouse to select various emails.
    '''To select all emails in folder:'''
    * click on first email in list
    * Hold down 'Ctrl' key and press 'A' - All emails will be highlighted.

  • I have file with 500 pages created from AutoCad file. In all pages, I have different document numbers.The file is not editable in pdf. How to change all the document numbers using "Comment" feature? Any alternate method?  alternate method? I have Adobe Ac

    I have pdf file with 500 pages created from AutoCad file. In all pages, I have different document numbers.The file is not editable in pdf. How to change all the document numbers using "Comment" feature? Any alternate method?  alternate method? I have Adobe Acrobat X Pro and Windows -7 platform.

    Yes, I just want to cover up all the pages for those particular area of document numbers.
    Nothing sensitive about it. I just want to show the correct document numbers on all pages in print out.
    So, I wanted to cover up by comments, but commenting on each page will be difficult. So, I wanted to comment the same on all pages.

  • How to create shortcut desktop icon for all users???

    Hello All,
    I want to know how to create shortcut icon for all users in windows 7. I tried C:\Users\Public but no folder for Desktop.
    Thanks

    C:\users\All users
    JS
    Hi,
    I am just wondering, what is the technically correct location to place say, a shortcut, for all users to access on their desktops on a given machine?
    Is it C:\Users\Public\Desktop ?
    Or is it C:\Users\All Users\Desktop ?
    Would it also be possible to explain the differences as well? Or paste some links to the overview of each one? I am having trouble finding anything from MS.
    Thank you.

  • How to create a folder (in unified folders) which contains all the messages of inboxes and outboxes

    Hi, i've searched without success how to create a folder (in unified folders) which contains all the messages of inboxes and outboxes (as it exists in Windows Live Mail).
    For me, it would be very useful to search in only one folder when i try to find something in sent and received mails.
    Thank's

    This is what Unified Folders does. I'm not sure what exactly you're trying to achieve.
    http://kb.mozillazine.org/Global_Inbox#Unified_Folders
    You might take a look at this article.
    https://support.mozilla.org/en-US/kb/global-search

  • How to create/Map a User as Adminstrator in BPM Worklist to view all tasks

    Hi all,
    How to create/Map a User as Adminstrator in BPM Worklist to view all the tasks.
    Version :Jdev 11.1.1.1.0
    Regards
    C.Karukkuvel

    go to EM , right click on soa-infra -> security -> Applicaiton roles, then click on BPMWorkflowAdmin role. Add your user to this role.
    This user will be able to view all tasks in Worklist. you have to click on "Administration Tasks" tab.
    Thanks
    --Sreeny
    Edited by: sreeny on Sep 22, 2010 12:54 PM

  • How to create/Map a User as Adminstrator in BPM Worklist to view all the ta

    Hi all,
    How to create/Map a User as Adminstrator in BPM Worklist to view all the tasks.
    Version :Jdev 11.1.1.1.0
    Regards
    C.Karukkuvel

    Sounds like a great question for the [url http://forums.oracle.com/forums/forum.jspa?forumID=560]BPM Suite Forum, but then again, I see you've already posted the question there ;)
    Good luck,
    John

Maybe you are looking for