use Image catalog script for the current document

Is it possible to use the script to image catalogue for the current document in which we work instead of leaving the mark of script a new document fees for placed images?

use,

//ImageCatalog.jsx
//An InDesign CS6 JavaScript
/*
@@@BUILDINFO@@@ "ImageCatalog.jsx" 3.0.0 15 December 2009
*/
//Creates an image catalog from the graphic files in a selected folder.
//Each file can be labeled with the file name, and the labels are placed on
//a separate layer and formatted using a paragraph style ("label") you can
//modify to change the appearance of the labels.
//
//For more information on InDesign scripting, go to http://www.adobe.com/products/indesign/scripting/index.html
//Or visit the InDesign Scripting User to User forum at http://www.adobeforums.com .
//
//The myExtensions array contains the extensions of the graphic file types you want
//to include in the catalog. You can remove extensions from or add extensions to this list.
//myExtensions is a global. Mac OS users should also look at the file types in the myFileFilter function.
main();
function main(){
  var myFilteredFiles;
  //Make certain that user interaction (display of dialogs, etc.) is turned on.
  app.scriptPreferences.userInteractionLevel = UserInteractionLevels.interactWithAll;
  myExtensions = [".jpg", ".jpeg", ".eps", ".ps", ".pdf", ".tif", ".tiff", ".gif", ".psd", ".ai"]
  //Display the folder browser.
  var myFolder = Folder.selectDialog("Select the folder containing the images", "");
  //Get the path to the folder containing the files you want to place.
  if(myFolder != null){
  if(File.fs == "Macintosh"){
  myFilteredFiles = myMacOSFileFilter(myFolder);
  }
  else{
  myFilteredFiles = myWinOSFileFilter(myFolder);
  }
  if(myFilteredFiles.length != 0){
  myDisplayDialog(myFilteredFiles, myFolder);
  alert("Done!");
  }
  }
}
//Windows version of the file filter.
function myWinOSFileFilter(myFolder){
  var myFiles = new Array;
  var myFilteredFiles = new Array;
  for(myExtensionCounter = 0; myExtensionCounter < myExtensions.length; myExtensionCounter++){
  myExtension = myExtensions[myExtensionCounter];
        myFiles = myFolder.getFiles("*"+ myExtension);
  if(myFiles.length != 0){
  for(var myFileCounter = 0; myFileCounter < myFiles.length; myFileCounter++){
  myFilteredFiles.push(myFiles[myFileCounter]);
  }
  }
  }
  return myFilteredFiles;
}
function myMacOSFileFilter(myFolder){
  var myFilteredFiles = myFolder.getFiles(myFileFilter);
  return myFilteredFiles;
}
//Mac OS version of file filter
//Have to provide a separate version because not all Mac OS users use file extensions
//and/or file extensions are sometimes hidden by the Finder.
function myFileFilter(myFile){
  var myFileType = myFile.type;
  switch (myFileType){
  case "JPEG":
  case "EPSF":
  case "PICT":
  case "TIFF":
  case "8BPS":
  case "GIFf":
  case "PDF ":
  return true;
  break;
  default:
  for(var myCounter = 0; myCounter-1){
  return true;
  break;
  }
  }
  }
  return false;
}
function myDisplayDialog(myFiles, myFolder){
  var myLabelWidth = 112;
  var myStyleNames = myGetParagraphStyleNames(app);
  var myLayerNames = ["Layer 1", "Labels"];
  var myDialog = app.dialogs.add({name:"Image Catalog"});
  with(myDialog.dialogColumns.add()){
  with(dialogRows.add()){
  staticTexts.add({staticLabel:"Information:"});
  }
  with(borderPanels.add()){
  with(dialogColumns.add()){
  with(dialogRows.add()){
  staticTexts.add({staticLabel:"Source Folder:", minWidth:myLabelWidth});
  staticTexts.add({staticLabel:myFolder.path + "/" + myFolder.name});
  }
  with(dialogRows.add()){
  staticTexts.add({staticLabel:"Number of Images:", minWidth:myLabelWidth});
  staticTexts.add({staticLabel:myFiles.length + ""});
  }
  }
  }
  with(dialogRows.add()){
  staticTexts.add({staticLabel:"Options:"});
  }
  with(borderPanels.add()){
  with(dialogColumns.add()){
  with(dialogRows.add()){
  staticTexts.add({staticLabel:"Number of Rows:", minWidth:myLabelWidth});
  var myNumberOfRowsField = integerEditboxes.add({editValue:3});
  }
  with(dialogRows.add()){
  staticTexts.add({staticLabel:"Number of Columns:", minWidth:myLabelWidth});
  var myNumberOfColumnsField = integerEditboxes.add({editValue:3});
  }
  with(dialogRows.add()){
  staticTexts.add({staticLabel:"Horizontal Offset:", minWidth:myLabelWidth});
  var myHorizontalOffsetField = measurementEditboxes.add({editValue:12, editUnits:MeasurementUnits.points});
  }
  with(dialogRows.add()){
  staticTexts.add({staticLabel:"Vertical Offset:", minWidth:myLabelWidth});
  var myVerticalOffsetField = measurementEditboxes.add({editValue:24, editUnits:MeasurementUnits.points});
  }
  with (dialogRows.add()){
  with(dialogColumns.add()){
  staticTexts.add({staticLabel:"Fitting:", minWidth:myLabelWidth});
  }
  with(dialogColumns.add()){
  var myFitProportionalCheckbox = checkboxControls.add({staticLabel:"Proportional", checkedState:true});
  var myFitCenterContentCheckbox = checkboxControls.add({staticLabel:"Center Content", checkedState:true});
  var myFitFrameToContentCheckbox = checkboxControls.add({staticLabel:"Frame to Content", checkedState:true});
  }
  }
  with(dialogRows.add()){
  var myRemoveEmptyFramesCheckbox = checkboxControls.add({staticLabel:"Remove Empty Frames:", checkedState:true});
  }
  }
  }
  with(dialogRows.add()){
  staticTexts.add({staticLabel:""});
  }
  var myLabelsGroup = enablingGroups.add({staticLabel:"Labels", checkedState:true});
  with (myLabelsGroup){
  with(dialogColumns.add()){
  //Label type
  with(dialogRows.add()){
  with(dialogColumns.add()){
  staticTexts.add({staticLabel:"Label Type:", minWidth:myLabelWidth});
  }
  with(dialogColumns.add()){
  var myLabelTypeDropdown = dropdowns.add({stringList:["File name", "File path", "XMP description", "XMP author"], selectedIndex:0});
  }
  }
  //Text frame height
  with(dialogRows.add()){
  with(dialogColumns.add()){
  staticTexts.add({staticLabel:"Label Height:", minWidth:myLabelWidth});
  }
  with(dialogColumns.add()){
  var myLabelHeightField = measurementEditboxes.add({editValue:24, editUnits:MeasurementUnits.points});
  }
  }
  //Text frame offset
  with(dialogRows.add()){
  with(dialogColumns.add()){
  staticTexts.add({staticLabel:"Label Offset:", minWidth:myLabelWidth});
  }
  with(dialogColumns.add()){
  var myLabelOffsetField = measurementEditboxes.add({editValue:0, editUnits:MeasurementUnits.points});
  }
  }
  //Style to apply
  with(dialogRows.add()){
  with(dialogColumns.add()){
  staticTexts.add({staticLabel:"Label Style:", minWidth:myLabelWidth});
  }
  with(dialogColumns.add()){
  var myLabelStyleDropdown = dropdowns.add({stringList:myStyleNames, selectedIndex:0});
  }
  }
  //Layer
  with(dialogRows.add()){
  with(dialogColumns.add()){
  staticTexts.add({staticLabel:"Layer:", minWidth:myLabelWidth});
  }
  with(dialogColumns.add()){
  var myLayerDropdown = dropdowns.add({stringList:myLayerNames, selectedIndex:0});
  }
  }
  }
  }
        var myResult = myDialog.show();
        if(myResult == true){
  var myNumberOfRows = myNumberOfRowsField.editValue;
  var myNumberOfColumns = myNumberOfColumnsField.editValue;
  var myRemoveEmptyFrames = myRemoveEmptyFramesCheckbox.checkedState;
  var myFitProportional = myFitProportionalCheckbox.checkedState;
  var myFitCenterContent = myFitCenterContentCheckbox.checkedState;
  var myFitFrameToContent = myFitFrameToContentCheckbox.checkedState;
  var myHorizontalOffset = myHorizontalOffsetField.editValue;
  var myVerticalOffset = myVerticalOffsetField.editValue;
  var myMakeLabels = myLabelsGroup.checkedState;
  var myLabelType = myLabelTypeDropdown.selectedIndex;
  var myLabelHeight = myLabelHeightField.editValue;
  var myLabelOffset = myLabelOffsetField.editValue;
  var myLabelStyle = myStyleNames[myLabelStyleDropdown.selectedIndex];
  var myLayerName = myLayerNames[myLayerDropdown.selectedIndex];
  myDialog.destroy();
  myMakeImageCatalog(myFiles, myNumberOfRows, myNumberOfColumns, myRemoveEmptyFrames, myFitProportional, myFitCenterContent, myFitFrameToContent, myHorizontalOffset, myVerticalOffset, myMakeLabels, myLabelType, myLabelHeight, myLabelOffset, myLabelStyle,  myLayerName);
        }
  else{
  myDialog.destroy();
  }
  }
}
function myGetParagraphStyleNames(myDocument){
  var myStyleNames = new Array;
  var myAddLabelStyle = true;
  for(var myCounter = 0; myCounter < myDocument.paragraphStyles.length; myCounter++){
  myStyleNames.push(myDocument.paragraphStyles.item(myCounter).name);
  if (myDocument.paragraphStyles.item(myCounter).name == "Labels"){
  myAddLabelStyle = false;
  }
  }
  if(myAddLabelStyle == true){
  myStyleNames.push("Labels");
  }
  return myStyleNames;
}
function myMakeImageCatalog(myFiles, myNumberOfRows, myNumberOfColumns, myRemoveEmptyFrames, myFitProportional, myFitCenterContent, myFitFrameToContent, myHorizontalOffset, myVerticalOffset, myMakeLabels, myLabelType, myLabelHeight, myLabelOffset, myLabelStyle,  myLayerName){
  var myPage, myFile, myCounter, myX1, myY1, myX2, myY2, myRectangle, myLabelStyle, myLabelLayer;
  var myParagraphStyle, myError;
  var myFramesPerPage = myNumberOfRows * myNumberOfColumns;
  var myDocument = app.activeDocument;
  myDocument.viewPreferences.horizontalMeasurementUnits = MeasurementUnits.points;
  myDocument.viewPreferences.verticalMeasurementUnits = MeasurementUnits.points;
  var myDocumentPreferences = myDocument.documentPreferences;
  var myNumberOfFrames = myFiles.length;
  var myNumberOfPages = Math.round(myNumberOfFrames / myFramesPerPage);
  if ((myNumberOfPages * myFramesPerPage) < myNumberOfFrames){
  myNumberOfPages++;
  }
  //If myMakeLabels is true, then add the label style and layer if they do not already exist.
  if(myMakeLabels == true){
  try{
  myLabelLayer = myDocument.layers.item(myLayerName);
  //if the layer does not exist, trying to get the layer name will cause an error.
  myLabelLayer.name;
  }
  catch (myError){
  myLabelLayer = myDocument.layers.add({name:myLayerName});
  }
  //If the paragraph style does not exist, create it.
  try{
  myParagraphStyle = myDocument.paragraphStyles.item(myLabelStyle);
  myParagraphStyle.name;
  }
  catch(myError){
  myDocument.paragraphStyles.add({name:myLabelStyle});
  }
  }
  myDocumentPreferences.pagesPerDocument = myNumberOfPages;
  myDocumentPreferences.facingPages = false;
  var myPage = myDocument.pages.item(0);
  var myMarginPreferences = myPage.marginPreferences;
  var myLeftMargin = myMarginPreferences.left;
  var myTopMargin = myMarginPreferences.top;
  var myRightMargin = myMarginPreferences.right;
  var myBottomMargin = myMarginPreferences.bottom;
  var myLiveWidth = (myDocumentPreferences.pageWidth - (myLeftMargin + myRightMargin)) + myHorizontalOffset
  var myLiveHeight = myDocumentPreferences.pageHeight - (myTopMargin + myBottomMargin)
  var myColumnWidth = myLiveWidth / myNumberOfColumns
  var myFrameWidth = myColumnWidth - myHorizontalOffset
  var myRowHeight = (myLiveHeight / myNumberOfRows)
  var myFrameHeight = myRowHeight - myVerticalOffset
  var myPages = myDocument.pages;
  // Construct the frames in reverse order. Don't laugh--this will
  // save us time later (when we place the graphics).
  for (myCounter = myDocument.pages.length-1; myCounter >= 0; myCounter--){
  myPage = myPages.item(myCounter);
  for (var myRowCounter = myNumberOfRows; myRowCounter >= 1; myRowCounter--){
  myY1 = myTopMargin + (myRowHeight * (myRowCounter-1));
  myY2 = myY1 + myFrameHeight;
  for (var myColumnCounter = myNumberOfColumns; myColumnCounter >= 1; myColumnCounter--){
  myX1 = myLeftMargin + (myColumnWidth * (myColumnCounter-1));
  myX2 = myX1 + myFrameWidth;
  myRectangle = myPage.rectangles.add(myDocument.layers.item(-1), undefined, undefined, {geometricBounds:[myY1, myX1, myY2, myX2], strokeWeight:0, strokeColor:myDocument.swatches.item("None")});
  }
  }
  }
  // Because we constructed the frames in reverse order, rectangle 1
  // is the first rectangle on page 1, so we can simply iterate through
  // the rectangles, placing a file in each one in turn. myFiles = myFolder.Files;
  for (myCounter = 0; myCounter < myNumberOfFrames; myCounter++){
  myFile = myFiles[myCounter];
  myRectangle = myDocument.rectangles.item(myCounter);
  myRectangle.place(File(myFile));
  myRectangle.label = myFile.fsName.toString();
  //Apply fitting options as specified.
  if(myFitProportional){
  myRectangle.fit(FitOptions.proportionally);
  }
  if(myFitCenterContent){
  myRectangle.fit(FitOptions.centerContent);
  }
  if(myFitFrameToContent){
  myRectangle.fit(FitOptions.frameToContent);
  }
  //Add the label, if necessary.
  if(myMakeLabels == true){
  myAddLabel(myRectangle, myLabelType, myLabelHeight, myLabelOffset, myLabelStyle, myLayerName);
  }
  }
  if (myRemoveEmptyFrames == 1){
  for (var myCounter = myDocument.rectangles.length-1; myCounter >= 0;myCounter--){
  if (myDocument.rectangles.item(myCounter).contentType == ContentType.unassigned){
  myDocument.rectangles.item(myCounter).remove();
  }
  else{
  //As soon as you encounter a rectangle with content, exit the loop.
  break;
  }
  }
  }
}
//Function that adds the label.
function myAddLabel(myFrame, myLabelType, myLabelHeight, myLabelOffset, myLabelStyleName, myLayerName){
  var myDocument = app.documents.item(0);
  var myLabel;
  var myLabelStyle = myDocument.paragraphStyles.item(myLabelStyleName);
  var myLabelLayer = myDocument.layers.item(myLayerName);
  var myLink =myFrame.graphics.item(0).itemLink;
  //Label type defines the text that goes in the label.
  switch(myLabelType){
  //File name
  case 0:
  myLabel = myLink.name;
  break;
  //File path
  case 1:
  myLabel = myLink.filePath;
  break;
  //XMP description
  case 2:
  try{
  myLabel = myLink.linkXmp.description;
  if(myLabel.replace(/^\s*$/gi, "")==""){
  throw myError;
  }
  }
  catch(myError){
  myLabel = "No description available.";
  }
  break;
  //XMP author
  case 3:
  try{
  myLabel = myLink.linkXmp.author
  if(myLabel.replace(/^\s*$/gi, "")==""){
  throw myError;
  }
  }
  catch(myError){
  myLabel = "No author available.";
  }
  break;
  }
  var myX1 = myFrame.geometricBounds[1];
  var myY1 = myFrame.geometricBounds[2] + myLabelOffset;
  var myX2 = myFrame.geometricBounds[3];
  var myY2 = myY1 + myLabelHeight;
  var myTextFrame = myFrame.parent.textFrames.add(myLabelLayer, undefined, undefined,{geometricBounds:[myY1, myX1, myY2, myX2], contents:myLabel});
  myTextFrame.textFramePreferences.firstBaselineOffset = FirstBaseline.leadingOffset;
  myTextFrame.parentStory.texts.item(0).appliedParagraphStyle = myLabelStyle;
}

