- Сообщения
- 69
- Реакции
- 0
Действительно не работает... Ну, тогда Ctrl+D - Ваш выбор.sergeyjurnal сказал(а):Дело в том, что без открытия палитры Links горячая клавиша работать не будет.
function CreateScript(myEnthusiasm, myMoney, myLife) {
do {
      myMegaScript = writeScript();
      try {
            doScripts(myMegaScript);
            alert('Wow!!!');
            myMegaScript.send('vbatushev@indesign.rudtp.ru');
            if (userMessages.length < 0) {
                 myMegaScript = writeScript();
            }   
      } catch(err) {
            alert('Mat-peremat!!!');
      }
} while (myEnthusiasm!= null || myMoney != null || myLife!= null);
     return TheWorldUnfadingGlory;
}
function writeScript() {
      myMinds = manuals.read();
      myScriptCollection = get(sameScripts);
      myScriptCollection.read();
      myMegaScript = new Script;
      myMegaScript.open('w');
      myMegaScript.write(mySoul + myMinds);
      return myMegaScript;
}with(app){
	if (documents.length == 0) { alert('No open documents!'); exit(); }
    if (selection.length == 0) { alert('No selections!'); exit(); }
	if (selection[0].constructor.name == 'Rectangle' ||
		selection[0].constructor.name == 'Oval' ||
		selection[0].constructor.name == 'Polygon') {
		var myFrame = selection[0];	
		var myFile = new File;
		myFile = File.openDialog('Select File', 'Image Files:*.JPG; *.JPEG; *.EPS; *.PDF; *.TIF; *.TIFF; *.PSD; *.GIF; *.EMF; *.WMF');	
		if (!myFile) {	exit(); }	
		myFrame.place(myFile);
		myFile.close();
	}
}with(app){
	if (documents.length == 0) { alert('No open documents!'); exit(); }
    if (selection.length == 0) { alert('No selections!'); exit(); }
	if (selection[0].constructor.name == 'Rectangle' ||
		selection[0].constructor.name == 'Oval' ||
		selection[0].constructor.name == 'Polygon') {
		var myFrame = selection[0];
		if (myFrame.images.length > 0) {
			relinkImage(myFrame.images[0]);
			exit();			
		}
		if (myFrame.epss.length > 0) {
			relinkImage(myFrame.epss[0]);
			exit();			
		}
		if (myFrame.picts.length > 0) {
			relinkImage(myFrame.picts[0]);
			exit();			
		}
		if (myFrame.wmfs.length > 0) {
			relinkImage(myFrame.wmfs[0]);
			exit();			
		}
		if (myFrame.pdfs.length > 0) {
			relinkImage(myFrame.pdfs[0]);
			exit();			
		}
	}
}
function relinkImage(myImage) {
	var myFile = new File;
	myFile = File.openDialog('Select File', 'Image Files:*.JPG; *.JPEG; *.EPS; *.PDF; *.TIF; *.TIFF; *.PSD; *.GIF; *.EMF; *.WMF');	
	if (!myFile) {	exit(); }	
	myImage.itemLink.relink(myFile);
	myImage.itemLink.update();
	myFile.close();
}try {                                         //Пробуй
        .
} catch (err) {                           // А если ошибешься
     ask('http://forum.rudtp.ru');    // Спрашивай – ответим
} finally {
     youSuccess;                        // И все получится :)
}vbatushev сказал(а):PHP:try { //Пробуй . } catch (err) { // А если ошибешься ask('http://forum.rudtp.ru'); // Спрашивай – ответим } finally { youSuccess; // И все получится :) }
