ExtendToolscript opens when I call the script from photoshop

Hey,.

I asked this question on in general discussions by mistake if I though I would ask new here.

I have a Javascript that I wrote which generates an interface of buttons in groups organized according to the contents of some folders. Everything works fine, but when you call it from photoshop and extendtoolscript it is not always executed it opens. I wrote many scripts with interfaces and I've never had this problem. This isn't a huge problem for me, as I usually have this program open anyway, but I intend to have a team of people using this script, so if I could stop, somehow, it would be much better.

If anyone has experienced this before? Or maybe functions extendscript causes to open?

I don't see anything unusual in the script...

Any help would be appreciated!

Thank you

Mark

var strtRulerUnits = app.preferences.rulerUnits;
var strtTypeUnits = app.preferences.typeUnits;
app.preferences.rulerUnits = Units.PIXELS;
app.preferences.typeUnits = TypeUnits.PIXELS;




var templatepath = "~/Desktop/BANNERS/";


var bannerfile = ""
var docRef = app.activeDocument;




var fileArray = new Array();


                var sourceFolder = Folder (templatepath + "MAIN/");


                var extRE = /\.(?:png|gif|jpg|bmp|tif|psd)$/i;
                
                // get all files in source folder
                var docs = sourceFolder.getFiles();
                var len = docs.length;
                for (var i = 0; i < len; i++) {
                                var doc = docs[i];


                                // only match files (not folders)
                                if (doc instanceof File) {
                                                // store all recognized files into an array
                                                var docName = doc.name;
                                                if (docName.match(extRE)) {
                                                                fileArray.push(doc);
                                                }
                                }
                }
            
            
            var w = new Window ("dialog", "Choose a Banner");
            w.preferredSize = [400, 100];
            w.orientation = 'row';
            w.alignChildren = "left"
            w.alignChildren = [ "fill", "fill"];
            
            w.btnPnl = w.add('panel', undefined, 'MAIN');
            
            w.btnPnl.btn = w.add ("group");
            w.btnPnl.btn.alignChildren = "left"
            
            var buttonarray = new Array ();
            var key = {};
            
            
            
            for (var i = 0; i < fileArray.length ; i++) {
                
                var delimeter = '/';
                var string = String (fileArray[i]);
                var splitted = string.split(delimeter);
                var thelength = ((splitted.length) - 1);
                var bannername = splitted[thelength];
                var delimeter = '.';
                var splitted = bannername.split(delimeter);
                var bannername = splitted[0];
                
                
                var checkdelim = "%20";
                var checkthat =  bannername.indexOf(checkdelim);
                if (checkthat == "-1") {}
                else {
                    
                var delimeter = '%20';
                var splitted = bannername.split(delimeter);
                var counter = 0;
                while (counter < splitted.length){
                
                if (counter == 0){
                var bannername = (splitted[counter] + " ");    
                }
                else if (counter == ((splitted.length) - 1)){
                var bannername = (bannername + splitted[counter]);
                }
                else{
                var bannername = (bannername + splitted[counter] + " ");
                }
                var counter = (counter + 1);
                }
            
                }
            if (fileArray.length > 6){
                    var divider = 2
                    }
                else{
                    var divider = 1
                    }
                
                var remainder = (i % divider);
                if (remainder == 0){  
                w.btnPnl.btn = w.btnPnl.add ("group");
                w.btnPnl.btn.alignChildren = "left"
                } else {
                //x is not a multiple of y
                }
                
                key = (String (fileArray[i]));
                w[key] = w.btnPnl.btn.add("button", undefined ,bannername ); 
                w[key].alignment = 'left';
                buttonarray.push(w[key]);
                
                w.btnPnl.btn.addEventListener('click', button_pressed);
                
                function button_pressed (e)
                {
               if (e.target.type == "button")
                $.writeln (e.target.text + " from panel " + e.target.parent.text);
                w.close()
                ////////////////////
                var buttonname = e.target.text;
                var checkdelim = " ";
                var checkthat = buttonname.indexOf(checkdelim);
                if (checkthat == "-1") {}
                else {
                    
                var delimeter = ' ';
                var splitted = buttonname.split(delimeter);
                var counter = 0;
                while (counter < splitted.length){
                
                if (counter == 0){
                var buttonname = (splitted[counter] + "%20");    
                }
                else if (counter == ((splitted.length) - 1)){
                var buttonname = (buttonname + splitted[counter]);
                }
                else{
                var buttonname = (buttonname + splitted[counter] + "%20");
                }
                var counter = (counter + 1);
                }
            }
            
                ///////////////////////
                
                bannerfile = new File (templatepath + "MAIN/" + buttonname + '.png');
                
                 }
             }
         
 ///////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////
  ///////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////

