File Dialog and CINs

hello,
Whenever i perform a file operation in LV, it crashes my CIN. I'm
running LV 5.1.1 in Windows NT. Has anyone else ever had this problem
before? I don't understand why it would be happening... When i
debugged my CIN, the crash occurred when a function was called, after
the parameters are pushed onto the stack.
0334116D 8D 4D 94 lea ecx,[ebp-6Ch]
03341170 51 push ecx
03341171 6A 00 push 0
03341173 6A 00 push 0
03341175 68 98 30 35 03 push offset string "hep4a"
(03353098)
0334117A E8 07 02 00 00 call _HeOpen (03341386) <-crash
and it only happens to one function.. the actual error statem
ent
is "The instruction at 0xXXXXXXXX referenced memory at 0xXXXXXXXX. The
memory could not be "written"." I don't see how this applies to a call
instruction... I tested all the parts of a file i/o operation and the
file dialog seems to be the part thats causing this crash.. The
program works fine without any of the file stuff. any ideas?
Thanks,
Eugene
Sent via Deja.com http://www.deja.com/
Before you buy.

Wow, thanks for your fast and very helpful reply devchander!
I already tried this and it works fine
thx!

Similar Messages

  • File Dialog and Report Generation Toolkit

    Hi,
    I designed a VI for an electrometer calibration and it works quite well The only problem I have is the following:
    I used the Report Generation Toolkit to put the measurement data in an Excel file. When I run the VI I'd like a window to pop up to define the location and name of the Excel report file. If these two things are done LabVIEW should create the specified Excel file and run the rest of the code.
    So i tried this with the "File Dialog" Vi and all the needed low-level File I/O VIs and it worked.
    But when i connect the "File Dialog" VI with the "New Report" VI of the Report Generation Toolkit I get an error message.
    Is there any solution to get this file dialog pop up window with the Report Generation VIs?
    thx for any help...!
    Message Edited by Flea on 12-15-2005 03:58 AM

    Wow, thanks for your fast and very helpful reply devchander!
    I already tried this and it works fine
    thx!

  • Combine Files dialog and File Size

    In the Combine Files dialog box, in the lower right corner, the File Size icons are Small, Default, and Large. These settings are very vague. Does anyone know what the actual settings are that these icons use?

    Throw it away. Go to the [http://commons.apache.org/fileupload] and carefully read both 'User Guide' and 'Frequently Asked Questions' sections.
    And please, please also carefully read this article: [http://balusc.blogspot.com/2008/06/what-is-it-with-roseindia.html].

  • File Dialog and Default

    Folks, I am trying to implement a behavior such everytime I open up my LabVIEW application, a windows box showing my saved/old files should automatically pop, before I use the "Esc" key to close the Windows Box.
    I would appreciate any useful logic or suggestion on how I can implement the behavior.
    Thanks in advance.

    You need to store the last saved file name in another file (I call it persistance file)... or you want to read a specific location for last saved file(s). And then you attached code (saved in verison 8.0) for displaying the message with custom behaviour.
    I am not allergic to Kudos, in fact I love Kudos.
     Make your LabVIEW experience more CONVENIENT.
    Attachments:
    Custom Dialog.vi ‏14 KB

  • Error 7: File not found occurs in 8.2 from transition of 4.1. Specifying the file in file dialog returns error although file is in the directory.

    Copied a program from 4.1 to 8.2 recently and receive an error 7: File not found at open file+.vi.  The program is built so a file dialog will pop up and ask for the destination of the file.  Eventhough there is a file in the specified directory, an error is returned.  Running open file+.vi by itself returns no error with the same file designation.  Any clues?

    noviceak,
    Welcome to the NI Discussion Forums.
    I created a quick VI in LabVIEW 4.1 that displays a file dialog and then passes that file path to "Read Characters from File.vi" (which in turn calls Open File+.vi).  I then opened this file in LabVIEW 8.2 and ran it successfully (see code screenshot below).
    When you say there is a file in the specified directory are you using the file dialog to browse to the directory or to select the specific file?  Open File+.vi expects the path to a file rather than a directory - that is C:\folder\file.txt rather than C:\folder.  You might also want to create an indicator or probe to see what path is being passed to Open File+ to ensure it is what you expect.
    I feel like I should also say that in the days (years) inbetween LabVIEW 4.1 and 8.2 the file operation VIs have changed significantly.  While the old Open File+.vi still lives in vi.lib for compatibility purposes we no longer recommend using it for new applications.
    I hope this helps and again, welcome to the community.
    Regards,
    Simon H
    Applications Engineer
    National Instruments
    http://www.ni.com/support/
    Message Edited by Simon H on 01-18-2007 08:01 PM
    Message Edited by Simon H on 01-18-2007 08:03 PM
    Attachments:
    LV4 File Dialog.png ‏3 KB

  • How do I stop the error message coming up when I press cancel on file dialog

    I am using the file dialog and if I press cancel an error box pops up with error 43 operation cancelld by user. Can we get rid of this, as it is bloody enoying, any ideas
    cheers

    Contrary to the rest of the nice folk here, I say do NOT turn off automatic error handling!
    You will regret it if a day comes where you forgot to handle an error properly and you have a hard time determining its source.
    If you truly want to ignore the error in this mode, you can wire the error out terminal into anything (even a wall). Once an error out terminal is wired, the error will not pop up automatically. This does not mean you should use this as a standard course of action. You should normally handle your errors properly.
    Try to take over the world!

  • How to prompt user to select multiple files in file dialog using scripts

    Hi, is there a way to allow user to select multiple files inside the file dialog using scripts? So not just something like "*.ai" or "*.eps" but where the user can actually use their shift key to select a batch of files inside the file dialog and then the script would process each one.
    Thanks!

    // Main Code [Execution of script begins here]
    here's what I have so far. it would also be nice to not have illustrator stop at errors.. right now, it skips dialogs but on errors, it still stops.
    // uncomment to suppress Illustrator warning dialogs
    app.userInteractionLevel = UserInteractionLevel.DONTDISPLAYALERTS;
    var destFolder, sourceFolder, files, fileType, sourceDoc, targetFile, pdfSaveOpts, folderName;
    var fullPath = "";
    var finalSlash;
    // Select the source folder.
    sourceFolder = Folder.selectDialog( 'Select the folder with Illustrator .ai files you want to convert to PDF');
    f = find_files(sourceFolder);
    function find_files (dir)
        return find_files_sub (dir, []);
    function find_files_sub (dir, array)
        var f = Folder (dir).getFiles ("*.*");
        for (var i = 0; i < f.length; i++)
            if (f[i] instanceof Folder)
                find_files_sub (f[i], array);
            else
                if (f[i].name.slice (-3).toLowerCase() == ".ai"          || f[i].name.slice (-4).toLowerCase() == ".eps")
                        //convert the array-listing to a string so we can manipulate it
                        fullPath = String(f[i]);
                        //find the position of the last / to indicate where the filename starts
                        finalSlash = fullPath.lastIndexOf("/");
                        //get the foldername by "slicing" from start to where finalSlash is located
                        folderName = fullPath.slice(0, finalSlash).toLowerCase();                   
                        sourceDoc = app.open(f[i]); // returns the document object
                        // Call function getNewName to get the name and file to save the pdf          
                                                      targetFile_PNG = getNewName(".png");
                                                      if(targetFile_PNG.exists) {
                                                      } else {
                                                                pngExportOpts = getPNGOptions();
                                                                sourceDoc.exportFile(targetFile_PNG, ExportType.PNG24, pngExportOpts );
                        targetFile_PDF = getNewName(".pdf");
                        pdfSaveOpts = getPDFOptions();
                                                      sourceDoc.saveAs(targetFile_PDF, pdfSaveOpts );
                                                      targetFile_SVG = getNewName(".svg");
                                                      svgSaveOpts = getSVGOptions();
                                                      sourceDoc.exportFile(targetFile_SVG, ExportType.SVG, svgSaveOpts );
                        sourceDoc.close();
                        array.push (f[i]);
    getNewName: Function to get the new file name. The primary
    name is the same as the source file.
    function getNewName(ext)
        var ext, docName, newName, saveInFile, docName, finalDot
        var loop = 0;
        docName = sourceDoc.name;
        ext = ext; // new extension for pdf file
        newName = "";
        finalDot = sourceDoc.name.lastIndexOf(".");
        while(loop < finalDot)
            newName += docName[loop];
            loop = loop + 1;
        newName += ext; // full pdf name of the file
              newName = newName.replace(" [Converted]","");
        // Create a file object to save the pdf
        saveInFile = new File( folderName + '/' + newName );
        return saveInFile;
    getPDFOptions: Function to set the PDF saving options of the
    files using the PDFSaveOptions object.
    function getPDFOptions()
        // Create the PDFSaveOptions object to set the PDF options
        var pdfSaveOpts = new PDFSaveOptions();
        // Setting PDFSaveOptions properties. Please see the JavaScript Reference
        // for a description of these properties.
        // Add more properties here if you like
        pdfSaveOpts.acrobatLayers = false;
        pdfSaveOpts.colorBars = false;
        pdfSaveOpts.colorCompression = CompressionQuality.AUTOMATICJPEGHIGH;
        pdfSaveOpts.compressArt = true; //default
        pdfSaveOpts.embedICCProfile = false;
        pdfSaveOpts.enablePlainText = false;
        pdfSaveOpts.generateThumbnails = false; // default
        pdfSaveOpts.optimization = true;
        pdfSaveOpts.pageInformation = false;
        pdfSaveOpts.preserveEditability = true;
        return pdfSaveOpts;
    function getSVGOptions()
              var svgSaveOpts = new ExportOptionsSVG();
              //just using defaults aside from what's written below
      //see http://cssdk.host.adobe.com/sdk/1.0/docs/WebHelp/references/csawlib/com/adobe/illustrator/ ExportOptionsSVG.html
      svgSaveOpts.embedRasterImages = true;
      svgSaveOpts.sVGTextOnPath = true;
              return svgSaveOpts;
    function getPNGOptions()
              // Create the PDFSaveOptions object to set the PDF options
              var pngExportOpts = new ExportOptionsPNG24();
              // Setting PNGExportOptions properties. Please see the JavaScript Reference
              // for a description of these properties.
              // Add more properties here if you like
              pngExportOpts.antiAliasing = true;
              pngExportOpts.artBoardClipping = false;
              pngExportOpts.horizontalScale = 100; // scaling to 350%
              pngExportOpts.saveAsHTML = false;
              pngExportOpts.transparency = true;
              pngExportOpts.verticalScale = 100; // scaling to 350%
              return pngExportOpts;

  • Open File Dialog, Select either FIle or Folder, but Set the Initial Location to ftp://

    Hello,
    I want to be able to open a file dialog, set the initial location to an ftp:// address, and allow the user to select individual files or a directory.
    I can use the File Dialog express VI, and wire in a start path, but the problem is that the filepath constant does not allow you to input ftp://[IPAddress]. If you type it in it will automatically adjust the path to read . If you right click, and hit browse and go to an ftp site, the dialog will not let you select a file or folder. And no you cannot type the address into a string and then convert that to a path. If you do it will look just like the image above.
    I can use .NET functions as seen below, but it is not trivial to allow the user to select files or a folder. The same is true if I write it in C++ (although I haven't tried this yet, just googled selecting files or folders in a file dialog).
    EDIT: I just realized that with .NET if I select a single file, the FileName it returns points to a temporary internet folder on my computer for example: C:\Users\xxxxx\AppData\Local\Microsoft\Windows\Temporary Internet Files\Content.IE5\P01ODP0F\ni-rt[1].ini
    The FileDIalog Express VI has these very options.
    So what is the easiest way to have an initial ftp address path for a file dialog, and allow the user to select files or a folder?

    Have never had to do that before - that's a bit of a drag.
    Some thoughts.
    1) Can you map a drive to that FTP address and go from there?
    2) You could try rolling your own dialog via FTP - that's something I've definitely done before!
    In the following snippet, I start an FTP session on the NI FTP site, log in as anonymous, list the base directory files/folders and then close my session. I then unbundle the directory listings array and plug the name and item type into the item names of a multicolumn listbox.
    CLD

  • Windows Classis Theme - Windows Classic Start Menu / Save Files Dialog

    MS, please keep a way back to the 9x interface!
    Really anoying that the Windows Classis Start menu (Windows 9x etc.) is not available in Win7.
    (and apparently no option "Always Show All Programs" option is available and the subprograms are listed in the same window which makes it a long list)
    People and commpanies want the option to go to the old-familiair Windows Classic (9x) interface!!!!
    We know it, it works and it suits the purpose: why change!
    Furthermore in a company environment all files are saved in a directory structure and not in the 'favorites' folders in the user profile. So please...make a simple classic w7 interface like XP (with a simple Save File Dialog) and not a Christmass Three with bells Interface like W7.
    [i think that's one of the reson that ofiice 2007/vista doesn't sell as it should. I'm affraid it is a marketing strategy of MS. But unfortunately I think it drives more people in to alternatives like openoffice etc.]

    The XP and later interface has always looked like something designed by Fisher-Price to me. Much more annoying, though, is the inability to go the Classic Start Menu. This is sufficient to cause me to stick with XP until it simply can't handle the then-current software. By that time, Linux should be able to run all Windows progams; it is getting closer to that now. Are you listening, MSFT? I'm an MCP with other certs, and, unless you give the option for the Classic Start Menu and a menu that shows all programs (not just a "personalized menu), XP may be my final Windows version.
    I really do not understand Microsoft's lack of logic here. They changed the interface in Office 2007 with the ribbon; millions upon millions of users were proficient with the interface prior to that, and MSFT says they have to learn a new one (I agree with Frank1977 here that it's driving people to OpenOffice). That sounds like a New Coke decision to me. Maybe they have an Apple or Linux mole in there, seeking to give bad advice purposely (for any Biblically literate readers, think "Hushai the Archite", and the advice he gave Absalom).
    I have defended Microsoft to many Microsoft-bashers at work, but this is becoming more and more difficult to do. And I'm losing my incentive to do so. PLEASE, Microsoft, add power and abilities, as you are doing, but don't arrogantly insist on forcing professional users to learn a new (and less capable) interface.
    Well said , Tewald , have considered other options lately as far as "other operating systems go" , you listening Micro soft ?
    MB

  • I am trying to open CR2 files from a Cannon EOS 1DX camera in Photoshop CS6 and I have already updated the Camera Raw Plug in but Photoshop is still giving me the cannot open files dialog box? Help?

    I am trying to open CR2 files from a Cannon EOS 1DX camera in Photoshop CS6 and I have already updated the Camera Raw Plug in but Photoshop is still giving me the cannot open files dialog box? Help?

    Canon 1DX support was added to ACR in version 6.7, 7.1.  An updated CS6 should be at level ACR 8.6.  If your ACR is not at level 8.6 try using CS6 menu Help>Updates.  If that does not install ACR 8.6 try downloading the ACR and DNG 8.6 converter and see if ACR 8.6 will install into your CS6.
    Adobe - Adobe Camera Raw and DNG Converter : For Windows
    Adobe - Adobe Camera Raw and DNG Converter : For Macintosh

  • What does the open file dialog do 'under the hood' and is there a way to simulate it

    What does the open file dialog do 'under the hood' and is there a way to simulate it?
    I have a bug in my code (that I've posted about before, here) which I can't fix at the moment, but I do have a workaround.
    Briefly, the bug:
    I call a dll from a function node, to initialise and run a spectrometer. If I start up the PC, LabVIEW and run my vi the code runs without complaint, the first call to the dll to initialise the spectrometer doesn;t return an error but the spectrometer is not detected either.
    I've tried various solutions, see the link above, and none work
    The workaround:
    If, at any time before running the code containing the function node I open an 'open file' dialog window, select the dll and click ok/hit enter then everything is fine. When I run the main code the spectrometer is detected.
    I use an express vi to open the file dialog, I specify the start path and file name as constant inputs and just click ok/hit return when the dialog pops up. I don't do anything with the dialog outputs. In fact the vi that contains the open file dialog can be run before the project containing the bug is even open.
    I have to do this everytime I turn the PC on.
    So, either
    1) Can somewone suggest a fix for the original bug?
    2) What is the easiest way to simulate the enter keypress when the open file dialog pops up
    or
    3) Can someone tell me what the open file dialog does under the hood that somehow causes the dll to work and can it be simulated in straight LabVIEW
    I suspect that the dll itself is dodgy ( I have in the past talked to the supplier but not got very far, and I will try again but I would like a quick, temporary solution too). I'm guessing that the file dialog is making some kind of check on the file, and possibly registering its presence with the OS (winXP). I tried using the file/folder exists vi to see if checking the file like that worked but no luck.
    Any help greatly appreciated.
    Dave

    Hi David
    I am very conscious about thread hijacking but this sounded like my issue so I hope you dont mind me asking about your issue. I am hoping that you have a spectrometer from the same vendor as me and its not just me seeing an Error 1097 issue. My spectrometer is from a company called Stellarnet.
    So far I have unable to get it to work with other VIs. There is one condition where I can get it to work but its no good for me.
    Case 1
    I open the VI in a fresh labview environment with no other VIs in memory. The code runs with no issue.
    Case 2
    Labview is not opened. I double click the spectrometer VI in windows explorer.  The VI opens but it fails to run resulting in Error 1097. Personally, I dont see the difference between this and Case 1 above and yet it fails.
    Case 3
    If I already have other VI's in memory and try to load the spectrometer VI and run it fails with Error 1097. This case is the one that most important to me. I have a test executive that will load test VIs dynamically and I can't get this to work. Same problem Error 1097.
    I wanted to share what I have seen with you and to let you know that maybe somebody else has the same issue. I am convinced its the DLL but the vendor dis-agreed saying it was LabVIEW. I couldn't convince him otherwise.
    Thanks in advance
    David

  • Dialog prompt and check if file exists, and use the result of dialog

    I have this working script and I want to change the way it behaves.
    I want a dialog to come up, Do you want to skip or replace existing files.
    Then the result  of the dialog to be used in the reast of the script.
    I've added it in the script where I need to use it. in noce big letters, hopefully its not a big job.
    Many thanks
    property type_list : {"8BPS"}
    property extension_list : {"psd"}
    script o
              property theseNames : {}
    end script
    -- empty log file
    do shell script "echo  'Files not processed in Photoshop :'  > ~/Desktop/LogPhotoshopError.txt"
    set noError to true
    --Setup list of folders and process details of folders
    set dtF to paragraphs of (do shell script "ls -F ~/Desktop | grep '/' | cut -d'/' -f1")
    set tc to (count dtF)
    repeat with i from 1 to tc
              set folderName to item i of dtF --<:  is the folder name, no need to use text item delimiters -->":"
              if folderName does not start with "2_" and folderName does not start with "Hot" and folderName does not start with "Press" and folderName does not start with "Design" and folderName does not start with "Keywords" and folderName does not start with "Season" and folderName does not start with "Sue" and folderName does not start with "Design" then
                        set {oldTID, my text item delimiters} to {my text item delimiters, "_WK"}
                        set FolderEndName to last text item of folderName
                        set brandName to first text item of folderName
                        set my text item delimiters to "_PSD"
                        set weekNumber to first text item of FolderEndName
                        set my text item delimiters to oldTID
                        set theFolder to ("Hal 9000:Users:matthew:Desktop:" & folderName)
      --set up names to destination folders and create locally based on brand name and week number
                        set this_local_folder to "Images:2012-2013"
                        set localWeekFolder to my getFolderPath("WK" & weekNumber, this_local_folder)
                        set localBrandFolder to my getFolderPath(brandName, localWeekFolder)
                        set localBrandFolder_Low_Res to my getFolderPath(brandName & "_WK" & weekNumber & "_LR", localBrandFolder)
                        set localBrandFolder_High_Res to my getFolderPath(brandName & "_WK" & weekNumber & "_HR", localBrandFolder)
                        set localBrandFolder_PSD to my getFolderPath(brandName & "_WK" & weekNumber & "_PSD", localBrandFolder)
                        set this_Network_folder to "GEN:Brands:Zoom:Brand - Zoom:Upload Photos:2013:"
                        set networkWeekFolder to my getFolderPath("Week" & weekNumber, this_Network_folder)
                        set networkBrandFolder_Low_Res to my getFolderPath(brandName & "_WK" & weekNumber & "_LR", networkWeekFolder)
                        set website_images to "GEN:Website_Images:"
      --set up names to destination folders and create over Netwrok for FTP collection (based on a mounted drive)
                        set this_ftp_folder to "pulse:"
                        set ftpWeekFolder to my getFolderPath("Week" & weekNumber, this_ftp_folder)
                        set ftpBrandFolder to my getFolderPath(brandName, ftpWeekFolder)
                        set ftpBrandFolder_Low_Res to my getFolderPath(brandName & "_WK" & weekNumber & "_LR", ftpBrandFolder)
                        set ftpBrandFolder_High_Res to my getFolderPath(brandName & "_WK" & weekNumber & "_HR", ftpBrandFolder)
      --at the beginning of the script, ask whether to replace or skip existing files? to apply to all?
      --use the result for the if file exists?
                        display dialog "Should I replace or skip exisiting files?" buttons {"Replace", "Skip (Faster)"} default button 2 with icon 1
      --taking the folder identify which process it must follow.
                        if brandName is equal to "BH" then
                                  try
                                            tell application "Finder" to set o's theseNames to (name of files of alias theFolder whose file type is in the type_list or name extension is in the extension_list)
                                  on error
                                            set o's theseNames to {} -- no psd files or "8BPS"
                                  end try
                                  set numOfNames to (count o's theseNames)
                                  repeat with j from 1 to numOfNames
                                            set thefile to theFolder & ":" & (item j of o's theseNames)
      --    B H   Folder Photoshop Process
      --if thefile exists in the folder localBrandFolder_PSD then do the result of dialog.
      --"Skip" the file and move on to next
      --If "replace" continue the rest of the script.
                                            tell application "Adobe Photoshop CS5.1"
      -- I remove the command activate, Photoshop stay in background
                                                      set ruler units of settings to pixel units
                                                      try
      open (alias thefile) showing dialogs never
                                                                set origName to name of current document
                                                                set myOptions to {class:JPEG save options, quality:12}
                                                                set myPSDOptions to {class:Photoshop save options, embed color profile:true, save layers:true}
                                                                tell current document
      --If the quick mask mode has been left on then delete the channel Quick Mask
                                                                          if (quick mask mode) then delete channel ¬
                                                                                    "Quick Mask"
      --If the Layer is incorrectly labeled with Original Layer it needs renaming to original Image
                                                                          if (exists layer "Original Layer") then ¬
                                                                                    tell layer "Original Layer" to set name to "Original Image"
      save in (localBrandFolder_PSD & origName) as Photoshop format with options myPSDOptions without copying
                                                                          (delete layer "Original Image") flatten
      resize image resolution 300 resample method none
      --sharpen image
      filter current layer using unsharp mask with options {amount:80, radius:3.2, threshold:0}
      save in (localBrandFolder_High_Res & name) as JPEG with options myOptions without copying
      --get file path, return path of the JPEG file, work with (without copying)
      -- (with copying) : it return path of PSD file
                                                                          set newFile to file path --( return path of type alias )
      -- duplicate file using the Finder  -->on duplicateFile(..)
                                                                          my duplicateFile(newFile, {ftpBrandFolder_High_Res})
      --Prepare for Low RES by resetting image history
                                                                          set current history state to history state 3
                                                                          flatten
                                                                          resize image width 1348
      resize image resolution 300 resample method none
      filter current layer using unsharp mask with options {amount:80, radius:3.2, threshold:0}
      --add save to lowResFolder with same options
      save in (localBrandFolder_Low_Res & name) as JPEG with options myOptions without copying
                                                                          set newFile to file path
                                                                          set newFile2 to newFile as string -- for testing end of name
                                                                          if newFile2 ends with "_2.jpg" or newFile2 ends with "_3.jpg" then -- exclude website_images
                                                                                    my duplicateFile(newFile, {networkBrandFolder_Low_Res, ftpBrandFolder_Low_Res})
                                                                          else
                                                                                    my duplicateFile(newFile, {networkBrandFolder_Low_Res, ftpBrandFolder_Low_Res, website_images})
                                                                          end if
      close saving no
                                                                end tell
                                                      on error
                                                                set noError to false
                                                                my myLogs(thefile) -- write path to log file in Desktop
                                                                try
      close saving no --if exists, close current document
                                                                end try
                                                      end try
                                            end tell
                                  end repeat
      --End BH
    -- else if and the rest of the script.....
    end repeat
    if not noError then do shell script "/usr/bin/open  ~/Desktop/LogPhotoshopError.txt'"
    on myLogs(t)
              try
                        do shell script "echo " & (quoted form of t) & ">> ~/Desktop/LogPhotoshopError.txt'"
              end try
    end myLogs
    on duplicateFile(tFile, foldersPath) -- tFile is an alias, foldersPath is a list of folder
              tell application "Finder" to repeat with folderPath in foldersPath
                        with timeout of 200 seconds -- adjust it,  error if the copy  is longer that 200 seconds
      duplicate tFile to folder folderPath with replacing
                        end timeout
              end repeat
    end duplicateFile
    on getFolderPath(tName, folderPath)
              tell application "Finder" to tell folder folderPath
                        if not (exists folder tName) then
                                  return (make new folder at it with properties {name:tName}) as string
                        else
                                  return (folder tName) as string
                        end if
              end tell
    end getFolderPath
    tell application "Finder"
              open "Hal 9000:Users:matthew:Desktop:LogPhotoshopError.txt"
    end tell

    Hi,
    I think that's what you want.
    I put the dialog in the beginning, so it does not appear to each folder, otherwise put it in the loop as it was originally.
    property type_list : {"8BPS"}
    property extension_list : {"psd"}
    script o
          property theseNames : {}
    end script
    -- empty log file
    do shell script "echo  'Files not processed in Photoshop :'  > ~/Desktop/LogPhotoshopError.txt"
    set noError to true
    --at the beginning of the script, ask whether to replace or skip existing files? to apply to all?
    --use the result for the if file exists?
    display dialog "Should I replace or skip exisiting files?" buttons {"Replace", "Skip (Faster)"} default button 2 with icon 1
    set skipFiles to (button returned of the result) is "Skip (Faster)"
    --Setup list of folders and process details of folders
    set dtF to paragraphs of (do shell script "ls -F ~/Desktop | grep '/' | cut -d'/' -f1")
    set tc to (count dtF)
    repeat with i from 1 to tc
          set folderName to item i of dtF --<:  is the folder name, no need to use text item delimiters -->":"
          if folderName does not start with "2_" and folderName does not start with "Hot" and folderName does not start with "Press" and folderName does not start with "Design" and folderName does not start with "Keywords" and folderName does not start with "Season" and folderName does not start with "Sue" and folderName does not start with "Design" then
                set {oldTID, my text item delimiters} to {my text item delimiters, "_WK"}
                set FolderEndName to last text item of folderName
                set brandName to first text item of folderName
                set my text item delimiters to "_PSD"
                set weekNumber to first text item of FolderEndName
                set my text item delimiters to oldTID
                set theFolder to ("Hal 9000:Users:matthew:Desktop:" & folderName)
                --set up names to destination folders and create locally based on brand name and week number
                set this_local_folder to "Images:2012-2013"
                set localWeekFolder to my getFolderPath("WK" & weekNumber, this_local_folder)
                set localBrandFolder to my getFolderPath(brandName, localWeekFolder)
                set localBrandFolder_Low_Res to my getFolderPath(brandName & "_WK" & weekNumber & "_LR", localBrandFolder)
                set localBrandFolder_High_Res to my getFolderPath(brandName & "_WK" & weekNumber & "_HR", localBrandFolder)
                set localBrandFolder_PSD to my getFolderPath(brandName & "_WK" & weekNumber & "_PSD", localBrandFolder)
                set this_Network_folder to "GEN:Brands:Zoom:Brand - Zoom:Upload Photos:2013:"
                set networkWeekFolder to my getFolderPath("Week" & weekNumber, this_Network_folder)
                set networkBrandFolder_Low_Res to my getFolderPath(brandName & "_WK" & weekNumber & "_LR", networkWeekFolder)
                set website_images to "GEN:Website_Images:"
                --set up names to destination folders and create over Netwrok for FTP collection (based on a mounted drive)
                set this_ftp_folder to "pulse:"
                set ftpWeekFolder to my getFolderPath("Week" & weekNumber, this_ftp_folder)
                set ftpBrandFolder to my getFolderPath(brandName, ftpWeekFolder)
                set ftpBrandFolder_Low_Res to my getFolderPath(brandName & "_WK" & weekNumber & "_LR", ftpBrandFolder)
                set ftpBrandFolder_High_Res to my getFolderPath(brandName & "_WK" & weekNumber & "_HR", ftpBrandFolder)
                --taking the folder identify which process it must follow.
                if brandName is equal to "BH" then
                      try
                            tell application "Finder" to set o's theseNames to (name of files of alias theFolder whose file type is in the type_list or name extension is in the extension_list)
                      on error
                            set o's theseNames to {} -- no psd files or "8BPS"
                      end try
                      set numOfNames to (count o's theseNames)
                      repeat with j from 1 to numOfNames
                            set thefile to theFolder & ":" & (item j of o's theseNames)
                            --    B H   Folder Photoshop Process
                            tell application "Finder" to set b to exists file (localBrandFolder_PSD & item j of o's theseNames)
                            if b and not skipFiles then -- file exists and "replace" (continue the rest of the script).
                                  tell application "Adobe Photoshop CS5.1"
                                        -- I remove the command activate, Photoshop stay in background
                                        set ruler units of settings to pixel units
                                        try
                                              open (alias thefile) showing dialogs never
                                              set origName to name of current document
                                              set myOptions to {class:JPEG save options, quality:12}
                                              set myPSDOptions to {class:Photoshop save options, embed color profile:true, save layers:true}
                                              tell current document
                                                    --If the quick mask mode has been left on then delete the channel Quick Mask
                                                    if (quick mask mode) then delete channel ¬
                                                          "Quick Mask"
                                                    --If the Layer is incorrectly labeled with Original Layer it needs renaming to original Image
                                                    if (exists layer "Original Layer") then ¬
                                                          tell layer "Original Layer" to set name to "Original Image"
                                                    save in (localBrandFolder_PSD & origName) as Photoshop format with options myPSDOptions without copying
                                                    (delete layer "Original Image") flatten
                                                    resize image resolution 300 resample method none
                                                    --sharpen image
                                                    filter current layer using unsharp mask with options {amount:80, radius:3.2, threshold:0}
                                                    save in (localBrandFolder_High_Res & name) as JPEG with options myOptions without copying
                                                    --get file path, return path of the JPEG file, work with (without copying)
                                                    -- (with copying) : it return path of PSD file
                                                    set newFile to file path --( return path of type alias )
                                                    -- duplicate file using the Finder  -->on duplicateFile(..)
                                                    my duplicateFile(newFile, {ftpBrandFolder_High_Res})
                                                    --Prepare for Low RES by resetting image history
                                                    set current history state to history state 3
                                                    flatten
                                                    resize image width 1348
                                                    resize image resolution 300 resample method none
                                                    filter current layer using unsharp mask with options {amount:80, radius:3.2, threshold:0}
                                                    --add save to lowResFolder with same options
                                                    save in (localBrandFolder_Low_Res & name) as JPEG with options myOptions without copying
                                                    set newFile to file path
                                                    set newFile2 to newFile as string -- for testing end of name
                                                    if newFile2 ends with "_2.jpg" or newFile2 ends with "_3.jpg" then -- exclude website_images
                                                          my duplicateFile(newFile, {networkBrandFolder_Low_Res, ftpBrandFolder_Low_Res})
                                                    else
                                                          my duplicateFile(newFile, {networkBrandFolder_Low_Res, ftpBrandFolder_Low_Res, website_images})
                                                    end if
                                                    close saving no
                                              end tell
                                        on error
                                              set noError to false
                                              my myLogs(thefile) -- write path to log file in Desktop
                                              try
                                                    close saving no --if exists, close current document
                                              end try
                                        end try
                                  end tell
                            end if -- else "Skip" the file and move on to next
                      end repeat
                      --End BH
                end if
          end if
    end repeat
    if not noError then do shell script "/usr/bin/open  ~/Desktop/LogPhotoshopError.txt'"
    on myLogs(t)
          try
                do shell script "echo " & (quoted form of t) & ">> ~/Desktop/LogPhotoshopError.txt'"
          end try
    end myLogs
    on duplicateFile(tFile, foldersPath) -- tFile is an alias, foldersPath is a list of folder
          tell application "Finder" to repeat with folderPath in foldersPath
                with timeout of 200 seconds -- adjust it,  error if the copy  is longer that 200 seconds
                      duplicate tFile to folder folderPath with replacing
                end timeout
          end repeat
    end duplicateFile
    on getFolderPath(tName, folderPath)
          tell application "Finder" to tell folder folderPath
                if not (exists folder tName) then
                      return (make new folder at it with properties {name:tName}) as string
                else
                      return (folder tName) as string
                end if
          end tell
    end getFolderPath
    tell application "Finder"
          open "Hal 9000:Users:matthew:Desktop:LogPhotoshopError.txt"
    end tell

  • Excel is throwing error when it click print : 'No printers are installed. To install a printer click the File tab, and then click Print. Click No Printers Installed, and then click Add Printer. Follow the instructions in the Add Printer dialog box'

    Excel is throwing error when it click print : 'No printers are installed. To install a printer click the File tab, and then click Print. Click No Printers Installed, and then click Add Printer. Follow the instructions in the Add Printer dialog box'
    Word, and powerpoint application are working fine.  
    Environment :  Windows 7 64-bit, MS Office 2013 64-bit
    Steps to recreate
    (i)  Create new user account and add to any group ( do not log on using this
     account)
      (ii)  runas /user:<new user account>  <fullpath>\excel.exe
       it will ask password so enter on command prompt
    (iii)  open any excel document  and click File->Print
      (iv)  verify result  (it is failing) it pop ups below error
     Error:`Microsoft Excel
     No printers are installed. To install a printer click the File tab, and then click
     Print. Click No Printers Installed, and then click Add Printer. Follow the
     instructions in the Add Printer dialog box.                                                                                                               

    Sorry for late reply i was not at work
    I have a default set excel is still throwing error. Interestingly winword , powerpoint and publisher are working fine. I am able to print from all office applications except Excel.
     Probably excel behaves differently from other office applications.
     Probably it is a bug in excel
    Workaround : Log on to a system once using newly created account then runas excel using this account then print works fine.
    It means something in user profile should be configure to run excel print operation. Could you please somebody help what I need to configure in user profile that makes print operation success?

  • File dialog box: how get full path and filename (firefox 3.0 problem)

    Hi,
    I have a smilar problem then discussed in this thread: file dialog box: how get  full path and filename
    Now this solution doesn't seem to work in firefox 3.0,I only get the filename but not the full path.
    I have tried to solve this problem by adding *"netscape.security.PrivilegeManager.enablePrivilege("UniversalFileRead");"* in a javacript function but that doesn't do the trick
    Although when i tested it local it does work.
    Any idees how to solve this?
    Best Regards
    Stijn

    Actually, that is strange and scarry. With 20% of the browser market share they decide to behave like Microsoft did in the past - they want to decide what users need and what they do not need. With 3.0 I have a real problem with some of my applications. They are all tested in IE6, IE7, FF2.0 and they all work the same way (they even work with Opera and Safari). Now, I will for sure not go there and make it work for 3.0, just because 2 out of 200 users use FF3.0. Up to now I have always recomended FF as the best browser. 3.0 causes my opinion to change completely. Competition is always good but it is a question if it is good if we have 20 different browsers out there with equal market shares.
    Denes Kubicek
    http://deneskubicek.blogspot.com/
    http://www.opal-consulting.de/training
    http://apex.oracle.com/pls/otn/f?p=31517:1
    -------------------------------------------------------------------

  • File dialog box: how get  full path and filename

    Hello All
    i have a problem to save the full path and filename with file dialog box.
    I want to save full path and filename in the database for creating a link to a file.
    I use a file-dialogbox to choose a file.
    I see in the textfiled something like this
    \FULLPATH\filename.ppt
    but when i save the textvalue in the database or look at the seesionvalue I see
    this:
    F2087258868/filename.ppt
    but I need the full path to create a link. How I can get?
    I use version 2.2.1..
    Thanks
    Putcho

    Hi Putcho,
    You can create some javascript that puts it into a hidden item.
    In HTML Form Element Attributes: onChange="$x('P15_X').value=$x('P15_FILE').value;" Then create another process that stores the value of the hidden item in your own table...
    I quickly made an example with a normal text item, so you see it copies itself to the other box: http://apex.shellprompt.net/pls/apex/f?p=286:15
    Hope that helps,
    Dimitri
    http://dgielis.blogspot.com

Maybe you are looking for

  • 8i installation problem on RedHat 7.1

    I still have a linking problem with ins_ctx.mk after I applied the patch of glibc-2.1.3. Hopefully someone could help me out. Thanks a lot Kenny

  • Error While Installing the Business Content Query

    Dear Friends, We are in BI 7.0 and trying to install a business content query "Balance Sheets Profit and Loss Statement" but while activating we are getting the error that some Particular Request has not been found or not suitable. we checked for tha

  • How to search for perticular Bookmark present in many word files at once

    Hi all, We have templates created through Word 2003. We have created the Bookmarks in that some are fetched from database and others are from a XML file, through the code. We do Alt+i+k and the list of bookmarks present in that template appears. So,

  • Executing multiple DDL statements with OracleCommand

    hi.. im having trouble executing multiple ddl statements with the the oracle command object. i have tried to enclose them within Begin.. End; block but with no use. this problem seems to occur only with DDL statements,.. as my DML like update, delete

  • CS6 Encore Flash output is blank

    I'm at a loss here. I'm exporting a large project (lots of menus, clips, etc) via 1280x720 Flash. When I load the index.html, nothing comes up (just dark grey space). There are no error messages. I have tried it on multiple machines with multiple bro