How to read the size of the current brush in javascript

How can I read the current size of the brush in javascript?

For either the brush or for example the clonestamp tool.

I want to read the current value and change it to another within a script.

function getCurrentBrushInfo() {
    var brsh = {};
    var ref = new ActionReference();
    ref.putEnumerated(charIDToTypeID("capp"), charIDToTypeID("Ordn"), charIDToTypeID("Trgt"));
    var currentBrush = executeActionGet(ref).getObjectValue(stringIDToTypeID("currentToolOptions")).getObjectValue(charIDToTypeID('Brsh'));

    brsh.diameter = currentBrush.getDouble(charIDToTypeID('Dmtr'));
    brsh.hardness = currentBrush.getDouble(charIDToTypeID('Hrdn'));
    brsh.angle = currentBrush.getDouble(charIDToTypeID('Angl'));
    brsh.roundness = currentBrush.getDouble(charIDToTypeID('Rndn'));
    brsh.spacing = currentBrush.getDouble(charIDToTypeID('Spcn'));

    return brsh
}

Tags: Photoshop

Similar Questions

  • How to read the current countries of device in iOS and Android?

    See the topic!

    I'm reading the current country of iPad and Android tablet.

    I know that in iOS, it can be obtained here:

    -GetCurrentCountryFromUserLocale (NSString *)

    {

    NSLocale * userLocale = [NSLocale currentLocale];

    NSString * countryCode = [objectForKey:NSLocaleCountryCode userLocale].

    Returns the country code;

    }

    But this, it will surely, build me a DONKEY? There must be a way to do it without needing a custom code?

    For Android, I'm even more naïve!

    Clues much appreciated, thank you.
    G

    UPDATE:

    Android may be readable through this:

    http://StackOverflow.com/questions/11293642/how-can-i-get-my-Android-device-country-code-w years-help-gps

    But think there should be something in the Flex / AIR SDK?

    You can use

    new .actualLocaleIDName StringTools (LocaleID.DEFAULT)

    It returns the locale. (en-GB for example)

  • How to read the Captivate in external JavaScript variables

    Hello

    I want to develop the combination of quiz questions and test me Captivate simulations. And send the results to external JavaScript, so I can save it in the database.

    I have published the Captivate to HTML5, typed this code in an external .js file, and linked to index.html, but I get only the alert 'no ICC interface' interface is not detected, according to me. I tested from a local web server. Any ideas?

    ==============================================================================

    var interfaceObj;

    var eventEmitterObj;

    window.addEventListener ("moduleReadyEvent", function (evt)

    {

    evt. Data gate through the interface.

    This is the same as window.cpAPIInterface

    interfaceObj = evt. Data;

    eventEmitterObj = interfaceObj.getEventEmitter ();

    });

    Make sure window.cpAPIInterface is available

    If (interfaceObj)

    {

    Make sure window.cpAPIEventEmitter is available

    If (eventEmitterObj)

    {

    Add a listener for the CPAPI_SLIDEENTER event

    eventEmitterObj.addEventListener ("CPAPI_SLIDEENTER", function (e)

    {

    bogus var = interfaceObj.getVariableValue("slideNumber");

    Alert (cAns);

    window.cpAPIInterface.setVariableValue ("mySlideVisitCounter", lSlideVisitCtr);

    });

    }

    } else {}

    Alert ("No. IPC interface")

    }

    You're talking about data are not in this case, the window.

    eventEmitterObj.addEventListener ("CPAPI_QUESTIONSUBMIT", function ( e ) {}

    bogus var = e.Data.correctAnswer;

    Alert ("correctAnswer =" + cAns);

  • How to read the VI Analyzer config file?

    Hello

    How to read the analuzer vi configuration file? I'm getting a lot of errors on the size of the front panel and I don't know what should be the size you want. Where is the maximum expected size of the specified front panel?

    Kaspar says:

    Hello

    How to read the analuzer vi configuration file? I'm getting a lot of errors on the size of the front panel and I don't know what should be the size you want. Where is the maximum expected size of the specified front panel?

    If you have VI Analyzer installed, you can load the configuration file and look at the section select the Tests. There is a test for the maximum size of front under front-> User Interface. The default value is the resolution of the current monitor of the PC (including multiple monitors). You can change to the desired option.

  • How to read the papers of ucs tech support

    Hi team

    Can you please tell me how to read the newspapers of ucs tech support to find out hardware problems

    Greetings.

    Your question is probably something that is difficult to address in this format.

    Hardware and firmware is so rapidly changing, so are the various capabilities of diagnosis (and how, when, where they write to newspapers).  I think that it would be virtually impossible to maintain a full guide updated content of tech support file and how to interpret them.

    That being said, there are some more frequent for both blade/UCSM and stand alone C series servers such as SALT that connects usually record the major mistakes such as chess DIMM, HD failures, etc.

    There are general troubleshooting guides such as http://www.cisco.com/c/en/us/td/docs/unified_computing/ucs/ts/guide/UCSTroubleshooting/UCSTroubleshooting_chapter_0111.html

    There are also courses that correspond to the review DCUCT 642 - 035 http://www.cisco.com/c/en/us/training-events/training-certifications/exams/current-list/dcuct.html entering some details by looking at newspapers, among other things.

    Is there some hardware problems that you try searching?  You have some sort of polling app that parses the files you are trying to Setup alerts for, etc.?

    Thank you

    Kirk

  • I have Adobe Photoshop version 12.0.4x64 - how updated to the current version?

    I have Adobe Photoshop version 12.0.4x64 - how updated to the current version?

    Beginning of the updates here and product selection, read to see if you need to install updates in the order of the numbers, or if updates are cumulative for the product http://www.adobe.com/downloads/updates/

  • How to read the files on time capsule

    How to read the files on time capsule from iPad?

    Thank you

    Using an application like navigation on the iPad. More info here:

    Stratospherix - FileBrowser - overview

  • How to read the status of User1 DIP-switch with a cRIO FPGA chassis?

    How to read the State of the DIP switches on a FPGA cRio chassis?

    I work with a cRIO 9022... My idea is to put the system in "service" mode with USER1 switch to IT and communicate with the FPGA via the FPGA - GUI (VI) on the host computer instead via the RT module that is used in normal conditions.

    Any ideas? Unfortunately, I don't have an unused channel on the left... .and (as I know) cannot use the interface RS232 of FPGA.

    Many thanks in advance,

    Luke

    Hi, this is the correct information. You cannot read the FPGA of DIP-switch status. The only thing you could do is to use the function of Reading Switch.vi located under the range of functions-> real-> utilities RT time

    It's how you probably know side host RT and not the FPGA.

    Cordially Virginia

  • How to read the value of list boxes by iteration in a loop For?

    I have a lot of list boxes on the front of my VI. I want to know how to read the value of this combo with a loop boxes For. The point is that I don't know how to get the reference of each combo box in a loop.

    Any information would be welcome. Thank you!

    su27 wrote:

    I have a lot of combo boxes on the front of my VI [...]

    Be sure to close the references that you have finished with them.

  • How to read the date and time of a file by labview information

    How to read the date and time of a file by labview information? for example, time created and updated time.

    The similar question had already spoken here (this is the old thread but still seems topical):

    http://forums.NI.com/T5/LabVIEW/file-date-created/TD-p/109836

  • How to read the host name or serial number cRIO locally

    I have not worked with cRIO and decided to ask for help.  (o).

    I don't know about the screws that allow to access this information from a connected Windows machine, however, I want to retrieve and display this information on remote panels.  But I cannot determine how to read the cRIO hostname or the serial number of the software running on the cRIO?

    Thanks for the help.

    James

    This could help.

  • How to read the two columns of data from the Port series

    Hello

    I'm reading two columns of data from the serial port.

    Example:

    52439 52430

    52440 52437

    52209 52214

    51065 51070

    52206 52390

    I use the serial of Visa service and I can read the first column of data from the serial port, but I can't understand how to read the second column.

    I want to both sets of chart data.

    I enclose my VI.

    Thank you for your help.

    The analysis of string function takes a "Format string" on top (with the right button of the function and choose Help, which explains all the entries).  In particular, you can say 'Give me two numbers separated by a tab' and the output will be two numbers (whole or floating, depending on the chosen format).  In particular, %d\t%d specifies a decimal integer, , whole decimal.

  • How to read the color table in a subvi?

    How to read the color table in a subvi? Is it made by a reference to the table or with a global variable? For a better understanding of the problem, I added to vi. Run the "run.vi." I want to see

    the background color of the table "run.vi" in the subvi called "read color.vi".

    How can I do?

    Thanks in advance

    Norick

    pop up on the wire table refernece and establishes 'control '. Add this control to the icon of the sub - VI decision-making and then wire ref of the appellant to this Terminal VI so the calling VI move the ref to the Subvi.

    Ben

  • How to read the 32-bit depth .bmp image

    How to read the image, 32-bit depth using LabVIEW .bmp?


  • How to read the analog inputs of one Board of R for (PXI-7851R) series

    You can guide me please with the steps for reading of the analog inputs of a series a. card I use as the target fpga PXI-7851R.

    Have you looked at the examples provided with LabVIEW? There are examples showing how to read the analog inputs.

Maybe you are looking for