var fileArrayneon = new Array();


                var sourceFolder = Folder (templatepath + "NEON/");


                var extRE = /\.(?:png|gif|jpg|bmp|tif|psd)$/i;
                
                // get all files in source folder
                var docs = sourceFolder.getFiles();
                var len = docs.length;
                for (var i = 0; i < len; i++) {
                                var doc = docs[i];


                                // only match files (not folders)
                                if (doc instanceof File) {
                                                // store all recognized files into an array
                                                var docName = doc.name;
                                                if (docName.match(extRE)) {
                                                                fileArrayneon.push(doc);
                                                }
                                }
                }
            
            
            
            
            w.btnPnl = w.add('panel', undefined, 'NEON');
            
            w.btnPnl.btn = w.add ("group");
            
            var buttonarray = new Array ();
            var key = {};
            
            
            
            for (var i = 0; i < fileArrayneon.length ; i++) {
                
                var delimeter = '/';
                var string = String (fileArrayneon[i]);
                var splitted = string.split(delimeter);
                var thelength = ((splitted.length) - 1);
                var bannername = splitted[thelength];
                var delimeter = '.';
                var splitted = bannername.split(delimeter);
                var bannername = splitted[0];
                
                
                var checkdelim = "%20";
                var checkthat =  bannername.indexOf(checkdelim);
                if (checkthat == "-1") {}
                else {
                    
                var delimeter = '%20';
                var splitted = bannername.split(delimeter);
                var counter = 0;
                while (counter < splitted.length){
                
                if (counter == 0){
                var bannername = (splitted[counter] + " ");    
                }
                else if (counter == ((splitted.length) - 1)){
                var bannername = (bannername + splitted[counter]);
                }
                else{
                var bannername = (bannername + splitted[counter] + " ");
                }
                var counter = (counter + 1);
                }
            
                }
            
            if (fileArrayneon.length > 6){
                    var divider = 2
                    }
                else{
                    var divider = 1
                    }
                
                var remainder = (i % divider);
                if (remainder == 0){  
                w.btnPnl.btn = w.btnPnl.add ("group");
                w.btnPnl.btn.alignChildren = "left"
                } else {
                //x is not a multiple of y
                }
                
                key = (String (fileArrayneon[i]));
                w[key] = w.btnPnl.btn.add("button", undefined ,bannername ); 
                w[key].alignment = 'left';
                buttonarray.push(w[key]);
                
                w.btnPnl.btn.addEventListener('click', button_pressed);
                
                function button_pressed (e)
                {
               if (e.target.type == "button")
                $.writeln (e.target.text + " from panel " + e.target.parent.text);
                w.close()
                ////////////////////
                var buttonname = e.target.text;
                var checkdelim = " ";
                var checkthat = buttonname.indexOf(checkdelim);
                if (checkthat == "-1") {}
                else {
                    
                var delimeter = ' ';
                var splitted = buttonname.split(delimeter);
                var counter = 0;
                while (counter < splitted.length){
                
                if (counter == 0){
                var buttonname = (splitted[counter] + "%20");    
                }
                else if (counter == ((splitted.length) - 1)){
                var buttonname = (buttonname + splitted[counter]);
                }
                else{
                var buttonname = (buttonname + splitted[counter] + "%20");
                }
                var counter = (counter + 1);
                }
            }
            
                ///////////////////////
                
                bannerfile = new File (templatepath + "NEON/" + buttonname + '.png');
                
                 }
             } 
  ///////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////
  ///////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////
  ///////////////////////////////////////////////////////////