Tags: InDesign

Similar Questions

  • How can I check the color profile for the current document?

    I would like to create a script that checks the color profile of the current document and it compares a string, for example "sRGB IEC61966 - 2.1. My studio is a script that performs various functions to make sure that all the layers are visible/unlocked, check the Eparses points, etc., and we want to add a control to the color profile because we support a large number of files and this setting is overlooked a lot.

    It's alright if this value is not writable by the script (we can just pop up an alert informing the user that they need to change it), but I can't find where to read this setting! We are currently working on Macs, with JavaScript, but no helping hand in the right direction would be great.

    Thank you!

    He appears only in the PDF and HAVE options record and only as a Boolean value true or false. It doesn't seem to be available to scripts.

  • Script for the current date

    I have a javascript document that worked. It prints the current date to the first opening the PDF file in a field called today. Subsequently, the date does not change no matter how many times the PDF file is opened.

    var f = this.getField ("Today");
    If (f.value == ' ') f.value = util.printd ("mm/dd/yyyy", new Date());

    I'm using Acrobat 9 Pro and for some reason this script no longer works in version 9. If someone can help fix this sript, I would be very happy.

    It works fine for me in Acrobat 9.2.0 (under Windows 7). If the field is empty when the form opens, it inserts the current date. If the field is not empty, it does nothing.

    You are absolutely sure that the field 'Today' is empty when you open the PDF file?

  • Get the error not defined for the current document in the script

    I get a "error number: 2" "error string: myDoc is not defined" in my script.

    I modified a few scripts so that they cross my entire book and open each section (document) in my book, and run the code for each section.ext

    The code runs great and opens and closes the sections where it does not add links to text, but once, it opens a document and view text that you CAN add links, it generates this error.  Here is my code:

    main();
    exit();
    
    function main() {
        var myBook = app.activeBook,
                myDocs = myBook.bookContents.everyItem().getElements(),
                myDoc,
                myHyperlinkStyle,
                myCount = 0;
    
        for (var i=0; i< myDocs.length; i++) {
            myDoc = app.open(File("\\\\computerOnNetwork\\c$\\Folder\\" + myDocs[i].name));
            myHyperlinkStyle = myDoc.characterStyles.item("linkstyle");
    
            try {
                var script = app.activeScript;
            } catch(err) {
                var script = File(err.fileName);
            }
            var myScriptFolderPath = script.path;
            var myFindChangeFile = new File(myScriptFolderPath + "/SearchTextAndUrls.txt"); //mac path for users desktop //File.openDialog("Choose the file containing the tab separated list"); 
            //alert(myFindChangeFile)
            myFindChangeFile = File(myFindChangeFile);
            var myResult = myFindChangeFile.open("r", undefined, undefined);
            if(myResult == true){
                app.findTextPreferences = NothingEnum.nothing;
                app.changeTextPreferences = NothingEnum.nothing;
                //Loop through the find/change operations.
                do {
                    //read 1 line into myLine
                    myLine = myFindChangeFile.readln();
                    myFindChangeArray = myLine.split("\t");
    
                    //The first field in the line is the value to find 
                    myFindVal = myFindChangeArray[0];
    
                    // second is the url
                    myFindUrl = myFindChangeArray[1];
    
                    doSearchAndReplace(myFindVal, myFindUrl, app.activeDocument);
    
                } while(myFindChangeFile.eof == false);
                    myFindChangeFile.close();
                    // reset search
                    app.findTextPreferences = NothingEnum.nothing;
                    app.changeTextPreferences = NothingEnum.nothing;
            }
            alert("Done! " + myCount + " hyperlinks have been added.");
    
            myDoc.close();
        }
    }
    
    function doSearchAndReplace(stringfind, urlstring, searchin) {
        app.findTextPreferences.findWhat = stringfind;
    
        //Set the find options.
        app.findChangeTextOptions.caseSensitive = false;
        app.findChangeTextOptions.includeFootnotes = false;
        app.findChangeTextOptions.includeHiddenLayers = false;
        app.findChangeTextOptions.includeLockedLayersForFind = false;
        app.findChangeTextOptions.includeLockedStoriesForFind = false;
        app.findChangeTextOptions.includeMasterPages = false;
        app.findChangeTextOptions.wholeWord = false;
    
        var myFoundItems = searchin.findText();
    
        for (i = 0; i < myFoundItems.length; i++) {
            var myHyperlinkDestination = myMakeURLHyperlinkDestination(urlstring);
            myMakeHyperlink(myFoundItems[i], myHyperlinkDestination);
            myFoundItems[i].applyCharacterStyle(myHyperlinkStyle, false);
            myCount++
        }
    }
    
    function myMakeHyperlink(myFoundItem, myHyperlinkDestination){
        try {
            var myHyperlinkTextSource = myDoc.hyperlinkTextSources.add(myFoundItem);
            var myHyperlink = myDoc.hyperlinks.add(myHyperlinkTextSource, myHyperlinkDestination);
            myHyperlink.visible = false;
        }
        catch(myError){
        }
    }
    
    function myMakeURLHyperlinkDestination(myURL){
        //If the hyperlink destination already exists, use it;
        //if it doesn't, then create it.
        try{
            var myHyperlinkDestination = myDoc.hyperlinkURLDestinations.item(myURL);
            myHyperlinkDestination.name;
        }
        catch(myError){
            myHyperlinkDestination = myDoc.hyperlinkURLDestinations.add(myURL);
        }
        myHyperlinkDestination.name = myURL;
    
        //Set other hyperlink properties here, if necessary.
        return myHyperlinkDestination;
    }
    

    Any help is greatly appreciated!

    That ends up being my fixed/final code:

    main();
    exit();
    
    function main() {
        var myBook = app.activeBook,
                myDocs = myBook.bookContents.everyItem().getElements(),
                myDoc,
                myHyperlinkStyle;
    
        for (var i=0; i< myDocs.length; i++) {
            myDoc = app.open(File("\\\\computerOnNetwork\\c$\\Folder\\" + myDocs[i].name));
            myHyperlinkStyle = myDoc.characterStyles.item("linkstyle");
    
            try {
                var script = app.activeScript;
            } catch(err) {
                var script = File(err.fileName);
            }
            var myScriptFolderPath = script.path;
            var myFindChangeFile = new File(myScriptFolderPath + "/SearchTextAndUrls.txt"); //mac path for users desktop //File.openDialog("Choose the file containing the tab separated list");
            //alert(myFindChangeFile)
            myFindChangeFile = File(myFindChangeFile);
            var myResult = myFindChangeFile.open("r", undefined, undefined);
            if(myResult == true){
                app.findTextPreferences = NothingEnum.nothing;
                app.changeTextPreferences = NothingEnum.nothing;
                //Loop through the find/change operations.
                do {
                    //read 1 line into myLine
                    myLine = myFindChangeFile.readln();
                    myFindChangeArray = myLine.split("\t");
    
                    //The first field in the line is the value to find
                    myFindVal = myFindChangeArray[0];
    
                    // second is the url
                    myFindUrl = myFindChangeArray[1];
    
                    doSearchAndReplace(myFindVal, myFindUrl, app.activeDocument, myDoc, myHyperlinkStyle);
    
                } while(myFindChangeFile.eof == false);
                    myFindChangeFile.close();
                    // reset search
                    app.findTextPreferences = NothingEnum.nothing;
                    app.changeTextPreferences = NothingEnum.nothing;
            }
            alert("Done! Hyperlinks have been added.");
    
            myDoc.close();
        }
    }
    
    function doSearchAndReplace(stringfind, urlstring, searchin, myDoc, myHyperlinkStyle) {
        app.findTextPreferences.findWhat = stringfind;
    
        //Set the find options.
        app.findChangeTextOptions.caseSensitive = false;
        app.findChangeTextOptions.includeFootnotes = false;
        app.findChangeTextOptions.includeHiddenLayers = false;
        app.findChangeTextOptions.includeLockedLayersForFind = false;
        app.findChangeTextOptions.includeLockedStoriesForFind = false;
        app.findChangeTextOptions.includeMasterPages = false;
        app.findChangeTextOptions.wholeWord = false;
    
        var myFoundItems = searchin.findText();
    
        for (i = 0; i < myFoundItems.length; i++) {
            var myHyperlinkDestination = myMakeURLHyperlinkDestination(urlstring, myDoc);
            myMakeHyperlink(myFoundItems[i], myHyperlinkDestination, myDoc);
            myFoundItems[i].applyCharacterStyle(myHyperlinkStyle, false);
        }
    }
    
    function myMakeHyperlink(myFoundItem, myHyperlinkDestination, myDoc){
        try {
            var myHyperlinkTextSource = myDoc.hyperlinkTextSources.add(myFoundItem);
            var myHyperlink = myDoc.hyperlinks.add(myHyperlinkTextSource, myHyperlinkDestination);
            myHyperlink.visible = false;
        }
        catch(myError){
        }
    }
    
    function myMakeURLHyperlinkDestination(myURL, myDoc){
        //If the hyperlink destination already exists, use it;
        //if it doesn't, then create it.
        try{
            var myHyperlinkDestination = myDoc.hyperlinkURLDestinations.item(myURL);
            myHyperlinkDestination.name;
        }
        catch(myError){
            myHyperlinkDestination = myDoc.hyperlinkURLDestinations.add(myURL);
        }
        myHyperlinkDestination.name = myURL;
    
        //Set other hyperlink properties here, if necessary.
        return myHyperlinkDestination;
    }
    
  • where the requirements for the current download? This used to be posted prominently.

    where the requirements for the current download? This used to be posted prominently.

    See:

    You can find the full version of the latest version of Firefox 24.0 in all languages and for all systems operating here:

  • How can I put pictures outside the window of Photoshop elements 14 work, so that I'm not obliged to work within the program window, but use my screen completely for the image?

    How can I put pictures outside the window of Photoshop elements 14 work, so that I'm not obliged to work within the program window, but use my screen completely for the image?

    dannyb76251437 wrote:

    How can I put pictures outside the window of Photoshop elements 14 work, so that I'm not obliged to work within the program window, but use my screen completely for the image?

    Note that you can work with two screens and drag and drop the image to display on the other window.

    I think you mean working temporarily with the window enlarged image without displaying all the tools and panels.

    See:

    Panels and bins in Photoshop Elements

    My advice: take the time to read the above help and especially to look at ways to maximize this window if you are on Mac or Win.

    Set your preferences in the Edit menu to "allow the floating windows in expert mode.

    Use the "tab" on the keyboard key to hide or show your panels and tools quickly.

    Find out how to hide the photo tray.

  • Is this really the case with the free player, the clients can access is no longer a PDF to add comments and mark out? We have always used a PDF file for the reviews of books/documents, but now we hear customers that there is no way to add comments and ann

    Is this really the case with the free player, the clients can access is no longer a PDF to add comments and mark out? We have always used a PDF file for the reviews of books/documents, but now we hear customers that there is no way to add comments and annotation. Please let me know if this is the case, or if there is a solution

    '' If '' they use the free software Adobe Reader and "If" there is no security prevent this, he should be able to add comments.

    It'll be hard to say what's wrong without more details such as what exact version of the reader they use, they open the pdf file in a browser or in the player itself and what exactly happens when they try to add comments.

  • How should be written the script for the use of the maximum memory of the guest operating system ever?

    How should be written the script for the use of the maximum memory of the guest operating system ever?

    Please teach the name of the object and the type and order, etc.

    You should be able to do it with the cmdlet Get-Stat .

    Something like that

    Get-Stat -Entity (Get-VM $vmName) -Stat mem.usage.maximum -Start (Get-Date).AddDays(-7) | Measure-Object -Property value -Maximum | Select Maximum
    

    This will return the maximum percentage in the last 7 days for the guests, whose name is stored in the variable $vmName.

    ____________

    Blog: LucD notes

    Twitter: lucd22

  • use: app_user to produce the line for the currently logged in user

    I know that it is extremely simple, but I worked on it for about 2 hours now and can't make it work.

    I have a USER table that contains information about the users allowed to use the database. Information such as username (login), pk_id (primary key), name, phone etc is there. I use a schema authorization I created using the advanced tutorial. What I want to do is to have a tab named MYDATA, only when the user clicks on one it will produce an update row with this specific user information so that they can be updated.

    I created a form on a table, then created an item called P36_X_getpkid in the region. The source of this element gets the PK_ID (primary key of the table USERS) using this sql
    Select PK_ID
    USERS
    where upper (userid) = upper(:APP_USER);

    Then I try to tell the page fetch line rendering process automated to use this field as the element that contains the value of the key column and the primary key column PK_ID column.

    It did not work.

    I thought that maybe the extraction of automated lines disliked the calculated item, so I created another page 35 has only a single element, P35_X_getpkid, with the source
    Select PK_ID
    USERS
    where upper (userid) = upper(:APP_USER);

    and I created one before process header which redirects to page 36, and assigns P35_X_getpkid to P36_X_getpkid. Page 36, then has a form on a table with treatment extraction automated line and I told him to use the P36_X_getpkid field as the element that contains the value of the key column and the primary key column PK_ID column.

    did not work.

    Thanks for any help.

    Marco

    Hi Marco,.

    On your page that needs the ID, create a new calculation with the following parameters:

    Geographical area: item on this page
    Calculate the point: P36_X_getpkid
    Calculation Point: Before header
    Calculation type: SQL query
    Calculation:

    Select PK_ID
    USERS
    where upper (userid) = upper (v ('APP_USER'))

    Condition Type: Article 1 of the Expression value is NULL
    Expression 1: P36_X_getpkid

    Leave all other settings as default values

    That should do it. In general, for something like this (that is to say, a value for the current user can be used several times) I create a part of the application and perform a calculation "on new Instance" (this is done through shared components, calculations of the Application), and then use * & APP_ITEM_NAME.* everywhere where I want the value to appear (including in the settings of the branch or the links on a page)

    Andy

  • Script of the current paragraph style

    Can someone tell me what is the code to return the paragraph style for the current position of the cursor.

    Also I can I ask something to the current paragraph is not using paragraph styles.

    For example, what would be the code to "make the current text of paragraph Red.

    Help would be much appreciated as we see questions that I'm a complete Newbie in scripting.

    if (app.documents.length > 0 && app.selection.length === 1 && app.selection[0].hasOwnProperty("baseline")) {
         // return the paragraph style for the current cursor position
         alert("Paragraph style: " + app.selection[0].appliedParagraphStyle.name);
         // Make current paragraph text Red (the 1st paragraph in the selection)
         app.selection[0].paragraphs[0].fillColor = "C=15 M=100 Y=100 K=0";
    }
    
  • APP-COMPENSATION-07092: this action is not valid for the current record.

    Cannot access panel assignments used to updates within oracle HR receive this error message. How to solve this problem.

    Please see these documents.

    APP-COMPENSATION-07092 this action is not valid for the current record by trying to access assignment [813815.1 ID]
    PERWSHRG APP-COMPENSATION-07092 when you navigate to assignments [796523.1 ID] screen
    PERWSHRG APP-COMPENSATION-07092 trying to access assignment [ID 1434212.1]
    PERWSEAC cannot enter costs for the Contingent Workers APP-PAY-07092 [1458000.1 ID]
    App-pay - 07092:Action not valid for registration: current salary for the potential asset Asg [ID 360168.1]
    Method of payment when opening errors: APP-COMPENSATION-07092: this process is not valid for the current record. [ID 289691.1

    Thank you
    Hussein

  • Script for the conversion of the hyperlinks to the buttons?

    Hello!

    Does anyone know if West a script for the conversion of the hyperlinks to buttons with the action of going to the URL with the same URL, which has been used with hyperlink?

    Here it is:

    /* Copyright 2012, Kasyan Servetsky
    November 29, 2012
    Written by Kasyan Servetsky
    http://www.kasyan.ho.com.ua
    e-mail: [email protected] */
    //======================================================================================
    var scriptName = "Convert hyperlinks to buttons - 1.0";
    
    Main();
    
    //===================================== FUNCTIONS  ======================================
    function Main() {
        var hyperlink, source, sourceText, destination, page, arr, outlinedText, gb, button, behavior,
        barodeCount = 0,
        hypCount = 0;
        if (app.documents.length == 0) ErrorExit("Please open a document and try again.", true);
        var startTime = new Date();
    
        var doc = app.activeDocument;
        var layer = doc.layers.item("Buttons");
        var swatch = doc.swatches.item("RGB Yellow");
        var hyperlinks = doc.hyperlinks;
    
        var progressWin = new Window ("window", scriptName);
        progressBar = progressWin.add ("progressbar", undefined, 0, undefined);
        progressBar.preferredSize.width = 450;
        progressTxt = progressWin.add("statictext", undefined,  "Starting processing hyperlinks");
        progressTxt.preferredSize.width = 400;
        progressTxt.preferredSize.height = 30;
        progressTxt.alignment = "left";
        progressBar.maxvalue = hyperlinks.length;
        progressWin.show();
    
        for (var i = hyperlinks.length-1; i >= 0; i--) {
            hyperlink = hyperlinks[i];
            source = hyperlink.source;
            sourceText = source.sourceText;
            destination = hyperlink.destination;
            page = sourceText.parentTextFrames[0].parentPage;
    
            barodeCount++;
            progressBar.value = barodeCount;
            progressTxt.text = "Processing hyperlink " + hyperlink.name + " (Page - " + page.name + ")";
    
            arr = sourceText.createOutlines(false);
            outlinedText = arr[0];
            gb = outlinedText.geometricBounds;
            outlinedText.remove();
    
            button = page.buttons.add(layer, {geometricBounds: gb, name: hyperlink.name});
            button.fillColor = swatch;
            button.fillTint = 50;
            button.groups[0].transparencySettings.blendingSettings.blendMode = BlendMode.MULTIPLY;
            behavior = button.gotoURLBehaviors.add();
            behavior.url = destination.destinationURL;
    
            hyperlink.remove();
            source.remove();
    
            hypCount++;
        }
    
        var endTime = new Date();
        var duration = GetDuration(startTime, endTime);
        progressWin.close();
    
        alert("Finished. " + hypCount + " hyperlinks were convertted to buttons.\n(time elapsed: " + duration + ")", scriptName);
    
    }
    //--------------------------------------------------------------------------------------------------------------------------------------------------------
    function GetDuration(startTime, endTime) {
        var str;
        var duration = (endTime - startTime)/1000;
        duration = Math.round(duration);
        if (duration >= 60) {
            var minutes = Math.floor(duration/60);
            var seconds = duration - (minutes * 60);
            str = minutes + ((minutes != 1) ? " minutes, " :  " minute, ") + seconds + ((seconds != 1) ? " seconds" : " second");
            if (minutes >= 60) {
                var hours = Math.floor(minutes/60);
                minutes = minutes - (hours * 60);
                str = hours + ((hours != 1) ? " hours, " : " hour, ") + minutes + ((minutes != 1) ? " minutes, " :  " minute, ") + seconds + ((seconds != 1) ? " seconds" : " second");
            }
        }
        else {
            str = duration + ((duration != 1) ? " seconds" : " second");
        }
    
        return str;
    }
    //--------------------------------------------------------------------------------------------------------------------------------------------------------
    function ErrorExit(error, icon) {
        alert(error, scriptName, icon);
        exit();
    }
    
  • image processor script and the parameter interpolation image (cs3)

    Hi all

    I am using Bridge and Photoshop CS3 (mac) allows to process batches of photos. I discovered the 'Processor of Image' script does take into account the "image interpolation" setting of my general preferences in Photoshop.

    It's very painful, because I can't use 'Of Image Processor' longer, because it produces soft images, where I need sharp ones (my fault for "interpolation of the image" is "Bicubic Sharper".)

    No idea/solution workaround?

    Thank you

    Patrick

    Image processor using Image Fit to do the resizing. That you don't like to use Image adjustment BICUBIC method you can editing this script. Change line 143 of

    app.activeDocument.resizeImage(newWidth, newHeight, resolution, ResampleMethod.BICUBIC);
    

    TO

    app.activeDocument.resizeImage(newWidth, newHeight, resolution, ResampleMethod.BICUBICSHARPER);
    
  • Reload the current document?

    Running DW8, generate an insertObject() extension; 2 problems that appear to load the current document.

    Problem 1:
    DW keeps the current document as he was instructed, even after make a change to it and record; I have to reload the document (manually) so he could be treated appropriately with extension.

    Here's what happens:
    I have a JavaScript function that reads content of the meta tag in the active document. Between function calls, I change the content of the meta tag and save the file. Done DW always refers to the old content.

    Problem 2:
    The insertObject() function does not run if the document has no recorded or saved my changes.

    Here's what happens:
    My insertObject() function inserts a line of text in the active document. It will run first on the document, when the document has not been changed. Subsequently, it will fail, even if the changes have been saved.

    I tried calling dw.releaseDocument (dom); at the end of each function explicitly, nothing helps.

    When I run the code example for the reference of the Dreamweaver extension, it works as expected.

    Any ideas?

    If you change the metatag in codeview and don't click Design mode before you hit your extension, then the DOM, you get from DW.getDocumentDOM () is out of sync with the code view. We don't automatically sync it because some items insert can dump just a string mode code (or they can use dom.source which is updated). In this case, I think you just need to add:
    dom.synchronizeDocument ();

    Also, I saw in our code that we do not have a releaseDocument so you call were not bad no matter what, but they were not done probably not much either. You should call if you get a lot of french overseas departments and you want to give us a chance to free them, but we do on idle when even if you do not have to worry.

    Hope that helps,
    Chris
    Adobe Dreamweaver engineering

  • How can I delete a file on my iOS device that I downloaded from my iCloud? I just want to keep the Preview on my iOS device without using my storage iOS for the entire file.

    How can I delete a file on my iOS device that I downloaded from my iCloud? I just want to keep the Preview on my iOS device without using my storage iOS for the entire file. This means that the file is still in the iCloud and available to be downloaded to any device.

    In practice, I want to be able to scan and download through my documents located in my iCloud and once I didn't need them on my iOS device I would like 'load their return to the cloud' to my storage of the iOS device is not used.

    Thank you in advance to the community!

    Max

    The only way I found to do that once a file has been downloaded is to remove it and add it again through either from Finder on Mac or iCloud.com.

Maybe you are looking for

  • External ultra wide screen not working not not on MBP 15

    Hello - Ok, I spent a ridiculous amount of time on it so I hope that someone has had this problem before. We have a few that ultrawide poster here and each one has a resolution of 2560 x 1080. We also have a couple 13 '' Macbook pro 15. They do not s

  • Re: Satellite A200 1 M 5 blue screen & gel

    I have an older A200 10 months under Vista Home Premium that came preinstalled on purchase.Since the beginning, but more regularly now, it freezes in any program several times a day and is now crashing with the blue screen to come before the dumping

  • Satellite Pro L300 was gel

    Hello I bought two of them for my daughters for Christmas, we've been in for repair due to the connection of the charger battery being broken he was absent for more than two months, but which deals a lot now. Today, my other computer laptop girls was

  • HP Pavilion - 15-au116tx: HP Pavilion - 15-au116tx

    Hello I am interested in buying the above laptop. However, I have a question about future scalability related to the RAM. I have searched all over the net about the number of DIMM slots to upgrade RAM but of no use. Anoyone can you please provide me

  • Continues to KB973688 & KB95440 (XML Core service 4.0) updated

    Yellow Watch updated icon "KB973688 & KB95440 (XML Core service 4.0) are ready for installation. When this task is complete and the message says the installation is complete, the icon disappears. After about 3-5 minutes the icon appears again with th