I have a few more questions that i cannot figure out. Also how do you get your code to display with the numbered lines on this site? var myResult; var w =new Window ('dialog {text: "Running Changes", orientation: "column", alignChildren:["fill","fill"], properties: {closeButton: false}}'); w.main =w.add ('group {preferredSize: [600, 600], alignChildren: ["left","fill"]}'); w.stubs = w.main.add ('listbox', undefined, ['Changes Made', 'Check For Changes', 'Example']); w.stubs.preferredSize.width = 120; w.tabGroup = w.main.add ('group {alignment: ["Fill","Fill"], orientation: "stack"}'); w.tabs =[]; w.tabs[0]= w.tabGroup.add ('group'); w.tabs[0].add('statictext {text: ""}'); w.tabs =[]; w.tabs[0]= w.tabGroup.add ('group'); w.tabs[0].add('statictext {text: "Select a change to make"}'); w.tabs[0].add ('panel'); // I cannot figure out how to make RunCH2 and 3 to Work. Example bleow ' /* RunCH2 alert("RCH2 DONE") Replace_TXT(" and ", "dddd"); RunCH3 alert("RCH3 DONE") Replace_TXT(" The ", " blah blah"); */ var RunCH1= w.tabs[0].add ('checkbox {text: "Find and Replace"}'); var RunCH2= w.tabs[0].add ('checkbox {text: "GHS Running Changes"}'); var RunCH3= w.tabs[0].add ('checkbox {text: "Non-GHS Running Changes"}'); var Pan1=w.tabs[0].add ('panel {text: "Find and Replace", preferredSize: [-1, 200],orientation: "column",alignChildren: ["left","Center"]}'); Pan1.add('statictext {text: "Double Space - Single Space"}'); Pan1.add('statictext {text: "Space : - :"}'); Pan1.add('statictext {text: "Space . - ."}'); Pan1.add('statictext {text: "<CR> - Return"}'); Pan1.add('statictext {text: "Double Return - Return"}'); var Pan1=w.tabs[0].add ('panel {text: "GHS Running Changes", preferredSize: [-1, 150],orientation: "column",alignChildren: ["left","Center`"]}'); Pan1.add('statictext {text: "B1. Enter Here1"}'); Pan1.add('statictext {text: "B2. Enter Here2"}'); Pan1.add('statictext {text: "B3. Enter Here3"}'); Pan1.add('statictext {text: "B4. Enter Here4"}'); var Pan1=w.tabs[0].add ('panel {text: "Non-GHS Running Changes", preferredSize: [-1, 150],orientation: "column",alignChildren: ["left","Center`"]}'); Pan1.add('statictext {text: "B1. Enter Here5"}'); Pan1.add('statictext {text: "B2. Enter Here6"}'); Pan1.add('statictext {text: "B3. Enter Here7"}'); Pan1.add('statictext {text: "B4. Enter Here8"}'); var Pan1=w.tabs[0].add ('panel {text: "Contact Infromation", preferredSize: [-1, 62],orientation: "column",alignChildren: ["left","Center`"]}'); // How would I add a email address here where my co-workers could Click it email about Whatever? This is not as big of a deal so if this is alot of trouble to do i will skip it. Pan1.add('statictext {text: "*email Address here*"}'); with(w.tabs[0]) { with(add ('group {alignment: "left"}')) { add ('button {text: "Reset all warning dialogs"}'); } } w.tabs[1]= w.tabGroup.add ('group'); w.tabs[1].add ('statictext {text: "Changes that WILL need checked"}'); w.tabs[1].add ('panel {preferredSize: [-1, -10]}'); var Pan1=w.tabs[1].add ('panel {text: "GHS", preferredSize: [-1, 250],orientation: "column",alignChildren: ["left","Center`"]}'); Pan1.add('statictext {text: "B1. Here"}'); Pan1.add('statictext {text: "B2. Here"}'); Pan1.add('statictext {text: "B3. Here"}'); Pan1.add('statictext {text: "B4. Here"}'); Pan1.add('statictext {text: "B5. Here"}'); Pan1.add('statictext {text: "G1. Here"}'); Pan1.add('statictext {text: "G2. Here"}'); w.tabs[1].add ('panel {text: "Non-GHS", preferredSize: [-1, 100]}'); w.tabs[2]= w.tabGroup.add ('group'); w.tabs[2].add ('statictext {text: "Example Of running Changes"}'); w.tabs[2].add ('panel'); w.tabs[2].add ('statictext {text: "", preferredSize: [-1, 20]}'); // How can i make PreV1 activate the below Radio buttons? Maybe gray out the Buttons when not the Check box is not checked. var PreV1= w.tabs[2].add ('checkbox {text: "To Preview Changes"}'); var Pan1=w.tabs[2].add ('panel {text: "", preferredSize: [-1, 200],orientation: "column",alignChildren: ["left","top"]}'); // Is there a way to make each radio button display a Different Pictrue? Pan1.add('radioButton {text: "B1. Enter Here1"}'); Pan1.add('radioButton {text: "B2. Enter Here2"}'); Pan1.add('radioButton {text: "B3. Enter Here3"}'); Pan1.add('radioButton {text: "B4. Enter Here4"}'); Pan1.add('radioButton {text: "B1. Enter Here5"}'); Pan1.add('radioButton {text: "B2. Enter Here6"}'); Pan1.add('radioButton {text: "B3. Enter Here7"}'); Pan1.add('radioButton {text: "B4. Enter Here8"}'); Image.prototype.onDraw =function() { if(!this.image )return; var WH =this.size,wh =this.image.size,k = Math.min(WH[0]/wh[0], WH[1]/wh[1]), xy; wh =[k*wh[0],k*wh[1]]; xy =[(WH[0]-wh[0])/2, (WH[1]-wh[1])/2 ]; this.graphics.drawImage(this.image,xy[0],xy[1],wh[0],wh[1]); WH = wh = xy =null; } flower=w.tabs[2].add ("image", undefined, File ("~/\Desktop/\xxx.jpg")); flower.size =[300,300]; w.buttons = w.add ('group {alignment: "right"}'); w.buttons.add ('button {text: "OK"}'); w.buttons.add ('button {text: "Cancel"}'); for( var i = 0; i < w.tabs.length; i++){ w.tabs.orientation ='column'; w.tabs.alignChildren ='fill'; w.tabs.alignment =['fill','fill']; w.tabs.visible =false; } w.stubs.onChange = showTab; function showTab () { if(w.stubs.selection !==null){for(var i = w.tabs.length-1; i >= 0; i--) { w.tabs.visible =false; } w.tabs[w.stubs.selection.index].visible =true; } } w.onShow =function() { w.stubs.selection = 1; showTab; } myResult = w.show(); // How do i make each CHECK BOX RunCH1/2/3 Only work when they are selected? I cannot figure out how to make 2&3 Work. if(myResult == 1 && (RunCH1.value==true || RunCH2.value2==true || RunCH3.value3==true) ){ alert("Changes have been made!") Replace_TXT(" <CR> ", "^p"); Replace_TXT(" ", " "); Replace_TXT(" :", ":"); Replace_TXT(" .", "."); Replace_TXT("^p^p", "^p"); Replace_TXT(" <CR>", "^p"); w.close (true); /* if(myResult == 2 && (RunCH2.value==true) alert("RunCH2 DONE") Replace_TXT(" and ", "dddd"); w.close (true); if(myResult == 3 && (RunCH3.value==true) alert("RunCH3 DONE") Replace_TXT(" The ", " blah blah"); w.close (true); */ { } } function Replace_TXT(input, output) { //app.selection[0]; app.findTextPreferences = app.changeTextPreferences = NothingEnum.nothing; app.findTextPreferences.findWhat = input; app.changeTextPreferences.changeTo = output; app.activeDocument.changeText(); }
... View more