var fileArray180 = new Array();


                var sourceFolder = Folder (templatepath + "180/");


                var extRE = /\.(?:png|gif|jpg|bmp|tif|psd)$/i;
                
                // get all files in source folder
                var docs = sourceFolder.getFiles();
                var len = docs.length;
                for (var i = 0; i < len; i++) {
                                var doc = docs[i];


                                // only match files (not folders)
                                if (doc instanceof File) {
                                                // store all recognized files into an array
                                                var docName = doc.name;
                                                if (docName.match(extRE)) {
                                                                fileArray180.push(doc);
                                                }
                                }
                }
            
            
            
            
            w.btnPnl = w.add('panel', undefined, '180');
            
            w.btnPnl.btn = w.add ("group");
            
            var buttonarray = new Array ();
            var key = {};
            
            
            
            for (var i = 0; i < fileArray180.length ; i++) {
                
                var delimeter = '/';
                var string = String (fileArray180[i]);
                var splitted = string.split(delimeter);
                var thelength = ((splitted.length) - 1);
                var bannername = splitted[thelength];
                var delimeter = '.';
                var splitted = bannername.split(delimeter);
                var bannername = splitted[0];
                
                
                var checkdelim = "%20";
                var checkthat =  bannername.indexOf(checkdelim);
                if (checkthat == "-1") {}
                else {
                    
                var delimeter = '%20';
                var splitted = bannername.split(delimeter);
                var counter = 0;
                while (counter < splitted.length){
                
                if (counter == 0){
                var bannername = (splitted[counter] + " ");    
                }
                else if (counter == ((splitted.length) - 1)){
                var bannername = (bannername + splitted[counter]);
                }
                else{
                var bannername = (bannername + splitted[counter] + " ");
                }
                var counter = (counter + 1);
                }
            
                }
                    
               if (fileArray180.length > 6){
                    var divider = 2
                    }
                else{
                    var divider = 1
                    }
                
                var remainder = (i % divider);
                
                
                if (remainder == 0){  
                w.btnPnl.btn = w.btnPnl.add ("group");
                w.btnPnl.btn.alignChildren = "left"
                } else {
                //x is not a multiple of y
                }
                
                key = (String (fileArray180[i]));
                w[key] = w.btnPnl.btn.add("button", undefined ,bannername ); 
                w[key].alignment = 'left';
                buttonarray.push(w[key]);
                
                w.btnPnl.btn.addEventListener('click', button_pressed);
                
                function button_pressed (e)
                {
               if (e.target.type == "button")
                $.writeln (e.target.text + " from panel " + e.target.parent.text);
                w.close()
                ////////////////////
                var buttonname = e.target.text;
                var checkdelim = " ";
                var checkthat = buttonname.indexOf(checkdelim);
                if (checkthat == "-1") {}
                else {
                    
                var delimeter = ' ';
                var splitted = buttonname.split(delimeter);
                var counter = 0;
                while (counter < splitted.length){
                
                if (counter == 0){
                var buttonname = (splitted[counter] + "%20");    
                }
                else if (counter == ((splitted.length) - 1)){
                var buttonname = (buttonname + splitted[counter]);
                }
                else{
                var buttonname = (buttonname + splitted[counter] + "%20");
                }
                var counter = (counter + 1);
                }
            }
            
                ///////////////////////
                
                bannerfile = new File (templatepath + "180/" + buttonname + '.png');
                
                 }
             }   
  



 ///////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////
  ///////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////


