• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

[JS CS3/4] ScriptUI How to color a button ?

People's Champ ,
Oct 20, 2009 Oct 20, 2009

Copy link to clipboard

Copied

Is it a way to get a colored button in the ScriptUI DOM ?

I tried

dlg.button1.graphics.backgroundColor = dlg.button1.graphics.newBrush(dlg.button1.graphics.BrushType.SOLID_COLOR,[0.7,0.7,0.7],1);

But although the dialog is drawn, the button is not styled in best case, not visible in the worst case.

Is that possible to get a colored button ?

Hope so.

Do you have any tip ?

TIA

Loic

TOPICS
Scripting

Views

32.9K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Advocate , Oct 23, 2009 Oct 23, 2009

> To get that to work, you need to stack three objects like I've done here:

or add three lines, like I've done here ...

function customDraw()

{ with( this ) {

graphics.drawOSControl();

graphics.rectPath(0,0,size[0],size[1]);

graphics.fillPath(fillBrush);

if( text ) graphics.drawString(text,textPen,(size[0]-graphics.measureString (text,graphics.font,size[0])[0])/2,3,graphics.font);

}}

var dlg = new Window('dialog', 'Test');

var pnl = dlg.add('panel', undefined, 'My Panel');

var btn = pnl.add('button', undef

...

Votes

Translate

Translate
Guru ,
Oct 20, 2009 Oct 20, 2009

Copy link to clipboard

Copied

                                   

Hi loic,

I'd like to know the answer to this question as well. I was trying to figure out how to do this for a couple of hours, but it turned out a too hard nut for me to crack.

I could paint both the dialog and the panel:

var dlg = new Window('dialog', 'Test');

var pnl = dlg.add('panel', undefined, 'My Panel')

var btn = pnl.add('button', undefined, 'My Button', {name:'ok'});

var g = pnl.graphics;

var brush = g.newBrush( g.BrushType.SOLID_COLOR, [0.7, 0.7, 0.7, 1] );

try {

      g.backgroundColor = brush;

}

catch(e) {

      $.writeln(e);

}

dlg.show();

But when I try to do the same with button, I get an error:

Error: Cannot set backgroundColor property for this element type

Then I tried to set foregroundColor using ScriptUIPen, but failed to create it.

var pen = g.newPen( g.PenType.SOLID_COLOR, [0.7, 0.7, 0.7, 1] );

throws an error: TypeError: Bad argument list.

And the documentation is so obscure on this topic — no examples provided (Graphic Customization Objects chapter in JavaScript Tools Guide).

I've found only two examples — both by Bob Stucky. He is the only person, I know about, that can do this sort of things.

Here is one more question that keeps me awake at night — the following script sets the text of the button to Arial, BOLD, 12px:

var dlg = new Window('dialog', 'Test');

var pnl = dlg.add('panel', undefined, 'My Panel')

var btn = pnl.add('button', undefined, 'My Button', {name:'ok'});

var g = btn.graphics;

g.font = ScriptUI.newFont("Arial", "BOLD", 12);

dlg.show();

Why do we use graphics object, when we create a new brush?

var g = pnl.graphics;

var brush = g.newBrush( g.BrushType.SOLID_COLOR, [0.7, 0.7, 0.7, 1] );

And why do we use ScriptUI, when we create a new font?

var g = btn.graphics;

g.font = ScriptUI.newFont("Arial", "BOLD", 12);

Kasyan

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Oct 20, 2009 Oct 20, 2009

Copy link to clipboard

Copied

I have tried in the past but not been able to color a button.

What I have been able to do is use the onDraw callback to print an image instead of the standard control.

You may want to try that.

Wish I could be of more help. Kasyan's correct, the docs are sketchy at best. The biggest hurdle is that some of the custom drawing functionality seems to be a bit brittle and prone to failure in some cases.

Below is an example of drawing an image in place of a dropdown list to make a poor mans' flyout menu.

Regards

Bob



// Ever wanted to embed an image file in a jsx file?
// below is a multi-step process for doing so. It's a little cumbersome but worth the bother at times when a script depends on
// a binary object, but there is no fail-safe way to ensure the binary is delivered or installed with the script (like this sample!)

     function myFileStringer( myFile ) {
          // read the image file
          myFile.encoding = "BINARY";
          myFile.open( "r" );
          var myBuf = myFile.read();
          myFile.close();
          // create an output file of the same name with the extension "txt"
          var outName = myFile.name.substr( 0, myFile.name.lastIndexOf( "." ) ) + ".txt";
          var outFile = new File( myFile.parent.absouteURI + "/" + outName );
          outFile.open( "w" );
          // write the buffer to the text file using toSource(). The text in the file will be JSON, ready to copy and paste into your script
          outFile.write( myBuf.toSource() );
          outFile.close();
          // open the text file, copy the text in the file in a single line, paste it into your source code as a single line, something like this:
          // var myBinary = (newString("\u0089PNG\r\n\x\1\A\n\x00\x00\x00\riHDR\x00\x00\x00... ) );
          // it will be a very long string
     }
     function myFileMaker() {
          // the (new String(....) in the line below is the output as pasted from myFileEnstringer
          // it is in JSON notation from the toSource() call above - when this line is executed, myBinary will contain an accurate binary representation of the image
          // the binary below is a PNG image that is an icon for a flyout menu.
          var myBinary = (new String("\u0089PNG\r\n\x1A\n\x00\x00\x00\rIHDR\x00\x00\x00\x10\x00\x00\x00\t\b\x06\x00\x00\x00;*\u00AC2\x00\x00\x00\tpHYs\x00\x00\x0B\x13\x00\x00\x0B\x13\x01\x00\u009A\u009C\x18\x00\x00\x0FciCCPPhotoshop ICC profile\x00\x00x\u00DA\u00ADWi8\x14\u00EC\u00D7?3\u00C6\u00D8\u00C76\u00C6\u00CEX\u00B2d\x1B\u00FB\u0096u\u0090\u009D\u00EC$\u008C\x19\u00CBX\u00A7\u00B1/\u00A1B\u008F\u0088\u00B4\u00A1\u0088\x14i\u00A1\u0094\u0084\u0092\u00AD\u00B2\u0094\u00A2\x12ey\u00B2\u00A6B\"K\u008B\u00E6\u00FD\u00A0\u00A7\u00E7\u00BA\u00FE\u00EF\u00F5\u00BE\u00EF\u0097\u00F7|\u00FA\u009Ds\u009Ds~\u00E7\u00BE\u00CF}]\u00E7>\x00\u00BCB$\x1A-\x02\t\x00\u0091Q\u00B1t\u0097\u00DD\u00E6x/o\x1F<\u00CBk\u00E0\x04~\u00C0\u0082>H\u0092\u00C8143gg{\u00F8\x1Fe\u00FD5 \x00\x00^\u00AA\u0090h\u00B4\u0088|\u00F6\x00J\u00DF\u00D4\u00D9\u0092z\u00C3\x15\u00E7/\u00B2\u0087d\u00E1\x7F\x17\f\u00DD\u00CB\u00DB\x07\x00\u00A1\f\x00\u00D8\u0090ml\n\x00\u00D8\u00C0m\u00EC\x06\x00\u00D8\u0084XZ,\x00\"\x14\x00\u00B0\u00E4P\x12\x05\x00\u0091\n\x00\u00CAt7\x17\"\x00\u00A2\x06\x000!\u00DB\u00B8\t\x000\u0081\u00DB\u00B8\x07\x000\u00F1\u00E4\u0090X\x00\u00C4\b\x00\u009A/\u008AB\u008D\x02`Y\x00@\x1BS\u0082b\u00C8\x00\x18e\x00\u00A0Pb\u00C8\u0091\x00\u0098\u00E3\x00H\u00D5\u00C8\u00C8h\n\x00O;\x00(\u0090i\u00F4X\x00\u009Ey\x00P\u00F1\u00F2\u00F6\u00C1o\u0097L\u00D9\x000@\x01\u00A0\u00DF\u00FEk\x0B\u0093\x02\u00A8\u00BD\x03 &\u00F5\u00AFM\u00FE\x01\u0080\x10\t\u00E0\u00E6\u00CE\x7Fm\u00AB.\u0080\x00\x00\x04\u00EEyL\u00B0\u00A6\x06\x00\x00 8\u00CD\x01\u0098'\x18\u008CU9\x00\u0096\x13\x00[\u0085\f\u00C6\u008FJ\x06c\u00EB\"\x00\u00D3\x18@{\x049\u008E\x1E\u00FF\u00FB\u00BE\x10\u0088~\u0080\u00FFK\u00DF>\u00F3oaB\x00 \x01\u0090jL\u008E\u00A8P\u00E6\x03\u00E8\x12\u0096\u009B\u00AC\u009Dl#\u00EC\u009F8V\u00B8\u00D81\u0082\u00DCR<*\u00BC\x06|f\u00FC\u00F6X7\x01O\u009C\u009F Y\u0088*L\x13\u0089\x11\u008D\x15\u008B\x13O\u0094H\u0091\u00CC\u00C0gJeJ\x1F\u00919*\u009B\u00BF\u00E3\u00B4\u00DC9\u00F9\n\u0085\x1A\u00C5\x1B;\u009B\u0094\u00BA\u0095\u0087T&U\u00D7\t\u00EC\u00EA\u00D2\x1A\u009A\u009A\u00EEZ)\u00DA\x15:}\u00BA\u009B\u00FA\u008A\x06$\u00C3s\u00BB\u00C6\u008D%M\u00A8\u00A6w\u00CD9\u0089\u00FB,n[\u00F1\u00ED\u00A6[\x0F\u00DA\u00AA\u00D9\x1D\u00B3\u00FF\u00E2h\u00EFT\u00B7\u0087\u00DB%\u00C2\u00B5\u00CF]\u00D4#\u00C2\u00F3\u00817\u00C6\u00C7\x7Fo\u008D\u00EFW?\u00A2\u00FF\u00D1\u0080\u00FE@n\u00B2\x13\u00E5D\u00D0\u00F3\x10\u00F6P3j\\X]\u00F8d$\x7F\u0094Et\x02\u00ED\u00FA\u00FE\u00B71\u00A8XB\u009C\x7F|^\u00C2\u00FD\u00C4\u00F9d\u00DE\x14\u00E3T\u00DA\u0081\u00F2\u00B4\u00EE\u00F4\u00B1\u008C\u00A9\u0083\u00B3\u0087\x16\x0E/g\u00AEd\u00ADgo\u00FD\u0085\u00CA\u00E1<\u00CA\u009B+\u0090'~L!_\u00B3\u00C0\u00F0\u00B8Y\u00A1\u00F5\u0089='=N\u00F9\u009C\u00F6;C.\u00A2\x16\u0087\u0097\u0084\u009F\u00A5\u009E\u00A3\u0096\u0086\u0095\u0085\u009E'\u0095\u00FBT\u00B8^\u00B0\u00AB4\u00BD\u00A8~I\u00B1J\u00BEz\u00C7e\u00E9\x1A\u00FC\x15\u00F1\u00AB\u00C2\u00D7\x04\u00AE\u00F3\u00D6\u00F2\u00D4q\u00DE`\u00BE\u00F1\u00EB\u00E6f\u00FD\u00EA\u00AD\u00C5\u00DB\u00B3\r\u00A3w\x06\x1B\u009F\u00DE\u00EDjjn\u00AEo\u00B9~\u00EF\u00CA\u00FD\x0B\u00ADg\x1E\u00E4\u00B7\x1Dm\u00CF\u00EC8\u00D8\u0099\u00DCE\x7F\x18\u00F5(\u00EAqD7\u00A9\u0087\u00D8\u008B\u00EB\u009D\u00EA\u00BB\u00F5$\u00FD\u00A9m\u00BF`\u00FF\u00DC\u00B3\u0086\u00E7\u0099\x03.\u0083\u0092\u0083\u008B/\u00DA_\x16\u00BE\u00F2\x1FR\x19\u00FA\u00FE\u00FA\u00C9p\u00D1\b\u00E9\u008D\u00CA\u009Boo\x1F\u008F\x16\u008Cy\u008C\u008B\u008F\u00CFL\u00D4\u00FEM\x7F\u00A7\u00F3\u00EE\u00DBd\u00CBT\u00CA\u00B4\u00C1\u00F4\u00FAL\u00E3l\u00EA\u009C\u00D9{\u00A6\u00F7\u00BD\u00F3y\x1F\x1C?\u00F2||\u00F9\u00A9h\u00C1kQhqd\u00A9\u00F8\u00B3\u00D7\u00B2\u00D0\u00F2\u00D0\u0097\u00C2\x15\u00C7U\u00AE\u00D5\u00DE\u00AF\u0099kfk\u008C\u00F5\x07\x1B\u00C9\u009B\u00DA\u009B\u00CB\u00DFj\u00BF\u0087\u00FFP\u00FC1\u00F7\u00B3r+\u00E0\u0097\u00E4\u00AF\u00B7\u008C\u00FD\f\x06\x00\x12\u00C5\u00C4\u0087\u00C21c\u00D1\x02,\u00DC\u00AC\x1Cl\u00ACl[\u00EC\u00DF8>s\u00CEp\u00BD\u00C1\u00F4sw\u00F0\u00D4\u00F3V\u00F2\u009D\u00E2\u00CF\u00C2&\b\u0084\u00E3\u00F6\t:\t\x11\u0085\u00F5EtD\u0095\u00C5\u00D4\u00C4U%t$\u008D\u00F1\u0096R&\u00D2z2*\u00B2\u00CA;\u0094\u00E5v\u00CA\x13\x14\u0094\x15\t;u\u0094\u0088\u00CA\u00B6*^\u00AAT\u00B5$B\u008Ez\u0099F\u00A3\u00E6s\u00AD%\x1D^]-=W\u00FDd\u0083\u00CB\u0086\u00C3F\u00AC\u00C6\u00DA&\u00FBMk\u00CD\u00E6\u0089J\x16\u00E1\u00967\u00AC6\u00AD-mrmG\u00EC\u00D5\x1DR\x1D\x07\u009DE\u00F7\u0084\u00B84\u00BA!\u00DC\x1D<Nx\u008Ey+\u00FA\u00D0\u00F6\u00DE\u00F2\u00DD\u00F0\u00D3\u00F3?\x10\u00D0F\u00DA\"\x1BR\u00E2\u0083\u00EE\x06\u00AF\u0086\u00AAR\u00C3\u00C2\u00AE\u0086\x7F\u008C\u0094\u008B\u00F2\u008D.\u00A6\u00BD\u00A6\u00F3\u00C7\u00B8\u00C5\x16\u00C6\u00F5%\u00B0&\u00DA'\u00E5'?J\u0099N\u00FDt\u00E0s\u00DAZ\u00FA\u00B7\u008C\u00EF\x07\x7F\x1Df\u00CE\u00E4\u00CC\u00E2\u00CF\x16>\"\u00FE\u0097l\x0E\u00E1\u00A8A\u00AEy\u009E\u00CD1\u00A7|\u00AF\x02\u00DF\u00E3\x01\u0085\u0094\x13a'\u00A3O\u00D1N\u00D3\u00CFD\x17E\x15\u00D3J\"\u00CF\x06\u009F\x0B(\u00F5*s>oY\u00AES\u00A1rA\u00A5R\u00F9\u00A2\u00E2%\u00C5*\u0085j\u00B9\u00CB\u00B252Wd\u00AF\u00CA\\\u0093\u00BC.V+R'|C\u00E8\u00A6@=\u00DF-\u00EE\u00DB\u00DC\r\u0098;\\\u008D\\wy\u009Bp\u00CDB-B\u00F7D\u00EF\u00E3[\u00E5\x1F\u00A8\u00B6i\u00B7\u00EBw\u0098w:v\u00F9<\u00DC\u00FBh\u00F7c\u00FC\u00E3\u0095\u00EE\u00DE\u009E\u00D2\u00DE\u00C8>\u00B3'\u0082O\x16\u009F>\u00EA/y\x16\u00F9\u009C8 >\u00B0>\u00D8\u00FF\u00A2\u00F2e\u00C2+\u00C7!\u00E9\u00A1\u00B5\u00D7\u00BD\u00C3\u00A5#\u00D1o\u00CC\u00DE\u00F2\u00BE\x1D\x1F\u00BD>\u0096:n=\u00C1;1\u00FAw\u00E5\u00BB\u00B0I\u00D5\u00C9\u00E5\u00A9\u00A6\u00E9\u00E33\u00A1\u00B3&s\u0082s\u008B\u00EF\x1F\u00CE\u0097|\u0088\u00FAh\u00F9I\u00F8\u00D3\u00C7\u0085\u00FB\u008B\u00C7\u0096\u00F6}V\u00FD\u00FCc\u00B9\u00FB\u00CB\u0089\x15\u00BFU\u00C5\u00D5\u0095\u00AF\u00F7\u00D6\u00B2\u00D7\u009D7\u00846\u00C66+\u00BFQ\u00BF\x13\u00BEo\u00FE\u00B8\u00FF3c\u00CB\u00F2\x17\u00E6\u00D7sF\u00E4v\u00FF\u0091\x1BL\u00CB\u00A8\u00AF\u00CC\u009F\u00D1\u008B,\u008B\u00AC\u008Bl\x13\u00EC\u00A3\x1C\u00AF8\u009Fp\u00B5b\u00EA\u00B8\u00CByry\x13\u00F8(\u00FC\u00F6X\u0082\x00\u00B7\u00C0*nP\u00F0\u009AP\u00A6\u00B0\u00AF\bA\u0094YtX\u00ACJ<N\u00C2R\u0092[r\x1C_%\x15)m \u0083\u0096y-{eG\u009A\u009C\u00BB\u00BC\u00B2\x02\u00AB\u00C2{\u00C5\u00EE\u009D5J\u00C7\u0094cU\u00F6\u00AA\u009A\u00AB\u00A9\x12\u00C4\u00D4\u00D9\u00D474f5\x07\u00B5\u00DA\u00B5o\u00EA\u0094\u00E9\u00E6\u00E8\u00C5\u00EB\u0093\f\u00EC\rw\u00ED\u00C2\x1B\u00A1\u008D\u0096\u008D\u0087L\u00EE\u0098\u009E4\u008B7\u00A7\x12=-\u00AC,\u00F5\u00AC\u00E4v\x0BY3[\u00AF\u00DB|\u00B0}c\u00D7c\u00DF\u00E8P\u00EDX\u00EC\u0094\u00E3\u009C\u00B8'\u00C4\u00C5\u00C3\u00D5\u00DE\u00CD\u00D0]\u00D9C\u00D2\x13\u00E7\u00C5\u00E5\u008D\u00F4\u00FE\u00EA\u00F3a\u00EF\u0094\u00EF\u00DB}\u00AF\u00FC\u00FA\u00FD\u00BB\x02\x1E\u0090Z\x03[\u00C8\u00B7(\x17\u0083r\u0082\u00E9!\u00FE\u00A1\u00D6T\u00B50\u0091p\u0096\u00F0\u00B5\u0088\u0099\u00C8\u00C1\u00A8\x07\u00D1u\u00B4\u00CA\u00FDg\u00E8\x7F\u00C5$\u00C6\u0086\u00C6\u00F9\u00C5;&\x18'\u00AA%I%cSP)\u00AB\u00A9\u00EF\x0E<K{\u0090~-\u00E3\u00D4\u00C1\u00F4C\u00C1\u0087\u009D2\u00B5\u00B2p\u00D9\u0088\u00EC\u008D#\u008B\x7FM\u00E7\u00BC=:\u0090\u00DB\u009D\u00D7r\u00ECF~MA\u00E9\u00F1\u00DC\u00C2\u00F4\x13\u00B4\u0093\u0094S\u00EE\u00A7\u00AD\u00CEh\x15\u00C9\x16\x0B\u00940\u0097|=;{n\u00A4\u00B4\u00BF\u00EC\u00C1\u00F9\u00EB\u00E5e\x15'/dU\u00A6^\u008C\u00BED\u00AA\u00F2\u00AC\u00DEs\u00D9\u00A6\u00C6\u00F0\u008A\u00F4U\u00B8:v\u00ED\u00FE\u00F5\u00E2Zz\u009D\u00D3\r\u00D5\u009B\u0098\u009BK\u00F5\u00FD\u00B7\u00AE\u00DC\u00CEm\u0088\u00BE\u00E3\u00DA\u00A8}\x17ww\u00A3i\u00AC\u00B9\u00B5\u00A5\u00EC^\u00DA}R+\u00F1\u00C1\u008E6\u00E6\u00B6\u00E9\u00F6\u00AE\u008E\u00EA\u00CE\u00CC.\u00D2C\u00A3G\"\u008F\u00D6\x1F\x0FtW\u00F5\u00E4\u00F6\u0096\u00F6u<\u0099z\u00CAx&\u00F2\\\x7F\u00C0g0\u00F5E\u00E9\u00CB\u009EW\u008B\u00AF\u00C5\u0086\u009DFr\u00DF<\x1D\u00E5\x1F\x0B\x18o\u00FE\u009B\u00FF]\u00FA\u00E4\u00D7\u00E9\u0083\u00B3\u0098\u00B9\u00CB\u00F3\u00CE\x1Fy?\u00BD^\u00AC\u00FB|\u00E6K\u00E1j\u00D9Z\u00FD\u00C6\u00DCw\u00FC\u00CF\u0080_i\f\x06\u00C0\u00F6\u00EC\x03\x00@\u00EB\x00\x14\u00C7\x01xM\x02\u00B8T\x01\x14l\x01(p\x02\u00E0j\x00\u009C\u00B9\x00\u00DC\u00F4\x01\u00D1Y\x00\u0088kY\u00800/\u00F8g~\x00\x00\x12X\u0081\x17$@\x05L\u00C0\r\" \x1B.\u00C2C\u0098E\u00B0#4\x10\u00BE\u0088\u00BF\x10M\u0088\x0FHq\u00A4;2\x1F\u00D9\u00C7\u00C4\u00CAd\u00CD\u0094\u00CB4\u0088\x12AQP\u00F5(\x06\u00B3\x13\u00F3E\u00E6ohg\u00F4U\x16\x14\x0B\u0089\u00A5\u009DU\u008A\u00F50\u00EB<\u009B\x03[=\u00BB\b{&\u00FB\x02\u0087'G'\u00A7\x06g\x19\x17\x0BW\x1C\u00D7\x14\u00C6\t\u00D3\u00CA\u00AD\u00C4]\u00CC\u00C3\u00C2\x13\u00C33\u00C9\u00EB\u00CC\u00DB\u00CA\u00A7\u00C4W\u00CC\u00CF\u00CC\x1F\u00C7?\u008Bu\u00C5v\b\x10\x04*p|\u00B8,\u00DC7\u00C1\b\u00C1wB\u00DEB\u00CF\u0085w\x0B\u00B7\u008B\u00EC\x12i\x14\u00D5\x11m\x113\x16\u00EB\x14\u00B7\x16\x1F\u0090\u00F0\u0092\u0098\u0095\u00A4K2\u00F0yR\x12R\u00B7\u00A5m\u00A4'eRd\u00B1\u00B2\u00F5;\u009Cw\u00AC\u00C8\x15\u00C9\x1B\u00CBO+\u00E4)\u00EA+\u00CE\u00ED<\u00ADd\u00A1\u00B4\u00AA\\\u00AD\u00E2\u00A7*\u00A4:\u00A0\u0096C\u00B0T\x07\u00F5V\u008DtMs-&\u00ADN\u00ED,\x1D{]\t=\u00A4\u00DE\u0092\u00FE\u00B0A\u00A7\u00E1\u00ED]UF\u00A7\u008C\u00B3L\x12L\u00C3\u00CC\u00C8\u00E6\u00FB\u0088\u00AE\x16\u00D6\u0096\u00E6V&\u00BBM\u00ADMmLmw\u00DB9\u00DB\u00FB8\x049\u00D2\u009C\x0E;\x17\u00ED\u00A9w\u00E9u\u009DtGx\u00C8{:x%xW\u00FA\f\u00FBr\u00EF3\u00F0#\u00FB\u009F\n\u00E8$\u00AD\u0092\u00E5)~AE\u00C1\u00FD\u00A1h\u00EA\u00EE\u00B0\u009C\u00F0\u00FEH\u009E(\u008F\u00E8\n\u00DAg\u00BAYLn\u00EC\u00DF\u00F1Z\t9\u0089c\u00C9*)GR\u00E7\u00D3,\u00D2\u00CB2~\x1C\u00F28\u00DC\u009C%\u0099\u009Dv\u00E4m\u008E\u00C9\u00D1;y\u00BE\u00F9b\x05C\u0085%'\x03O\u00CB\u009C\u00F9X\\w6\u00AD\u00D4\u00E1<\x7F\u00F9\u00E4\u0085\u00C6\u008B\u0085U\u0094\u00CB\u00D6WT\u00AFa\u00AF\u00FF\u00A8[\u00BA\u00F9\u00FE\u00D6L\u00C3D\u00E3|\u00D3\u00DA=\u00CEV\u00996\u00C7\u008E\u00E8\u00AE\u00F4G\x15\u00DD-\u00BD\x13OY\u009E\x11\x06\u00BC^\x1C\x7F\u00D53\u008C~C\x1C\u00CD\x1D\x1F{'7\u0095:3\u00F4~\u00E7\u0087\x03\u009F\u00A6\u0097l\u0097\u00AF\u00ACr\u00AC\u00C5l\u00CC|\u00B7\u00FAy\u009F\u00C1\u00D8\u00FEI\x00;\b\u0080,\u00E8\u0080=\x04\u00C1A\u00B8\x00]\u00F0\x01\u00C1\u00870FD\"\u00CA\x11CH.\u00A452\x1B\u00F9\u0098\u0089\u008D\u00C9\u0089\u00A9\u0088i\x12\u00A5\u0084JFu3\x0B1\u00872\u00B7\u00A01h*\u00BA\u009BE\u0091%\u0087\u00E5\x13\u00AB3k\x03\u009B\x04\u00DB\x11\u00B6/\u00EC>\u00EC=\x1C\u00DA\x1C\u0095\u009C|\u009C\u00879\u00D7\u00B9B\u00B8\u00DEb\u009C0\x1D\u00DC\u00DA\u00DCWydx\u00CE\u00F2\u00F2\u00F0\x1E\u00E1\u00FD\u00C5\x17\u00CF\u00B7\u00C2O\u00E5\u009F\u00C4\u00EE\u00C5\u00BE\x16p\x14\u00E8\u00C3Y\u00E1:\x04\u008D\x04\u009B\u0084t\u0085\u00EE\nk\n\u00D7\u0089\u00A8\u008B\u00DC\x10U\x17m\x123\x16\u00EB\x12\u00B7\x13\x1F\u0092\u00F0\u0097X\u0092L\u00C5\u00B3\u00E1\u008B\u00A5vJ\u00B5K\u00BBK/\u00C8d\u00CBJ\u00C86\u00EF\u00F0\u00D8\u00B1.W$o(?\u00AA\u0090\u00A1(\u00AF\u00F8|g\u00A2\x12^\u00A9G9FEJ\u00E5\u0095j\u00A6\u009A\u00A6\u00DA\f\u00A1H\u00DDZ}K\u00A3Q3JKVkD\u00FB\u00B8\u008E\u0083.Nw]oJ\u00FF\u0089A\u00A3\u00E1\u00E5]g\u008Dr\u008C\u0093M\"L\u00FD\u00CD<\u00CD\u00F7\x10\u00AD-\u008C,u\u00AD\u00B4vkY\u00EB\u00D8h\u00DB\x1A\u00D9Y\u00D9;;\u00F88\x06;%9\u00E7\u00ED\u00A9vis\x1Dv\u00DB\u00F0\x10\u00F74\u00F7\u008A\u00F4.\u00F6y\u00EA\u00CB\u00BC\u008F\u00E0\u00E7\u00E9\x7F$\u00A0\u00814E\u00C6R\u00AC\u0083\u00D2\u0082\u00EBC\u00E6\u00A82a\u00A4\u00F0\u00F2\u0088\u0089(\u00B1h\x7FZ\u00D5\u00FE\u00A5\x18\u008D\u00D8\u00A4\u00B8\u0087\t\u0098D\u008F\u00A4\u00D2\u00E4\u00D9T\u009D\x03\u00D9i/2$\x0FF\x1Cj\u00CE\u00E4\u00CA\"e\u00D7\x1D\u00F9\u009E\u00E3p\u00F4V\u009E\u00CD\u00B1\u00AD\u0082\u009AB\u00BF\u0093\u00C2\u00A7\u009E\u009E9\\\u00AC[\u00B2v\u00AE\u00B1,\u00AA\\\u00A1b\u00BE\u00F2\u00E6\u00A5\u0084j\u00D3\x1A\u00FE+\u00EF\u00AF\u00DD\u00AF=}#\u00BE>\u00F0\u00B6\u00DD\x1D\u009D\u00BB\u00EA\u00CD\u00AA\u00F7\u00B4Z\u008D\u00DA\u00BC:(]f\u008F\u00D4\u00BBEz9\u00FB\u00B6\u009En>[\x1A\u00F8\u00F0\u00E2\u00EB\u00AB\u009F\u00C3\x1CoDF\u00B5\u00C6=\u00FFN\u0099\u00AC\u009C~9\u0087\u009A\u00D7\u00FA\x18\u00BE\u00D0\u00B0\u00B4\u00F1\u00C5h\u00F5\u00E0\u00DA\u008BM\u00C5\u00EF\u00F4\u009F\u00AF\u00FE\u00F4\u009F\x03\x04A\x0E\u00F4\u00C1\tB!\x13\u00AA\u00A0\x1B\x16\x118\x04\x11\x11\u0083\u00A8FL \x05\u0091\u00EE\u00C8\"\u00E4\x04\u0093\x1CS,\u00D3c\u0094\x18*\x015\u00C4\u00AC\u00C7\\\u0081fG\u00A7\u00A0\x17YBY\u00A6X\x03X'\u00D8\u00F6\u00B1M\u00B0\x07\u00B2\u00CFrP9\u00969\x138\x19\\9\x18\x1C\u00A6\u0092[\u008D\u00BB\u008Dg\x0F\u00CF,\u00EF\x01>,_\x1D\u00BF\x03\u00FF\"\u00B6P@W`\f\u0097'\u00B8KpA\u00E8\u0092p\u00A0\u0088\u00AC\u00C8\u0090h\u00BE\u0098\u00B58B\u00BC]\"M\u00D2\x1C\u008F\u00C2wK\x1D\u0097\u00DE+\u00A3 \u00B3&\u00DB\u00B5\u00E3\u008C\\\u00B8<Q\x01\u00A7\u00F0E\u00F1\u00E9\u00CE\u00CBJ\x07\u0095}U\u008CU\u00A5\u00D5\u0098\u00D4f\t\u00BD\u00EA\u00B5\x1AE\u009A\x07\u00B5\u0082\u00B5\x1Duv\u00E9\u00AA\u00EB\u00E9\u00EA\x1B\x19\u0098\x1A\u00DA\u00EC\u00F24\"\x19\u0087\u009B\u00C4\u009B\x1E6;m~\u0099x\u00DB\u00A2\u00D3r\u00C8\u00EA\u00935\u00CAF\u00C8V\u00DB\u00CE\u00CD>\u00C6\u00E1\u0084c\u0083\u00D3\u00E8\x1E\u00B4\u008B\u0096\u00AB\u00BF[\u0081{\u00AF'\u00C2\u00CB\u00CC;\u00DD\u00A7\u00DBW`\u009F\u00BD_\u009A\x7FS\u00C0R\u00A0\"\u0099B\u00A9\x0E\u009A\x0F\u0091\x0B\u008D\u00A0\u00B6\u0084\u00A3\"\u00DC\"/D}\u00A5\u00D9\u00ED\u00AF\u00A63b\u00BD\u00E3\u009A\x13\u0084\x13\x13\u0092^\u00A4h\u00A5\u0096\u00A7\u00A1\u00D3C3\x06\x0Ei\x1D.\u00CF\u00C2d\u00C7\x1F\x19\u00CD\u00D9}\u00B4#\u00CF\u00E3\u00D8FAa\u00A1\u00E6\u0089\u00F1S\u00E9g\u00A4\u008B\x1E\u0095\u0084\u009F\x13-\u00ED8O\u00AE\u00E0\u00B8\u00D0|1\u00AC\n[\u00DDS\u0093qU\u00E7\u00DABm\u00D5\rJ\u00BD\u00E2\u00AD\u00A5\u0086\u00DA\u00C6\u00A4&\u00BB\x16\u0089{+\u00AD\u00CF\u00DA\u00EEv$u\u00CE?t|t\u00BF\u009B\u00D0s\u00B5O\u00E2\u00C9\u00C9~\u00F4\u00B3\u00A4\u00E7\u00AB\u0083\u00DE/\u009E\u00BD\u00D2\x1B*\x1F\u0086\x11\u00EF77GQc\u00EE\u00E3\u00E7'&\u00DE\u00C9N\u00FAN\x1D\u009B\u00BE732\u00BB\u00F6\x1E;\u00AF\u00F4\u00C1\u00F4\u00A3\u00E3'\u0097\x05\u00A7E\u0087%\u00DB\u00CF&\u00CB\x1A_\u00F0+\u00EC+\u009FW\x07\u00BF\u00D6\u00AD\u00E5\u00ADS7\u00CC7y6'\u00BE]\u00FF\u009E\u00FC\u00C3\u00E6\u00A7\u00E0\u00CF\u00F1\u00AD\u00B2_]\f\x06\u00C0\u00F6\u00BE\x04\x00\x00\u00EC\u00C4\u00E8\u0088h:\u00DE\u009Eh\x01\u00FF\u00BF\x12\x19\x11\u00F7\x0F\x07\x0F\x00pRcm\u00DC\x00\x00\x0B\x00\x03\u00C1t+\x17\x000\x07\u0080\u0099\u00A8@G'\x00\u00E0\x03@\u00C8\x05\u00C5X\u00BA\u00FE\u00C6z\u00C1T+\u009B\u00EDX\u0084--\u00D6\u00D9\r\x00\u0084\x00\x10>\u00C9\u00A1n\u009E\x00\u0080\x01@\u00D0\u00C3H\u00B6\u00CE\u00BFqFT\u0084\u00A3=\x00\u00E0\x00\x10\u00F9\u0094 \x0B\u00CB\u00DF\u00B1\u0097\u00E8q.\u00EE\x00 \x0B\u0080h\b\u008F\u00B6s\x01\x00N\x00\u00C4HP\u0094\u00FB?\\31\u00F1\u00AE\u00FF\u00F8\u00AFSH\x16v\x00 \x06\u0080D'\u0087\x12\x1D\u00B7\u00FD\u0091\u00D2`\x0FD\u00B0\x00<\u0090!\x1A\" \x1A\u00E8@\u0085^ \x03\x1DH\x10\x05xx\x07x \x03\x1D\u00A8\x10\x03\u00B1@\u00828H\x04<D\x00\x15\u00F6C\x1CP\u0081\x02A\x10\u00F3;>\x0E\" \b\u00E2\u0080\x0EV@\x02:\u0084@\x10\u00A8\u00FCf\u00F8\u00EF<\x1E0\x03t\u00A0\u00FE/\x1ET\u00A0@\u00B4?\u00F5\x10=\u00F2Vp|qt\u0092\u0081G(\u00E1\x1A\u00E1\x03\u00E1'\u00E0\x7F{\u00DB\u00FDa\f\u0082\u00A8?\u0099\u00B6\u00D9\x03\u00FF\u00D1Qr(\r\u00946\u00CA\x1Ce\u00842F\u00E9\x03\x1E\u0085C\u0089\u0080\nJ\x0B\u00A5\u00872C\u0099\u00A0\fQ\u00DA(\u00FDg\x0Bw\x17\u00FEd%\u00FE\u00A9\x00\u00FF'\u00E3\f\u00D0!\u00E4?jU\u0081` \x01\x1D\u00E2!\bb \x1C\u00E6\u0080\x0E\u0091\u00FE\u00D4C\u00FF\u00C6\u00C1\u00F6\u00AE\x0E\x00\u0080\u00E6\x01(\r\x00\x00h\u00DBL\u00C9\u00F8\u00CFw\x15\x1B\u0094\x18\x0B\x00@\u008C\u00A6%\u00D1\u00A9!\u00A1\u00B1x3\x1A-\"\bO\u008C\u008E\u00A4\u00C5\u00C5\x06\u00D1\u0095\u00F16QdUe\u00BC\x06\u0081\u00A0\r\x00\u00F0_\x14\u00F7T\u00A9\u00D4J\u008B\u00F2\x00\x00\x00 cHRM\x00\x00m\u0098\x00\x00s\u008E\x00\x00\u00E2\u00F9\x00\x00\u0086\u0099\x00\x00x\u0083\x00\x00\u00D4N\x00\x003\u00BC\x00\x00\x1Cyc\u00E1\x1F,\x00\x00\x00\u00A2IDATx\u00DA\u0094\u0091\u00B1\r\u00840\x10\x04\u00C7>\x07\u00D0\n=P\x07\x05\u0090\"\u008AA\u00A4\u00D4@\x05n\u00C3]\\\u008C\x03l\x7F\u00F0\x12\u00C9\x0B\u00F0_x\u00BA\u00DB\u00DD\u00D1\x1AU-)%D\x04\x11!\u00E7L)\u0085\u00DAq\x00\"\u0082\u00B5\u0096\u0094\u00D2\u00CF\u00C14M\u00B7\u00CF\u00EB\u00BAbT\u00B5\x18cn]\u009B\u00A6\u00B9\x15\u00881~\x13<E\u008E1\u00BE#\u00EC\u00FB\u008E\u00F7\u00FEZ\u00F6}\u00CF0\f\u00F5\b\u00CE9\u0096e!\u0084@\u00D7u\u00CC\u00F3\u00CCy\u009EU\bFU\x0B@\u00CE\u0099m\u00DB\x18\u00C7\x11kmu\x0B\u0097\x00@\u00DB\u00B6\x1C\u00C7\u00F1\x7F\x0BO\x0Eo\b\u009F\x01\x00\u009B\u00FDU\u00A2t\u00A1Hz\x00\x00\x00\x00IEND\u00AEB`\u0082"));
          // create a data folder for your script in the user's application data
          var myDataFolder = new Folder( Folder.userData.absoluteURI + "/SampleScripts" );
          // make certain the folder exists
          myDataFolder.create();
          // write the image file
          var myFile = new File( myDataFolder.absoluteURI + "/myFile.png" );
          myFile.encoding = "BINARY";
          myFile.open( "w" );
          myFile.write( myBinary );
          myFile.close();
          // there is now a valid png image in your script's user data folder
     }
     
     // example of using ScriptUI's drawing api to make a dropdownlist draw as an icon (until the user clicks it, then it's a menu)

     myFlyout = function( palette ) {
          palette.myFlyout = palette.add( "dropdownlist", [ ( palette.frameSize.width - 20 ), 0, palette.frameSize.width, 20 ] );
          palette.myFlyout.onDraw = function() {
               this.graphics.drawImage( ScriptUI.newImage( myIconFile ), 0, 0 );
          }
          if ( !palette.onShow ) {
               palette.onShow = function() {
                    this.myFlyout.draw( this );
               }
          }
     }

     // A slightly more complex example putting it all together where you can pass a callback function and an array of menu items
    // this function will add a flyout menu to the top-right corner of any ScriptUI window. It does not need to be a palette.
     addFlyout = function( palette, menuItems, callback ) {
          // create a script data folder to contain resources such as the flyout icon
          var myScriptDataFolder = new Folder( Folder.userData.absoluteURI + "/SampleScripts" );
          myScriptDataFolder.create();
          // point a file to the expected location of the icon image
          var myFlyoutIcon = new File( myScriptDataFolder.absoluteURI + "/flyoutIcon.png" );
          if ( !myFlyoutIcon.exists ) { // if it's not there, then create the file
               var binData = (new String("\u0089PNG\r\n\x1A\n\x00\x00\x00\rIHDR\x00\x00\x00\x10\x00\x00\x00\t\b\x06\x00\x00\x00;*\u00AC2\x00\x00\x00\tpHYs\x00\x00\x0B\x13\x00\x00\x0B\x13\x01\x00\u009A\u009C\x18\x00\x00\x0FciCCPPhotoshop ICC profile\x00\x00x\u00DA\u00ADWi8\x14\u00EC\u00D7?3\u00C6\u00D8\u00C76\u00C6\u00CEX\u00B2d\x1B\u00FB\u0096u\u0090\u009D\u00EC$\u008C\x19\u00CBX\u00A7\u00B1/\u00A1B\u008F\u0088\u00B4\u00A1\u0088\x14i\u00A1\u0094\u0084\u0092\u00AD\u00B2\u0094\u00A2\x12ey\u00B2\u00A6B\"K\u008B\u00E6\u00FD\u00A0\u00A7\u00E7\u00BA\u00FE\u00EF\u00F5\u00BE\u00EF\u0097\u00F7|\u00FA\u009Ds\u009Ds~\u00E7\u00BE\u00CF}]\u00E7>\x00\u00BCB$\x1A-\x02\t\x00\u0091Q\u00B1t\u0097\u00DD\u00E6x/o\x1F<\u00CBk\u00E0\x04~\u00C0\u0082>H\u0092\u00C8143gg{\u00F8\x1Fe\u00FD5 \x00\x00^\u00AA\u0090h\u00B4\u0088|\u00F6\x00J\u00DF\u00D4\u00D9\u0092z\u00C3\x15\u00E7/\u00B2\u0087d\u00E1\x7F\x17\f\u00DD\u00CB\u00DB\x07\x00\u00A1\f\x00\u00D8\u0090ml\n\x00\u00D8\u00C0m\u00EC\x06\x00\u00D8\u0084XZ,\x00\"\x14\x00\u00B0\u00E4P\x12\x05\x00\u0091\n\x00\u00CAt7\x17\"\x00\u00A2\x06\x000!\u00DB\u00B8\t\x000\u0081\u00DB\u00B8\x07\x000\u00F1\u00E4\u0090X\x00\u00C4\b\x00\u009A/\u008AB\u008D\x02`Y\x00@\x1BS\u0082b\u00C8\x00\x18e\x00\u00A0Pb\u00C8\u0091\x00\u0098\u00E3\x00H\u00D5\u00C8\u00C8h\n\x00O;\x00(\u0090i\u00F4X\x00\u009Ey\x00P\u00F1\u00F2\u00F6\u00C1o\u0097L\u00D9\x000@\x01\u00A0\u00DF\u00FEk\x0B\u0093\x02\u00A8\u00BD\x03 &\u00F5\u00AFM\u00FE\x01\u0080\x10\t\u00E0\u00E6\u00CE\x7Fm\u00AB.\u0080\x00\x00\x04\u00EEyL\u00B0\u00A6\x06\x00\x00 8\u00CD\x01\u0098'\x18\u008CU9\x00\u0096\x13\x00[\u0085\f\u00C6\u008FJ\x06c\u00EB\"\x00\u00D3\x18@{\x049\u008E\x1E\u00FF\u00FB\u00BE\x10\u0088~\u0080\u00FFK\u00DF>\u00F3oaB\x00 \x01\u0090jL\u008E\u00A8P\u00E6\x03\u00E8\x12\u0096\u009B\u00AC\u009Dl#\u00EC\u009F8V\u00B8\u00D81\u0082\u00DCR<*\u00BC\x06|f\u00FC\u00F6X7\x01O\u009C\u009F Y\u0088*L\x13\u0089\x11\u008D\x15\u008B\x13O\u0094H\u0091\u00CC\u00C0gJeJ\x1F\u00919*\u009B\u00BF\u00E3\u00B4\u00DC9\u00F9\n\u0085\x1A\u00C5\x1B;\u009B\u0094\u00BA\u0095\u0087T&U\u00D7\t\u00EC\u00EA\u00D2\x1A\u009A\u009A\u00EEZ)\u00DA\x15:}\u00BA\u009B\u00FA\u008A\x06$\u00C3s\u00BB\u00C6\u008D%M\u00A8\u00A6w\u00CD9\u0089\u00FB,n[\u00F1\u00ED\u00A6[\x0F\u00DA\u00AA\u00D9\x1D\u00B3\u00FF\u00E2h\u00EFT\u00B7\u0087\u00DB%\u00C2\u00B5\u00CF]\u00D4#\u00C2\u00F3\u00817\u00C6\u00C7\x7Fo\u008D\u00EFW?\u00A2\u00FF\u00D1\u0080\u00FE@n\u00B2\x13\u00E5D\u00D0\u00F3\x10\u00F6P3j\\X]\u00F8d$\x7F\u0094Et\x02\u00ED\u00FA\u00FE\u00B71\u00A8XB\u009C\x7F|^\u00C2\u00FD\u00C4\u00F9d\u00DE\x14\u00E3T\u00DA\u0081\u00F2\u00B4\u00EE\u00F4\u00B1\u008C\u00A9\u0083\u00B3\u0087\x16\x0E/g\u00AEd\u00ADgo\u00FD\u0085\u00CA\u00E1<\u00CA\u009B+\u0090'~L!_\u00B3\u00C0\u00F0\u00B8Y\u00A1\u00F5\u0089='=N\u00F9\u009C\u00F6;C.\u00A2\x16\u0087\u0097\u0084\u009F\u00A5\u009E\u00A3\u0096\u0086\u0095\u0085\u009E'\u0095\u00FBT\u00B8^\u00B0\u00AB4\u00BD\u00A8~I\u00B1J\u00BEz\u00C7e\u00E9\x1A\u00FC\x15\u00F1\u00AB\u00C2\u00D7\x04\u00AE\u00F3\u00D6\u00F2\u00D4q\u00DE`\u00BE\u00F1\u00EB\u00E6f\u00FD\u00EA\u00AD\u00C5\u00DB\u00B3\r\u00A3w\x06\x1B\u009F\u00DE\u00EDjjn\u00AEo\u00B9~\u00EF\u00CA\u00FD\x0B\u00ADg\x1E\u00E4\u00B7\x1Dm\u00CF\u00EC8\u00D8\u0099\u00DCE\x7F\x18\u00F5(\u00EAqD7\u00A9\u0087\u00D8\u008B\u00EB\u009D\u00EA\u00BB\u00F5$\u00FD\u00A9m\u00BF`\u00FF\u00DC\u00B3\u0086\u00E7\u0099\x03.\u0083\u0092\u0083\u008B/\u00DA_\x16\u00BE\u00F2\x1FR\x19\u00FA\u00FE\u00FA\u00C9p\u00D1\b\u00E9\u008D\u00CA\u009Boo\x1F\u008F\x16\u008Cy\u008C\u008B\u008F\u00CFL\u00D4\u00FEM\x7F\u00A7\u00F3\u00EE\u00DBd\u00CBT\u00CA\u00B4\u00C1\u00F4\u00FAL\u00E3l\u00EA\u009C\u00D9{\u00A6\u00F7\u00BD\u00F3y\x1F\x1C?\u00F2||\u00F9\u00A9h\u00C1kQhqd\u00A9\u00F8\u00B3\u00D7\u00B2\u00D0\u00F2\u00D0\u0097\u00C2\x15\u00C7U\u00AE\u00D5\u00DE\u00AF\u0099kfk\u008C\u00F5\x07\x1B\u00C9\u009B\u00DA\u009B\u00CB\u00DFj\u00BF\u0087\u00FFP\u00FC1\u00F7\u00B3r+\u00E0\u0097\u00E4\u00AF\u00B7\u008C\u00FD\f\x06\x00\x12\u00C5\u00C4\u0087\u00C21c\u00D1\x02,\u00DC\u00AC\x1Cl\u00ACl[\u00EC\u00DF8>s\u00CEp\u00BD\u00C1\u00F4sw\u00F0\u00D4\u00F3V\u00F2\u009D\u00E2\u00CF\u00C2&\b\u0084\u00E3\u00F6\t:\t\x11\u0085\u00F5EtD\u0095\u00C5\u00D4\u00C4U%t$\u008D\u00F1\u0096R&\u00D2z2*\u00B2\u00CA;\u0094\u00E5v\u00CA\x13\x14\u0094\x15\t;u\u0094\u0088\u00CA\u00B6*^\u00AAT\u00B5$B\u008Ez\u0099F\u00A3\u00E6s\u00AD%\x1D^]-=W\u00FDd\u0083\u00CB\u0086\u00C3F\u00AC\u00C6\u00DA&\u00FBMk\u00CD\u00E6\u0089J\x16\u00E1\u00967\u00AC6\u00AD-mrmG\u00EC\u00D5\x1DR\x1D\x07\u009DE\u00F7\u0084\u00B84\u00BA!\u00DC\x1D<Nx\u008Ey+\u00FA\u00D0\u00F6\u00DE\u00F2\u00DD\u00F0\u00D3\u00F3?\x10\u00D0F\u00DA\"\x1BR\u00E2\u0083\u00EE\x06\u00AF\u0086\u00AAR\u00C3\u00C2\u00AE\u0086\x7F\u008C\u0094\u008B\u00F2\u008D.\u00A6\u00BD\u00A6\u00F3\u00C7\u00B8\u00C5\x16\u00C6\u00F5%\u00B0&\u00DA'\u00E5'?J\u0099N\u00FDt\u00E0s\u00DAZ\u00FA\u00B7\u008C\u00EF\x07\x7F\x1Df\u00CE\u00E4\u00CC\u00E2\u00CF\x16>\"\u00FE\u0097l\x0E\u00E1\u00A8A\u00AEy\u009E\u00CD1\u00A7|\u00AF\x02\u00DF\u00E3\x01\u0085\u0094\x13a'\u00A3O\u00D1N\u00D3\u00CFD\x17E\x15\u00D3J\"\u00CF\x06\u009F\x0B(\u00F5*s>oY\u00AES\u00A1rA\u00A5R\u00F9\u00A2\u00E2%\u00C5*\u0085j\u00B9\u00CB\u00B252Wd\u00AF\u00CA\\\u0093\u00BC.V+R'|C\u00E8\u00A6@=\u00DF-\u00EE\u00DB\u00DC\r\u0098;\\\u008D\\wy\u009Bp\u00CDB-B\u00F7D\u00EF\u00E3[\u00E5\x1F\u00A8\u00B6i\u00B7\u00EBw\u0098w:v\u00F9<\u00DC\u00FBh\u00F7c\u00FC\u00E3\u0095\u00EE\u00DE\u009E\u00D2\u00DE\u00C8>\u00B3'\u0082O\x16\u009F>\u00EA/y\x16\u00F9\u009C8 >\u00B0>\u00D8\u00FF\u00A2\u00F2e\u00C2+\u00C7!\u00E9\u00A1\u00B5\u00D7\u00BD\u00C3\u00A5#\u00D1o\u00CC\u00DE\u00F2\u00BE\x1D\x1F\u00BD>\u0096:n=\u00C1;1\u00FAw\u00E5\u00BB\u00B0I\u00D5\u00C9\u00E5\u00A9\u00A6\u00E9\u00E33\u00A1\u00B3&s\u0082s\u008B\u00EF\x1F\u00CE\u0097|\u0088\u00FAh\u00F9I\u00F8\u00D3\u00C7\u0085\u00FB\u008B\u00C7\u0096\u00F6}V\u00FD\u00FCc\u00B9\u00FB\u00CB\u0089\x15\u00BFU\u00C5\u00D5\u0095\u00AF\u00F7\u00D6\u00B2\u00D7\u009D7\u00846\u00C66+\u00BFQ\u00BF\x13\u00BEo\u00FE\u00B8\u00FF3c\u00CB\u00F2\x17\u00E6\u00D7sF\u00E4v\u00FF\u0091\x1BL\u00CB\u00A8\u00AF\u00CC\u009F\u00D1\u008B,\u008B\u00AC\u008Bl\x13\u00EC\u00A3\x1C\u00AF8\u009Fp\u00B5b\u00EA\u00B8\u00CByry\x13\u00F8(\u00FC\u00F6X\u0082\x00\u00B7\u00C0*nP\u00F0\u009AP\u00A6\u00B0\u00AF\bA\u0094YtX\u00ACJ<N\u00C2R\u0092[r\x1C_%\x15)m \u0083\u0096y-{eG\u009A\u009C\u00BB\u00BC\u00B2\x02\u00AB\u00C2{\u00C5\u00EE\u009D5J\u00C7\u0094cU\u00F6\u00AA\u009A\u00AB\u00A9\x12\u00C4\u00D4\u00D9\u00D474f5\x07\u00B5\u00DA\u00B5o\u00EA\u0094\u00E9\u00E6\u00E8\u00C5\u00EB\u0093\f\u00EC\rw\u00ED\u00C2\x1B\u00A1\u008D\u0096\u008D\u0087L\u00EE\u0098\u009E4\u008B7\u00A7\x12=-\u00AC,\u00F5\u00AC\u00E4v\x0BY3[\u00AF\u00DB|\u00B0}c\u00D7c\u00DF\u00E8P\u00EDX\u00EC\u0094\u00E3\u009C\u00B8'\u00C4\u00C5\u00C3\u00D5\u00DE\u00CD\u00D0]\u00D9C\u00D2\x13\u00E7\u00C5\u00E5\u008D\u00F4\u00FE\u00EA\u00F3a\u00EF\u0094\u00EF\u00DB}\u00AF\u00FC\u00FA\u00FD\u00BB\x02\x1E\u0090Z\x03[\u00C8\u00B7(\x17\u0083r\u0082\u00E9!\u00FE\u00A1\u00D6T\u00B50\u0091p\u0096\u00F0\u00B5\u0088\u0099\u00C8\u00C1\u00A8\x07\u00D1u\u00B4\u00CA\u00FDg\u00E8\x7F\u00C5$\u00C6\u0086\u00C6\u00F9\u00C5;&\x18'\u00AA%I%cSP)\u00AB\u00A9\u00EF\x0E<K{\u0090~-\u00E3\u00D4\u00C1\u00F4C\u00C1\u0087\u009D2\u00B5\u00B2p\u00D9\u0088\u00EC\u008D#\u008B\x7FM\u00E7\u00BC=:\u0090\u00DB\u009D\u00D7r\u00ECF~MA\u00E9\u00F1\u00DC\u00C2\u00F4\x13\u00B4\u0093\u0094S\u00EE\u00A7\u00AD\u00CEh\x15\u00C9\x16\x0B\u00940\u0097|=;{n\u00A4\u00B4\u00BF\u00EC\u00C1\u00F9\u00EB\u00E5e\x15'/dU\u00A6^\u008C\u00BED\u00AA\u00F2\u00AC\u00DEs\u00D9\u00A6\u00C6\u00F0\u008A\u00F4U\u00B8:v\u00ED\u00FE\u00F5\u00E2Zz\u009D\u00D3\r\u00D5\u009B\u0098\u009BK\u00F5\u00FD\u00B7\u00AE\u00DC\u00CEm\u0088\u00BE\u00E3\u00DA\u00A8}\x17ww\u00A3i\u00AC\u00B9\u00B5\u00A5\u00EC^\u00DA}R+\u00F1\u00C1\u008E6\u00E6\u00B6\u00E9\u00F6\u00AE\u008E\u00EA\u00CE\u00CC.\u00D2C\u00A3G\"\u008F\u00D6\x1F\x0FtW\u00F5\u00E4\u00F6\u0096\u00F6u<\u0099z\u00CAx&\u00F2\\\x7F\u00C0g0\u00F5E\u00E9\u00CB\u009EW\u008B\u00AF\u00C5\u0086\u009DFr\u00DF<\x1D\u00E5\x1F\x0B\x18o\u00FE\u009B\u00FF]\u00FA\u00E4\u00D7\u00E9\u0083\u00B3\u0098\u00B9\u00CB\u00F3\u00CE\x1Fy?\u00BD^\u00AC\u00FB|\u00E6K\u00E1j\u00D9Z\u00FD\u00C6\u00DCw\u00FC\u00CF\u0080_i\f\x06\u00C0\u00F6\u00EC\x03\x00@\u00EB\x00\x14\u00C7\x01xM\x02\u00B8T\x01\x14l\x01(p\x02\u00E0j\x00\u009C\u00B9\x00\u00DC\u00F4\x01\u00D1Y\x00\u0088kY\u00800/\u00F8g~\x00\x00\x12X\u0081\x17$@\x05L\u00C0\r\" \x1B.\u00C2C\u0098E\u00B0#4\x10\u00BE\u0088\u00BF\x10M\u0088\x0FHq\u00A4;2\x1F\u00D9\u00C7\u00C4\u00CAd\u00CD\u0094\u00CB4\u0088\x12AQP\u00F5(\x06\u00B3\x13\u00F3E\u00E6ohg\u00F4U\x16\x14\x0B\u0089\u00A5\u009DU\u008A\u00F50\u00EB<\u009B\x03[=\u00BB\b{&\u00FB\x02\u0087'G'\u00A7\x06g\x19\x17\x0BW\x1C\u00D7\x14\u00C6\t\u00D3\u00CA\u00AD\u00C4]\u00CC\u00C3\u00C2\x13\u00C33\u00C9\u00EB\u00CC\u00DB\u00CA\u00A7\u00C4W\u00CC\u00CF\u00CC\x1F\u00C7?\u008Bu\u00C5v\b\x10\x04*p|\u00B8,\u00DC7\u00C1\b\u00C1wB\u00DEB\u00CF\u0085w\x0B\u00B7\u008B\u00EC\x12i\x14\u00D5\x11m\x113\x16\u00EB\x14\u00B7\x16\x1F\u0090\u00F0\u0092\u0098\u0095\u00A4K2\u00F0yR\x12R\u00B7\u00A5m\u00A4'eRd\u00B1\u00B2\u00F5;\u009Cw\u00AC\u00C8\x15\u00C9\x1B\u00CBO+\u00E4)\u00EA+\u00CE\u00ED<\u00ADd\u00A1\u00B4\u00AA\\\u00AD\u00E2\u00A7*\u00A4:\u00A0\u0096C\u00B0T\x07\u00F5V\u008DtMs-&\u00ADN\u00ED,\x1D{]\t=\u00A4\u00DE\u0092\u00FE\u00B0A\u00A7\u00E1\u00ED]UF\u00A7\u008C\u00B3L\x12L\u00C3\u00CC\u00C8\u00E6\u00FB\u0088\u00AE\x16\u00D6\u0096\u00E6V&\u00BBM\u00ADMmLmw\u00DB9\u00DB\u00FB8\x049\u00D2\u009C\x0E;\x17\u00ED\u00A9w\u00E9u\u009DtGx\u00C8{:x%xW\u00FA\f\u00FBr\u00EF3\u00F0#\u00FB\u009F\n\u00E8$\u00AD\u0092\u00E5)~AE\u00C1\u00FD\u00A1h\u00EA\u00EE\u00B0\u009C\u00F0\u00FEH\u009E(\u008F\u00E8\n\u00DAg\u00BAYLn\u00EC\u00DF\u00F1Z\t9\u0089c\u00C9*)GR\u00E7\u00D3,\u00D2\u00CB2~\x1C\u00F28\u00DC\u009C%\u0099\u009Dv\u00E4m\u008E\u00C9\u00D1;y\u00BE\u00F9b\x05C\u0085%'\x03O\u00CB\u009C\u00F9X\\w6\u00AD\u00D4\u00E1<\x7F\u00F9\u00E4\u0085\u00C6\u008B\u0085U\u0094\u00CB\u00D6WT\u00AFa\u00AF\u00FF\u00A8[\u00BA\u00F9\u00FE\u00D6L\u00C3D\u00E3|\u00D3\u00DA=\u00CEV\u00996\u00C7\u008E\u00E8\u00AE\u00F4G\x15\u00DD-\u00BD\x13OY\u009E\x11\x06\u00BC^\x1C\x7F\u00D53\u008C~C\x1C\u00CD\x1D\x1F{'7\u0095:3\u00F4~\u00E7\u0087\x03\u009F\u00A6\u0097l\u0097\u00AF\u00ACr\u00AC\u00C5l\u00CC|\u00B7\u00FAy\u009F\u00C1\u00D8\u00FEI\x00;\b\u0080,\u00E8\u0080=\x04\u00C1A\u00B8\x00]\u00F0\x01\u00C1\u00870FD\"\u00CA\x11CH.\u00A452\x1B\u00F9\u0098\u0089\u008D\u00C9\u0089\u00A9\u0088i\x12\u00A5\u0084JFu3\x0B1\u00872\u00B7\u00A01h*\u00BA\u009BE\u0091%\u0087\u00E5\x13\u00AB3k\x03\u009B\x04\u00DB\x11\u00B6/\u00EC>\u00EC=\x1C\u00DA\x1C\u0095\u009C|\u009C\u00879\u00D7\u00B9B\u00B8\u00DEb\u009C0\x1D\u00DC\u00DA\u00DCWydx\u00CE\u00F2\u00F2\u00F0\x1E\u00E1\u00FD\u00C5\x17\u00CF\u00B7\u00C2O\u00E5\u009F\u00C4\u00EE\u00C5\u00BE\x16p\x14\u00E8\u00C3Y\u00E1:\x04\u008D\x04\u009B\u0084t\u0085\u00EE\nk\n\u00D7\u0089\u00A8\u008B\u00DC\x10U\x17m\x123\x16\u00EB\x12\u00B7\x13\x1F\u0092\u00F0\u0097X\u0092L\u00C5\u00B3\u00E1\u008B\u00A5vJ\u00B5K\u00BBK/\u00C8d\u00CBJ\u00C86\u00EF\u00F0\u00D8\u00B1.W$o(?\u00AA\u0090\u00A1(\u00AF\u00F8|g\u00A2\x12^\u00A9G9FEJ\u00E5\u0095j\u00A6\u009A\u00A6\u00DA\f\u00A1H\u00DDZ}K\u00A3Q3JKVkD\u00FB\u00B8\u008E\u0083.Nw]oJ\u00FF\u0089A\u00A3\u00E1\u00E5]g\u008Dr\u008C\u0093M\"L\u00FD\u00CD<\u00CD\u00F7\x10\u00AD-\u008C,u\u00AD\u00B4vkY\u00EB\u00D8h\u00DB\x1A\u00D9Y\u00D9;;\u00F88\x06;%9\u00E7\u00ED\u00A9vis\x1Dv\u00DB\u00F0\x10\u00F74\u00F7\u008A\u00F4.\u00F6y\u00EA\u00CB\u00BC\u008F\u00E0\u00E7\u00E9\x7F$\u00A0\u00814E\u00C6R\u00AC\u0083\u00D2\u0082\u00EBC\u00E6\u00A82a\u00A4\u00F0\u00F2\u0088\u0089(\u00B1h\x7FZ\u00D5\u00FE\u00A5\x18\u008D\u00D8\u00A4\u00B8\u0087\t\u0098D\u008F\u00A4\u00D2\u00E4\u00D9T\u009D\x03\u00D9i/2$\x0FF\x1Cj\u00CE\u00E4\u00CA\"e\u00D7\x1D\u00F9\u009E\u00E3p\u00F4V\u009E\u00CD\u00B1\u00AD\u0082\u009AB\u00BF\u0093\u00C2\u00A7\u009E\u009E9\\\u00AC[\u00B2v\u00AE\u00B1,\u00AA\\\u00A1b\u00BE\u00F2\u00E6\u00A5\u0084j\u00D3\x1A\u00FE+\u00EF\u00AF\u00DD\u00AF=}#\u00BE>\u00F0\u00B6\u00DD\x1D\u009D\u00BB\u00EA\u00CD\u00AA\u00F7\u00B4Z\u008D\u00DA\u00BC:(]f\u008F\u00D4\u00BBEz9\u00FB\u00B6\u009En>[\x1A\u00F8\u00F0\u00E2\u00EB\u00AB\u009F\u00C3\x1CoDF\u00B5\u00C6=\u00FFN\u0099\u00AC\u009C~9\u0087\u009A\u00D7\u00FA\x18\u00BE\u00D0\u00B0\u00B4\u00F1\u00C5h\u00F5\u00E0\u00DA\u008BM\u00C5\u00EF\u00F4\u009F\u00AF\u00FE\u00F4\u009F\x03\x04A\x0E\u00F4\u00C1\tB!\x13\u00AA\u00A0\x1B\x16\x118\x04\x11\x11\u0083\u00A8FL \x05\u0091\u00EE\u00C8\"\u00E4\x04\u0093\x1CS,\u00D3c\u0094\x18*\x015\u00C4\u00AC\u00C7\\\u0081fG\u00A7\u00A0\x17YBY\u00A6X\x03X'\u00D8\u00F6\u00B1M\u00B0\x07\u00B2\u00CFrP9\u00969\x138\x19\\9\x18\x1C\u00A6\u0092[\u008D\u00BB\u008Dg\x0F\u00CF,\u00EF\x01>,_\x1D\u00BF\x03\u00FF\"\u00B6P@W`\f\u0097'\u00B8KpA\u00E8\u0092p\u00A0\u0088\u00AC\u00C8\u0090h\u00BE\u0098\u00B58B\u00BC]\"M\u00D2\x1C\u008F\u00C2wK\x1D\u0097\u00DE+\u00A3 \u00B3&\u00DB\u00B5\u00E3\u008C\\\u00B8<Q\x01\u00A7\u00F0E\u00F1\u00E9\u00CE\u00CBJ\x07\u0095}U\u008CU\u00A5\u00D5\u0098\u00D4f\t\u00BD\u00EA\u00B5\x1AE\u009A\x07\u00B5\u0082\u00B5\x1Duv\u00E9\u00AA\u00EB\u00E9\u00EA\x1B\x19\u0098\x1A\u00DA\u00EC\u00F24\"\x19\u0087\u009B\u00C4\u009B\x1E6;m~\u0099x\u00DB\u00A2\u00D3r\u00C8\u00EA\u00935\u00CAF\u00C8V\u00DB\u00CE\u00CD>\u00C6\u00E1\u0084c\u0083\u00D3\u00E8\x1E\u00B4\u008B\u0096\u00AB\u00BF[\u0081{\u00AF'\u00C2\u00CB\u00CC;\u00DD\u00A7\u00DBW`\u009F\u00BD_\u009A\x7FS\u00C0R\u00A0\"\u0099B\u00A9\x0E\u009A\x0F\u0091\x0B\u008D\u00A0\u00B6\u0084\u00A3\"\u00DC\"/D}\u00A5\u00D9\u00ED\u00AF\u00A63b\u00BD\u00E3\u009A\x13\u0084\x13\x13\u0092^\u00A4h\u00A5\u0096\u00A7\u00A1\u00D3C3\x06\x0Ei\x1D.\u00CF\u00C2d\u00C7\x1F\x19\u00CD\u00D9}\u00B4#\u00CF\u00E3\u00D8FAa\u00A1\u00E6\u0089\u00F1S\u00E9g\u00A4\u008B\x1E\u0095\u0084\u009F\x13-\u00ED8O\u00AE\u00E0\u00B8\u00D0|1\u00AC\n[\u00DDS\u0093qU\u00E7\u00DABm\u00D5\rJ\u00BD\u00E2\u00AD\u00A5\u0086\u00DA\u00C6\u00A4&\u00BB\x16\u0089{+\u00AD\u00CF\u00DA\u00EEv$u\u00CE?t|t\u00BF\u009B\u00D0s\u00B5O\u00E2\u00C9\u00C9~\u00F4\u00B3\u00A4\u00E7\u00AB\u0083\u00DE/\u009E\u00BD\u00D2\x1B*\x1F\u0086\x11\u00EF77GQc\u00EE\u00E3\u00E7'&\u00DE\u00C9N\u00FAN\x1D\u009B\u00BE732\u00BB\u00F6\x1E;\u00AF\u00F4\u00C1\u00F4\u00A3\u00E3'\u0097\x05\u00A7E\u0087%\u00DB\u00CF&\u00CB\x1A_\u00F0+\u00EC+\u009FW\x07\u00BF\u00D6\u00AD\u00E5\u00ADS7\u00CC7y6'\u00BE]\u00FF\u009E\u00FC\u00C3\u00E6\u00A7\u00E0\u00CF\u00F1\u00AD\u00B2_]\f\x06\u00C0\u00F6\u00BE\x04\x00\x00\u00EC\u00C4\u00E8\u0088h:\u00DE\u009Eh\x01\u00FF\u00BF\x12\x19\x11\u00F7\x0F\x07\x0F\x00pRcm\u00DC\x00\x00\x0B\x00\x03\u00C1t+\x17\x000\x07\u0080\u0099\u00A8@G'\x00\u00E0\x03@\u00C8\x05\u00C5X\u00BA\u00FE\u00C6z\u00C1T+\u009B\u00EDX\u0084--\u00D6\u00D9\r\x00\u0084\x00\x10>\u00C9\u00A1n\u009E\x00\u0080\x01@\u00D0\u00C3H\u00B6\u00CE\u00BFqFT\u0084\u00A3=\x00\u00E0\x00\x10\u00F9\u0094 \x0B\u00CB\u00DF\u00B1\u0097\u00E8q.\u00EE\x00 \x0B\u0080h\b\u008F\u00B6s\x01\x00N\x00\u00C4HP\u0094\u00FB?\\31\u00F1\u00AE\u00FF\u00F8\u00AFSH\x16v\x00 \x06\u0080D'\u0087\x12\x1D\u00B7\u00FD\u0091\u00D2`\x0FD\u00B0\x00<\u0090!\x1A\" \x1A\u00E8@\u0085^ \x03\x1DH\x10\x05xx\x07x \x03\x1D\u00A8\x10\x03\u00B1@\u00828H\x04<D\x00\x15\u00F6C\x1CP\u0081\x02A\x10\u00F3;>\x0E\" \b\u00E2\u0080\x0EV@\x02:\u0084@\x10\u00A8\u00FCf\u00F8\u00EF<\x1E0\x03t\u00A0\u00FE/\x1ET\u00A0@\u00B4?\u00F5\x10=\u00F2Vp|qt\u0092\u0081G(\u00E1\x1A\u00E1\x03\u00E1'\u00E0\x7F{\u00DB\u00FDa\f\u0082\u00A8?\u0099\u00B6\u00D9\x03\u00FF\u00D1Qr(\r\u00946\u00CA\x1Ce\u00842F\u00E9\x03\x1E\u0085C\u0089\u0080\nJ\x0B\u00A5\u00872C\u0099\u00A0\fQ\u00DA(\u00FDg\x0Bw\x17\u00FEd%\u00FE\u00A9\x00\u00FF'\u00E3\f\u00D0!\u00E4?jU\u0081` \x01\x1D\u00E2!\bb \x1C\u00E6\u0080\x0E\u0091\u00FE\u00D4C\u00FF\u00C6\u00C1\u00F6\u00AE\x0E\x00\u0080\u00E6\x01(\r\x00\x00h\u00DBL\u00C9\u00F8\u00CFw\x15\x1B\u0094\x18\x0B\x00@\u008C\u00A6%\u00D1\u00A9!\u00A1\u00B1x3\x1A-\"\bO\u008C\u008E\u00A4\u00C5\u00C5\x06\u00D1\u0095\u00F16QdUe\u00BC\x06\u0081\u00A0\r\x00\u00F0_\x14\u00F7T\u00A9\u00D4J\u008B\u00F2\x00\x00\x00 cHRM\x00\x00m\u0098\x00\x00s\u008E\x00\x00\u00E2\u00F9\x00\x00\u0086\u0099\x00\x00x\u0083\x00\x00\u00D4N\x00\x003\u00BC\x00\x00\x1Cyc\u00E1\x1F,\x00\x00\x00\u00A2IDATx\u00DA\u0094\u0091\u00B1\r\u00840\x10\x04\u00C7>\x07\u00D0\n=P\x07\x05\u0090\"\u008AA\u00A4\u00D4@\x05n\u00C3]\\\u008C\x03l\x7F\u00F0\x12\u00C9\x0B\u00F0_x\u00BA\u00DB\u00DD\u00D1\x1AU-)%D\x04\x11!\u00E7L)\u0085\u00DAq\x00\"\u0082\u00B5\u0096\u0094\u00D2\u00CF\u00C14M\u00B7\u00CF\u00EB\u00BAbT\u00B5\x18cn]\u009B\u00A6\u00B9\x15\u00881~\x13<E\u008E1\u00BE#\u00EC\u00FB\u008E\u00F7\u00FEZ\u00F6}\u00CF0\f\u00F5\b\u00CE9\u0096e!\u0084@\u00D7u\u00CC\u00F3\u00CCy\u009EU\bFU\x0B@\u00CE\u0099m\u00DB\x18\u00C7\x11kmu\x0B\u0097\x00@\u00DB\u00B6\x1C\u00C7\u00F1\x7F\x0BO\x0Eo\b\u009F\x01\x00\u009B\u00FDU\u00A2t\u00A1Hz\x00\x00\x00\x00IEND\u00AEB`\u0082"));
               myFlyoutIcon.encoding = "BINARY";
               myFlyoutIcon.open( "w" );
               myFlyoutIcon.write( binData );
               myFlyoutIcon.close();
           } // the above code to create the file should only execute once for each user on the machine
          palette._flyoutMenu = {}; // this object will hold the menu related stuff - prefaced with an underscore to avoid naming collisions
          palette._flyoutMenu.items = menuItems;
          palette._flyoutMenu.callback = callback;
          palette._flyoutMenu.draw = function( palette ) { // actually draw the menu          
               // add the dropdownlist object to the window
               palette._flyout = palette.add( "dropdownlist", [ ( palette.frameSize.width - 20 ), 0, palette.frameSize.width, 20], palette._flyoutMenu.items );
               // make sure nothing is selected
               palette._flyout.selection = null;
               // add the onDraw method that will draw the icon instead of the normal dropdownlist
               palette._flyout.onDraw = function() {
                    this.graphics.drawImage( ScriptUI.newImage( myFlyoutIcon ), 0, 0 );
               }
               // add the onChange method to fire off the callback
               palette._flyout.onChange = function() {
                    this.window._flyoutMenu.callback( this.selection );
                    this.selection = null;
               }
          }
          // execute the draw function to place the flyout in the window
          palette._flyoutMenu.draw( palette );
     
     }
// sample usage
     // create the menu items
     var menuItems = [ "One", "Two", "Three", "-", "Four", "Five" ];
     // create the callback function
     sampleCallback = function( selection ) {
          // just letting all the menu items fall through for this demo
          switch( selection.text ) {
               case "One" :
               case "Two" :
               case "Three" :
               case "Four" :
               case "Five" : {
                    alert( selection.text );
               }
          }
     }
     // create the palette
     var myPalette = new Window( "palette", "Fly Out Menu Demo" );
     // adding some static text, just because
     myPalette.add( "statictext", undefined, "Demonstration of using ScriptUI drawing to customize control appearance" );
     //center and show the palette
     myPalette.center();
     myPalette.show();
     // add the flyout menu
     addFlyout( myPalette, menuItems, sampleCallback );

     




Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
People's Champ ,
Oct 20, 2009 Oct 20, 2009

Copy link to clipboard

Copied

A quick question :

I was able to place an image as a button background.

However I was concerned as the path to the image is an absolute path. What if we use the script in another environment where the image is not located ?

What becomes this image if we export the script for using it somewhere else ?

Loic

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Oct 20, 2009 Oct 20, 2009

Copy link to clipboard

Copied

At the top of that script are two functions that show you how to embed an image as a json string in your jsx file. It then converts the string to a file that you can write to a known position.

Regards

Bob

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
People's Champ ,
Oct 20, 2009 Oct 20, 2009

Copy link to clipboard

Copied

Oh yeah great input Bob !

Sorry I ask before looking at 🙂


Thanks,

Loic

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guru ,
Oct 20, 2009 Oct 20, 2009

Copy link to clipboard

Copied

Thank you for your example, Bob.

However I was concerned as the path to the image is an absolute path. What if we use the script in another environment where the image is not located ?

Loic,

Take a look at these lines:


if ( !myFlyoutIcon.exists ) { // if it's not there, then create the file
     var binData = (new String("\u0089PNG\r\n\x1A\n\x00\x00 ...

If the image file doesn't exist in the user data folder, it will be created by reading binary data right from the script — the image (binary data) is 'hidden' inside the script (text data). Very elegant!

Kasyan

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
People's Champ ,
Oct 20, 2009 Oct 20, 2009

Copy link to clipboard

Copied

Hi Peter,

I am incorrigible 🙂

That's a great news anyway. Don't need it right now but now I know it's possible !

Tx for all !

Loic

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 20, 2009 Oct 20, 2009

Copy link to clipboard

Copied

> If the image file doesn't exist in the user data folder, it will be created by. . .

Very nifty indeed!

Peter

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Oct 20, 2009 Oct 20, 2009

Copy link to clipboard

Copied

A quick question :

I was able to place an image as a button background.

However I was concerned as the path to the image is an absolute path. What if we use the script in another environment where the image is not located ?

I use Dave Saunders function to get path to current script file folder (allows debugging)

function getScriptFolder(){      try {           var activeScript = File(app.activeScript);      } catch(e) {           // running from ESTK ...           var activeScript = File(e.fileName);      }      return activeScript.parent; }

and reference to it

getScriptFolder() + "\\mypic.png"

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jan 08, 2013 Jan 08, 2013

Copy link to clipboard

Copied

Hi Bob. I've been doing some experimenting in the middle of writing an After Effects script and I saw your png-data-writing trick, which is quite cool, and potentially useful for something I'm trying to do. However, I'm not getting correct data written out. I've been trying to diagnose the problem, and so far I've checked to make sure the first stages of the process are correct: 1) reading the data; 2) storing as string. But stage 3 is amiss. When I write the data, the png is not valid, and I can see where. I'm just not sure why. I am using exactly your method; I'm not forgetting the "BINARY" flag, but I'm not so sure it is doing what it is supposed to. For example, here is the difference between correct and incorrect data:

first bytes of data read: "âPNG" (which is -- this forum may corrupt the text --- ascii 137, then PNG)

string value stored: "\u00E2PNG" (correct)

data re-written: "‚PNG" (ascii 226 followed by PNG)

May not be enough information, but maybe you can see something I'm missing. Or maybe there is something you already know about. Anyway, I'd love to solve this problem, so any feedback is much appreciated. And if you need any other clues, I'd be happy to find some and relate them.

Thanks in advance

-Chris G

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Jan 08, 2013 Jan 08, 2013

Copy link to clipboard

Copied

Are you using Peter Kahrel's script from ScriptUI for Dummies?

So long as you take the output file information and paste it exactly, it should work fine.

Good Luck

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jan 08, 2013 Jan 08, 2013

Copy link to clipboard

Copied

Hi Bob. I was using the code in that forum that you posted. So, no, I didn't get it from ScriptUI for Dummies -- I'm looking to see what possible differences there could be ....

thanks

-cg

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jan 08, 2013 Jan 08, 2013

Copy link to clipboard

Copied

Bob,

Thanks for pointing to Peter as a resource. There is really no difference between what you offered in your post and what is in his book. I've tried a number of variations and still do not see valid data being written. Perhaps I'll take it up with Peter.

Thanks

-CG

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Jan 08, 2013 Jan 08, 2013

Copy link to clipboard

Copied

Without seeing your exact code and knowing how you're pasting strings and what not, it's hard to know what you're doing wrong. The technique works, though.

Regards

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Jan 09, 2013 Jan 09, 2013

Copy link to clipboard

Copied

This is a slight variation on Peter's example in his book.

If run in ESTK will pop up a file select dialog and return a string in your word editor.

Thant can be copied and pasted then.

Works fine for me in AFX, not InDesign.

//=======================================================

var infile = File.openDialog("Select a file, png or jpg.", "*.png");

var outfile =  new File (Folder.desktop.fsName+"/ImageToBinaryCode.txt");

infile.open ("r"); infile.encoding = "binary";

var str = infile.read(); infile.close();

outfile.open ("w");

outfile.write (str.toSource ().replace( /^\(new String\(/,"").replace( /\)\)$/,";"));

outfile.close ();

outfile.execute();

//=======================================================

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 09, 2013 Jan 09, 2013

Copy link to clipboard

Copied

CG, Alan,

The code you posted produces valid strings from PNGs, works fine in InDesign. Maybe there's something wrong with the PNG you're trying to convert. Did you try any other PNG files?

Peter

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Jan 09, 2013 Jan 09, 2013

Copy link to clipboard

Copied

I am not having any issue with the code it produces and can use the generated code  as an image object in ScriptUI without any issue.

CG

I did read on another forum - issues perhaps with the text editor/IDE editor interpreting the code -

UTF stuff:

http://forums.adobe.com/message/4503422#4503422

Perhaps try using the ESTK and Notepad first?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
Jan 09, 2013 Jan 09, 2013

Copy link to clipboard

Copied

CRGreenDotCom wrote:

[...]

first bytes of data read: "âPNG" (which is -- this forum may corrupt the text --- ascii 137, then PNG)

string value stored: "\u00E2PNG" (correct)

data re-written: "‚PNG" (ascii 226 followed by PNG)


[...]

Hi Chris,

\u00E2 is not correct! This is the translation of MacRoman 137 (i.e. 0x89) into Unicode (U+00E2). But 0x89 != 0xE2, therefore the binary information is lost and the PNG is not valid.

Let's recap:

• A PNG file always starts with the code 137 (i.e. 0x89). This number btw is not supposed to refer to an ASCII character code point (the pure ASCII table only addresses 7-bit codes).

• Regarded as a character code in some "extended ASCII" table, 137 (0x89) may anyway refer to:

— the character â (LATIN SMALL LETTER A WITH CIRCUMFLEX) in MacRoman,

— the character (PER MILLE SIGN) in Windows1252,

— etc.

Note that 137 (0x89) has no counterpart in Unicode (I mean U+0089 is simply undefined).

• The problem in encoding a PNG file (as any other BINARY file) in a JavaScript string is to maintain byte values disregarding character encodings. The key point is that a character within a JavaScript string is internally encoded as a 16-bit unsigned value.

• The first character of a stringified PNG file in JS must be "\u0089" (also expressed by "\x89"). If this is not the case, your data have been corrupted and/or wrongly re-encoded at some stage.

In your case, having "\u00E2PNG..." at step 2 indicates that a conversion has been improperly applied. As U+00E2 refers to â (LATIN SMALL LETTER A WITH CIRCUMFLEX) in Unicode, there are very good reasons to conclude that a MacRoman-to-Unicode conversion is occurring  in your process between step 1 and step 2. But as we don't know the details of your code and which applications are involved around (IDE, etc.), we cannot help you further.

Hope that helps.

@+

Marc

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jan 09, 2013 Jan 09, 2013

Copy link to clipboard

Copied

Hello everyone. Thanks for the replies. I got thrown onto another project so I wasn't aware of the responses here. I did get the code working, but there were definitely some strange things going on, and I will check with these comments, the info, and the links.

Thanks again -- a ton -- for the replies.

-cg

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Feb 11, 2013 Feb 11, 2013

Copy link to clipboard

Copied

In relation to posts 52 onwards...

(embedding images into scripts)

Unfortuately having some issues with  embedding now out of the blue... (After Effects scripts) - Perhaps you inDesign scripters can shed some light....

The relevant thread.....

http://forums.adobe.com/message/5051584#5051584

Summary - any scripts that have an embedded image just stopped working for me.

Error - unable to create temporary image file [targeting After Effects].

These scripts were working fine for 6 months. If the code is run targeting the ESTK - works fine once but then freezes the ESTK.

Perhaps some Adobe update in the background has messed things up?

Using AFX 5.5 on W7 x64

I am contemplating reinstalling the whole creative suite.

Any thoughts appreciated.

Thanks

Alan.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
People's Champ ,
Oct 20, 2009 Oct 20, 2009

Copy link to clipboard

Copied

Hi Kasyan,

Regarding to the background color of the button, you get the same result as mine :

Error: Cannot set backgroundColor property for this element type

I can accept backroundColor is not a property of a button but why is it told as one of the properties in the scriptui model ? A mistery.

For you next error :

var pen = g.newPen( g.PenType.SOLID_COLOR, [0.7, 0.7, 0.7, 1] );

throws an error: TypeError: Bad argument list.

I buyed and use as a basis RapidUI. So I create my items on this soft, grab the code and modify them in ESTK.

Very weirdly, it generates this kind of argument for the color :

var pen = g.newPen( g.PenType.SOLID_COLOR, [0.7, 0.7, 0.7], 1 ); //-> [R,G,B],A

Meanwhile the scriptUI precises [R,G,B,A].

But [R,G,B,A] throws an error. [R,G,B],A runs but alpha seems to be ignored.

I can't tell why use once graphics and other time scriptUI. Let's hope We get some more detailed informations on ScriptUI styling  (and ScriptUI in general) soon.

If it can help ?

Loic

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 20, 2009 Oct 20, 2009

Copy link to clipboard

Copied

For 26 Euros (http://www.scriptui.com/) or 50 Euros (http://www.scriptuibuilder.com/) you could save yourselves a lot of time!

Peter

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
People's Champ ,
Oct 20, 2009 Oct 20, 2009

Copy link to clipboard

Copied

Hi Peter,

I buyed and use pleasantly Rapid ScriptUI. It's clearly a great help.

However some behaviours disturb me. If you switch a color of a item, the dialog sometimes disappear but I can't tell if it's connected to rapiUI or Adobe ScriptUI errors.

I don't use http://www.scriptuibuilder.com/ but would be glad to hear comments on it.

Loic

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Oct 20, 2009 Oct 20, 2009

Copy link to clipboard

Copied

Loic_aigon wrote:

I buyed and use pleasantly Rapid ScriptUI. It's clearly a great help.

However some behaviours disturb me. If you switch a color of a item, the dialog sometimes disappear but I can't tell if it's connected to rapiUI or Adobe ScriptUI errors.

Sorry to hear about this issue, please see if you can duplicate and contact us at http://scriptui.com/contact.aspx

Steven

www.scriptui.com

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines