Quantcast
Channel: Adobe Community : Popular Discussions - Illustrator Scripting
Viewing all articles
Browse latest Browse all 12845

Startup Script for Illustrator only

$
0
0

Hi,

 

I've made a nice palette script for Illustrator CS6 on OSX 10.6.8.

I put it into HD/Library/Application\ Support/Adobe/Startup\ Scripts\ CS6/Illustrator

 

I works fine in Illustrator.

 

BUT: If I start Indesign CS6, the palette show up twice and it is not possible to close both pallettes.

 

Any hints?

 

Next question: The palette is used to have an easy access to script. If I start the scripts with the palette, the error messages of the scripts are not displayed. If I start individal script directly in Illustrator errors are displayed. What can I do?

 

Thanks for your help.

 

 

 #target illustrator; 
#targetengine main; //var pfad = "/Applications/Adobe\ Illustrator\ CS6/Presets.localized/de_DE/Skripten/"
var pfad = "/Volumes/Platte/Hilfsmittel/Skripte/" 
var win = new Window('palette', 'Daniels Zauberkiste');
var tpanel = win.add ("tabbedpanel");
tpanel.alignChildren = ["fill", "fill"];
tpanel.preferredSize = [100,20];
win.margins = 0;
win.spacing = 0;
var subtab1panel = tpanel.add ("tab", undefined, "allgemein");
subtab1panel.orientation="row";
subtab1panel.alignChildren = ["fill", "fill"];  
var t1group = subtab1panel.add("group");
t1group.orientation = "column";
t1group.alignChildren = ["fill", "fill"];  
var btnSelect1 = t1group.add('button', undefined, 'Passer');
var scriptToLoad1 = new File(pfad+"_Passer-Montage.jsx");
var btnSelect2 = t1group.add('button', undefined, 'Prüfpasser'); 
var scriptToLoad2 = new File(pfad+"_Prüfpasser-Montage.jsx"); 
var btnSelect3 = t1group.add('button', undefined, 'Kontur+10'); 
var scriptToLoad3 = new File(pfad+"_Kontur+Dok+10.jsx"); 
var btnSelect4 = t1group.add('button', undefined, 'Kontur+20'); 
var scriptToLoad4 = new File(pfad+"_Kontur+Dok+20.jsx"); 
var btnSelect5 = t1group.add('button', undefined, 'Standardbogen Stanze'); 
var scriptToLoad5 = new File(pfad+"_Bogengröße.jsx");   
btnSelect1.onClick = function(){       var des = scriptToLoad1;   des.open("r");          var bt = new BridgeTalk;   bt.target = "illustrator";          var script = des.read();   des.close();               bt.body = script;   bt.send();   }// end function  
btnSelect2.onClick = function(){       var des = scriptToLoad2;   des.open("r");          var bt = new BridgeTalk;   bt.target = "illustrator";          var script = des.read();   des.close();               bt.body = script;   bt.send();  }// end function  
btnSelect3.onClick = function(){       var des = scriptToLoad3;   des.open("r");          var bt = new BridgeTalk;   bt.target = "illustrator";          var script = des.read();   des.close();               bt.body = script;   bt.send();}// end function  
btnSelect4.onClick = function(){       var des = scriptToLoad4;   des.open("r");          var bt = new BridgeTalk;   bt.target = "illustrator";          var script = des.read();   des.close();               bt.body = script;   bt.send();}// end function  
btnSelect5.onClick = function(){       var des = scriptToLoad5;   des.open("r");          var bt = new BridgeTalk;   bt.target = "illustrator";          var script = des.read();   des.close();               bt.body = script;   bt.send();}// end function          
win.center();
win.show();

Viewing all articles
Browse latest Browse all 12845

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>