var fileArraymisc = new Array();


                var sourceFolder = Folder (templatepath + "MISC/");


                var extRE = /\.(?:png|gif|jpg|bmp|tif|psd)$/i;
                
                // get all files in source folder
                var docs = sourceFolder.getFiles();
                var len = docs.length;
                for (var i = 0; i < len; i++) {
                                var doc = docs[i];


                                // only match files (not folders)
                                if (doc instanceof File) {
                                                // store all recognized files into an array
                                                var docName = doc.name;
                                                if (docName.match(extRE)) {
                                                                fileArraymisc.push(doc);
                                                }
                                }
                }
            
            
            
            
            w.btnPnl = w.add('panel', undefined, 'MISC');
            
            w.btnPnl.btn = w.add ("group");
            
            var buttonarray = new Array ();
            var key = {};
            
            
            
            for (var i = 0; i < fileArraymisc.length ; i++) {
                
                var delimeter = '/';
                var string = String (fileArraymisc[i]);
                var splitted = string.split(delimeter);
                var thelength = ((splitted.length) - 1);
                var bannername = splitted[thelength];
                var delimeter = '.';
                var splitted = bannername.split(delimeter);
                var bannername = splitted[0];
                
                
                var checkdelim = "%20";
                var checkthat =  bannername.indexOf(checkdelim);
                if (checkthat == "-1") {}
                else {
                    
                var delimeter = '%20';
                var splitted = bannername.split(delimeter);
                var counter = 0;
                while (counter < splitted.length){
                
                if (counter == 0){
                var bannername = (splitted[counter] + " ");    
                }
                else if (counter == ((splitted.length) - 1)){
                var bannername = (bannername + splitted[counter]);
                }
                else{
                var bannername = (bannername + splitted[counter] + " ");
                }
                var counter = (counter + 1);
                }
            
                }
                if (fileArraymisc.length > 6){
                    var divider = 2
                    }
                else{
                    var divider = 1
                    }
                
                var remainder = (i % divider);
                if (remainder == 0){  
                w.btnPnl.btn = w.btnPnl.add ("group");
                w.btnPnl.btn.alignChildren = "left"
                } else {
                //x is not a multiple of y
                }
                
                key = (String (fileArraymisc[i]));
                w[key] = w.btnPnl.btn.add("button", undefined ,bannername ); 
                w[key].alignment = 'left';
                buttonarray.push(w[key]);
                
                w.btnPnl.btn.addEventListener('click', button_pressed);
                
                function button_pressed (e)
                {
               if (e.target.type == "button")
                $.writeln (e.target.text + " from panel " + e.target.parent.text);
                w.close()
                ////////////////////
                var buttonname = e.target.text;
                var checkdelim = " ";
                var checkthat = buttonname.indexOf(checkdelim);
                if (checkthat == "-1") {}
                else {
                    
                var delimeter = ' ';
                var splitted = buttonname.split(delimeter);
                var counter = 0;
                while (counter < splitted.length){
                
                if (counter == 0){
                var buttonname = (splitted[counter] + "%20");    
                }
                else if (counter == ((splitted.length) - 1)){
                var buttonname = (buttonname + splitted[counter]);
                }
                else{
                var buttonname = (buttonname + splitted[counter] + "%20");
                }
                var counter = (counter + 1);
                }
            }
            
                ///////////////////////
                
                bannerfile = new File (templatepath + "MISC/" + buttonname + '.png');
                
                 }
             }  





   
                 
 w.show();








  ///////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////
  ///////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////
  ///////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////

 if (bannerfile == ""){}
 else{

var targetDocumentName =  docRef.name;
var tempfile = app.open (bannerfile);
var sourceDocumentName = app.activeDocument.name;




var thewidth = tempfile.width;
var theheight  = tempfile.height;




app.activeDocument = docRef;
docRef.resizeImage (null, theheight, null, ResampleMethod.BICUBIC);


if ((String(thewidth)) == (String(docRef.width))){
var thelayer = docRef.activeLayer;
copyLayers(sourceDocumentName, targetDocumentName );
docRef.activeLayer = thelayer;
}
else {
alert ("Document width Incorrect")   


docRef.activeLayer.name = "main";
var thelayer = docRef.activeLayer;
docRef.resizeCanvas (thewidth, null, AnchorPosition.BOTTOMCENTER);
copyLayers(sourceDocumentName, targetDocumentName );
docRef.activeLayer = thelayer;
 }
  imageView ("FtOn");
 }









  ///////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////
  ///////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////
  ///////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////
  ///////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////
  ///////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////




 function copyLayers(sourceDocumentName, targetDocumentName) {
  var sourceDoc = app.documents[sourceDocumentName];
  var targetDoc = app.documents[targetDocumentName];
  var sourceLayer, targetLayer, sourceGroup;


  if (app.activeDocument != sourceDoc) {
    app.activeDocument = sourceDoc;
  }


var thelayer = tempfile.layers[0];
var layersToCopy = thelayer.name;


  if ( typeof layersToCopy === 'string' ) {
    sourceGroup = tempfile.layers[0];
    targetLayer = sourceGroup.duplicate( targetDoc, ElementPlacement.PLACEATBEGINNING )
  }
  else if ( Object.prototype.toString.call( layersToCopy ) === '[object Array]' ) {
    for (var i = 0; i < layersToCopy.length; i++) {
      sourceLayer = sourceDoc.artLayers.getByName( layersToCopy[i] );
      targetLayer = sourceLayer.duplicate( targetDoc, ElementPlacement.PLACEATBEGINNING );
    }
  } 
tempfile.close(SaveOptions.DONOTSAVECHANGES);
}






function imageView (view) {
    desc= new ActionDescriptor();
        ref = new ActionReference();
      if (view.length < 5){
         var viewID = charIDToTypeID( view );
      }else{
         var viewID = stringIDToTypeID( view );
      }
      ref.putEnumerated( charIDToTypeID( "Mn  " ), charIDToTypeID( "MnIt" ), viewID );
    desc.putReference( charIDToTypeID( "null" ), ref );
   executeAction( charIDToTypeID( "slct" ), desc, DialogModes.NO );
};

$.writeln (written) the text specified in the JavaScript Console to ExtendScript Toolkit.

You will probably need to 4 occurrences of the following line, apparently used for purposes of debugging in comment:

$.writeln (e.target.text + " from panel " + e.target.parent.text);

Tags: Photoshop

