Simple UI test


i've managed check boxes working. no vast feat know i'm happy it!

 

feast eyes on incredible red or grey box script!

 

/// simple ui script creates image , fills red or grey

 

preferences.rulerunits = units.pixels

 


var dlg=
"dialog{text:'script interface',bounds:[100,100,280,250],"+
"panel0:panel{bounds:[10,10,170,140] , text:'fill box ' ,properties:{borderstyle:'etched',su1panelcoordinates:true},"+
"redcheck:checkbox{bounds:[30,30,120,51] , text:'change red' },"+
"exit:button{bounds:[30,90,130,110] , text:'cancel' },"+
"fill:button{bounds:[30,60,130,80] , text:'fill it!' },"+
"},"+
"};"

 

var colorref = new solidcolor;
colorref.rgb.hexvalue="a6a6a6"

 

var win = new window(dlg,'simple window');
win.center();

 

win.panel0.exit.onclick = function(){
win.close(1);
}

 

win.panel0.redcheck.onclick = function(){
  if (win.panel0.redcheck.value){
     colorref.rgb.hexvalue="dd0022";
  } else {
     colorref.rgb.hexvalue="a6a6a6";
  }
}

 

win.panel0.fill.onclick = function(){

 

var docref = documents.add(100, 100, 72.0);

 

app.activedocument.selection.fill(colorref)

 


win.close(1);
}

 


win.show();



More discussions in Photoshop Scripting


adobe

Comments

Popular posts from this blog

CS5 Adobe Media Encoder: Encode failed because the source duration is nil.

cf_sql_integer vs cf_sql_bigint vs cf_sql_int??

localhost/joomla15/administrator doesnt work - Joomla! Forum - community, help and support