Similar Questions

  • No model output module custom when you run the script from another process

    Hello

    I have a following problem:

    Try to automate the video rendering. When I run extend script of the program that is launched at windows startup, there is no custom output module template. If the script is started manually, it works perfectly.

    Trying to applyTemplate output module in the results of item renderer error queue.

    I use AE 2014 (13.1.1.3) and windows server 2012 standard r2.

    Thanks for help.

    Sounds like a permissions problem, you will need to set your user contexts and escalate privileges before running the script.

    Mylenium

  • When I run my script from a shortcut ExtendScript is invoked, but this isn't when I run the menu

    I use Photshop CS2 on Win XP

    I set up a keyboard shortcut (Ctrl + Alt + P) to execute a .jsx file in the folder... \Presets\Scripts\.

    When I activate the script via the keyboard shortcut ExtendScript is called and interrupts execution on main() statement (see below).

    When I activate the script via the menu file/Scripts that extendscript is not called and the script runs up to the end.

    The .jsx file is a wrapper for a .vbs script that does the 'real' work

    The .jsx is:-

    main() function
    {
    var VBSscript = file ("C:/Program Files/Adobe/Adobe Photoshop CS2/Presets/Scripts/GGN_PS_Code_v1_2.vbs");
    If (VBSscript.Exists) VBSscript.execute ();
    }
    main();

    Anyone have any ideas on how to disable the invocation of ExtendScript when I run the script from the skortcut?

    One thing to check is that the .jsx extension is associated with Photoshop and not ExtendScript.

  • Choose the text file calling the Script DataMerge

    I have to write a script that calls the script DateMerge, I find how the it (using: app.activeDocument.dateMergeProperties.mergeRecords ();).

    But problem: the scipt call script DataMerge, but use it with the last text file that I use.

    I would choose as a text file when I call the script DataMerge.

    I hope you understood my question, I'm not a pro in English: S

    Tank you for your help

    It is in the same line. The location of the merger will in parentheses immediately following the mergeRecords() for example

    app.activeDocument.dateMergeProperties.mergeRecords (FILELOCATIONGOESHERE);

    It doesn't have to be a file written in full either location, it can be a variable that has been declared elsewhere for example

    var csvFile = File.openDialog('select TXT file');
    app.activeDocument.dateMergeProperties.mergeRecords(csvFile);
    

    Colin

  • How can I get the TestStand splash screen to not show up when I call the results treatment Utility offline?

    So I call the Offline processing Utility (ORPU) a not executable call results in a plugin to perform a personalised treatment in another configuration.  Everything works fine, including having run reduced (mostly hidden) by using the option/tray.  When he called, the TestStand splash screen appears (certainly is not a show-stopper but it's confusing from the point of view of the user).

    Is it possible that I can get this start screen to not appear when calling the ORPU?  I noticed in the help, mention is made of the use of the callback file, and I wonder if someone has successfully used this to avoid the dialog box or other behaviors.  I would like more info on how it works, but it doesn't seem to be a vast detail on this in the help, and I'm not also find me useful examples.

    The source of the Offline utility treatment results is included with TestStand and can be changed.

    The ORPU source is located under "Components\Models\TestStandModels\Offline utility treatment results"

    From the source, you can see that there is no flag that allows you to hide the splash screen (except for / I leave, but that it will also close the ORPU!); However, you can easily change the ORPU so it does not show the start screen by removing the following lines in \Components\Models\TestStandModels\Offline Results Processing Utility\OfflineResultsProcessingUtility\MainForm.cs

    If (! data.) Quit smoking)
    splashScreenForm = new SplashScreen (mEngine, false);

    Regarding the flags without papers, there are not really many flags undocumented in the ORPU (even once, you can see them in the source), and undocumented flags have very specific use cases (open files from shell and NEITHER internal regression tests).

    A (non-official) complete list of indicators ORPU from 2014 TS:

    /?
    Shows help

    / tray
    Starts the ORPU in the status bar

    / exit-when-done
    Exits when all files are made

    / I'm leaving
    Leave immediately

    /process - files - Missing - Data
    Treats the files even if they lack of data

    / which-process-files-Missing-Data
    Do not process files that are missing data, show only a mistake (it is the default behavior).

    / Process-All-Profiles
    Start all profiles

    / Process-No.-Profiles
    Don't start any profile

    / Process-Profiles
    Treat the profiles specified in the following arguments

    / process-files
    Add the files specified for the specified profile

    / log - level

    Sets the logging level for the newspaper ORPU, all of the messages above, the specified log level is saved.

    /ShellOpen
    It is an internal indicator, it is used to treat applications for the shell (for example, after a double click on a tsr in Windows Explorer). Do not use this indicator.

    / non-interactive
    It is an internal indicator used for the test. Do not use this indicator.

    Please note that NEITHER does not support appellant flags undocumented and that NEITHER is not guaranteeing backward compatibility of these flags undocumented and they could change at any time, without warning.

    For a more detailed explanation of the working of each option, refer to the Arguments of the command line Utility using TestStand treatment results offline.

    Hope this helps,

    Francisco

  • Call Shell Script from within PL/SQL - using DBMS_PIPE

    Hi all

    I'm trying to run a shell script inside my PL/SQL using DBMS_PIPE block (not sure if this is the right way or not)

    Pl Sql script

    ==========

    Set serveroutput size 100000

    declare

    cursor c1 is select * from mag_images

    where nom_image like '% comp2.

    v_path varchar2 (100): = ' / home/maguzzi/DOCUMENTS_DIR / ";

    v_result number: = 0;

    v_in_filename varchar2 (100): = v_path | ' test_file.jpg';

    v_out_filename varchar2 (100): = v_path | ' test_file_out.jpg';

    v_script varchar2 (100): = "tst_convert.sh";

    v_command varchar2 (200): = 'sh'. v_path | v_script | » '|| v_in_filename | » '|| v_out_filename;

    Start

    A1 to c1 loop

    dbms_output.put_line ('v_command: ' | v_command);

    write_to_file ('test_file.jpg', 'DOCUMENTS_DIR', a1. Content);

    dbms_output.put_line (' file write result: ' | v_result);

    v_result: = exec_host_command (v_command);

    dbms_output.put_line (' resize result :'|| file v_result);

    end loop;

    end;

    Result DBMS_OUTPUT

    ====================

    v_command: /home/maguzzi/DOCUMENTS_DIR/tst_convert.sh test_file.jpg test_file_out.jpg

    Result of the entry of the file: 0

    Result of resizing the file: 0

    PL/SQL procedure successfully completed.

    Function exec_host_command

    =======================

    FUNCTION to CREATE or REPLACE exec_host_command (lc_cmd IN VARCHAR2)

    RETURN INTEGER IS

    ln_status NUMBER;

    lc_errormsg VARCHAR2 (80);

    lc_pipe_name VARCHAR2 (30);

    BEGIN

    lc_pipe_name: = 'Maguzzi_PIPE ';

    DBMS_PIPE. PACK_MESSAGE (lc_cmd);

    ln_status: = dbms_pipe.send_message (lc_pipe_name);

    RETURN ln_status;

    END;

    /

    The Image of the BLOB is written to the correct location on the server "test_file.jpg", and although the exec_host_command function returns a value of 0, the shell script (tst_convert.sh) is not executed (i.e. no output file is created - outfile.txt and the image is not copied/converted to a new file name "" test_file_out.jpg" )

    Shell script

    ========

    tst_convert.sh

    echo 'Here' > outfile.txt

    Echo $1 > > outfile.txt

    Echo $2 > > outfile.txt

    resizing to convert $1 - $200 2

    Could this be problems with permissions on files?

    test_file1.jpg has permission - rw-rw-r-

    test_convert.sh a permission rwxrwxrwx

    When I run the script manually and pass in 2 parameters ($1 = infilename and $2 = outfilename), it works...

    I'd appreciate if someone can point out my mistake or suggest another method that works.

    Thanks in advance

    How long does it take to create the converted file? Remember that the external Scheduler is running asynchronously, so it is possible that the converted file does not exist yet when the PL/SQL block subsequently tries to open it.

    Try to add some delay seconds to the routine to ensure that the external task is completed:

        begin
          dbms_scheduler.create_job(
              job_name => 'MAG_IMAGE_CONVERT2'
            , job_type => 'EXECUTABLE'
            , job_action => '/home/oracle/DOCUMENTS_DIR/tst_convert2.sh' );--  '/home/oracle/DOCUMENTS_DIR/tst_convert.sh');
          dbms_scheduler.enable('MAG_IMAGE_CONVERT2');
          dbms_lock.sleep(3);
        end;
    

    This probably isn't really a viable solution in the long term if it turns out that this is really the problem.

  • SpeedGrade CC14 does not open when you use the "Direct Link to Adobe SpeedGrade... "of PremierePro CC14.

    SpeedGrade CC14 does not open when you use the "Direct Link to Adobe SpeedGrade... "of PremierePro CC14.

    I can open the SG of start menu/desktop computer and I can open the PP project in SG very well. The PP project contains 3 deadlines and I take one I want without any problem. Returning to the SG PP works fine as well. It seems only thing doesn't work does not automatically open the PP file and selecting the correct timeline in the Official Journal of the project.

    I had a glance at the "C:\Users\john Bishop images\AppData\Roaming\Adobe\SpeedGrade\8.0\logs\SpeedGrade.log ' but it is not updated when I try to use the link Direct from PP. command It updated when I invoke the start menu/desktop computer SG. Note that none of the other newspaper, the files are updated either (Plugin Loading.log, Database.txt Trace and Debug Database.txt). All these get updated when I run the desktop/start. It would appear that SG is not yet known.

    I uninstalled the SG and the PP and re-installed (all in the directories by default) and everything seemed to go OK but no change.

    I also added 2 political profile the NVIDIA Control Panel, just display a message when loading SpeedGrade.exe and another for a slightly different message when loading SpeedGradeCmd.exe. SG invoking the desktop/start causes the SpeedGrade.exe message to display. Using the 'Direct link' PP file option does not display anything, reinforcing my thought that SG is just never called from PP.

    SP1 Windows 7 Professional 64 bit

    12 GB OF RAM

    2-Intel Xeon E5640 (16 sons) processors

    NVIDIA GeForce GTX580 1536 MB memory graphics

    PS... I used the Adobe cleaning tool noted elsewhere and tried NVIDIA workarounds as well - all to nothing does not.

    Problem solved!

    My Antivirus software was in the way. Once I have updated, things work fine.

    Thanks for your help!

  • Why Firefox page opens when I run the application it even when I have a selected homepage

    I recently selected latest version of Firefox and vere from the overview page opens as well as my home page. I want to just my home page to open when I launch the browser.

    OK, so it seems that there are two things that can happen here:

    • "See what's new" is now defined (as well as your regular home page) as your home page. You can re - choose your homepage simply only one page of the home button sliding. The details are in How to set the home page.
    • If you tried the solution above and it does not work, it may be that Firefox isn't able to save this preference for some reason any. In this case, reset Firefox will fix this. Instructions to reset are here - Refresh Firefox – reset settings and Add-ons. After resetting Firefox, you get to choose your homepage again.
  • When I sync the audio from my player is not in the order in which I added it to the library

    Windows media player

    I have a Coby mp3 player and when I sync the audio from my player is not in the order in which I added it to the library. I'm doing something wrong? How can I get the audio files to read them in the order? When I ripped the cd they show in a random order on the media player screen.

    Hi LynneGoetz,

    ·         What version of the operating system is installed on the computer?

    ·         Did you do changes on the computer before the show?

    Follow these methods.

    Method 1: Run the hardware and devices troubleshooter.

    Open the troubleshooting Windows Media Player settings Troubleshooter

    http://Windows.Microsoft.com/en-us/Windows7/open-the-Windows-Media-Player-settings-Troubleshooter

    Open the troubleshooter in the Windows Media Player library

    http://Windows.Microsoft.com/en-us/Windows7/open-the-Windows-Media-Player-library-Troubleshooter

    Method 2: Follow the steps in the article.

    Set up a device to sync in Windows Media Player

    http://Windows.Microsoft.com/en-us/Windows7/set-up-a-device-to-sync-in-Windows-Media-Player

    For reference:

    Windows Media Player sync: frequently asked questions

    http://Windows.Microsoft.com/en-us/Windows7/Windows-Media-Player-sync-frequently-asked-questions

  • Photoshop CS 6 crashes when I call the print command.

    Photoshop CS6 crashes when I call the print command.  I have reset the default preferences.  I don't know if it's a computer problem or Photoshop.  Photoshop works in every other sense.  I can print from Lightroom.

    Try holding SHIFT keys when you start Photoshop. Try to hold the space bar when you click on print. What is information on your system?

    Benjamin

  • The file size of Photos library don't to shrink when I remove the images from the library

    Subject line pretty much sums up it.  Let's say I have create a library of Photos and import of 100 photos. The file "Library.photoslibrary Photos" grows to a certain size, as expected. But if I remove some of these pictures does not take the size of the file photoslibrary. If I import images more library file grows again, but it never reduces when I delete the images from the library. This happens with both a library of referenced files and images copied to the library.

    What happens here?

    You must either wait 30 days or go to the recently deleted album and remove not for the final to do deletion

    and note that Photos doesn't manage referenced good libraries, it was reported here that they can use more space than a managed library and they are not recommended

    LN

  • iPhone 6 s is not wake up when you remove the cable from the charger.

    Hi all.

    I noticed that sometimes my iPhone didn't wake not (the lock screen display) when the charging cable is removed. the charger / sync port seem otherwise works normally.

    Is this normal?  I'm guessing that this happens because sometimes when the battery is fully charged, no power goes to the phone and if you pull the cable then, the phone can't tell you have removed the cable, but I have not seen this happen on my previous phones.

    Thank you!

    Yes, this sounds like normal behavior! On my iPhone 6, when it reached 100% of their capacity and is completely loaded, as it stops in charge, which is why when you unplug the iPhone from the charger the screen does not automatically wake up, because the charger stopped output power to the iPhone when it finished filling. I hope that answers your question!

  • My cd-writer/DVD disc tray does not open when I press the Open button. He is not blocked and has no disk in it. How can I me t to operate?

    Cd-writer/DVD disc tray does not open when you press the Open button, or when you use the buttons to control the media on the keyboard. How can I restore it to its operating state?

    Hi John,.

    Please let me know exactly what happened when you tried my suggestions of first and second.

    Of your most recent post, looks like you're watching the wrong part of the Device Manager. Optical drive is listed under "readers of CD-ROM/DVD-ROM". The info you gave appear under "drives". If the drive is not listed under "readers of CD-ROM/DVD-ROM" or there is no such section in Device Manager, then Windows do not see. If windows can't see it then this means that there is no power or that the drive is broken.

    When you pushed the drive back in, the player no longer has much of the book or did you have to push all the way. If the latter, it means that the drive has no power or is broken.

    With respect to the opening of the case, I guess I should ask first if it's a laptop or desktop?

    Tricky

  • matter of record: How do I control which folder is open when I search the file I want to download or the file I want to save a file to?

    When I use internet, how can I control what file is opened when I search the file I want to download or the file I want to save a file to?  He always seems to be the last that has been opened, but I want the default on my desk.

    Perhaps the following links provided courtesy of SpiritX MS MVP will help:

    Set the Internet Explorer default download path.
    http://www.tweaklibrary.com/Software_Applications/Internet-Explorer/27/set-default-download-path-of-Internet-Explorer/10153/

    How to change the Internet Explorer default download directory
    http://www.windowsreference.com/Internet-Explorer/how-to-change-the-default-download-directory-for-Internet-Explorer/

    I hope this helps.

    Good luck!

    Lorien - MCSA/MCSE/network + / has + - if this post solves your problem, please click the 'Mark as answer' or 'Useful' button at the top of this message. Marking a post as answer, or relatively useful, you help others find the answer more quickly.

  • When I try to print from photoshop cc I get the message "the instruction at 0xb660643f referenced memory at 0 x 00000006. the memory could not be read. I'm running on Windows using Intel (R) Graphics 4600 8.1

    When I try to print from photoshop cc I get the message "the instruction at 0xb660643f referenced memory at 0 x 00000006. the memory could not be read. I run on Windows using Intel (R) Graphics 4600 8.1. Can someone help me with this?

    Hi Tanuj,

    Thanks for your reply. The problem seems to be a damaged printer driver. I tried to print from my laptop computer rather than my PC and that worked OK. I downloaded the latest driver for the Epson 3880 but then find that the print spooler has become invalid. When I restarted the print spooler, everything worked again and I'm able to print as usual.

    Concerning

    Gordon

    Gordon Gentles

    [email protected]

Maybe you are looking for

  • Help topic not found this content under construction

    Hello I have a Pavilion PC with Windows Vista 32 bit OS.  My help and Support feature does not work in offline mode or online. I just installed the 32-bit hotfix for HP Advisor (sp43112) hoping that would resolve the problem. No luck. Any suggestions

  • Error code: 646 (cannot install KB2092914)

    Hello I need help with this error code 646 (KB2092914), it won't let me update for microsoft 9 security update? What can I do with this issue?

  • HP workstation xw6200 model number: DU937AV - a Front Panel USB HUB added

    Good afternoon   I'm back with a double question this time.   (a) my XW6200 in its current configuration offers only two frontal USB 2 ports, the other 6 being located on the rear panel. Would it not possible to add a front panel USB Hub?   (b) what

  • XPS 15 9550 game lag

    When I play games or use intensive 3D software there are always a great degradation in performance after about five to 10 minutes of using the application. I don't know if it is a software or hardware problem, the system seems to be up-to-date to the

  • HP Mini Password Reset problem

    Hello. I can't for the life of me remember the password on my netbook. Fatal error code is CNU917289S. Thanks in advance!