Can a script be written to ignore/close certain file types?

If I want to create an action the runs various scripts, can I write a script that tells photoshop to skip/close the file instead of the action stopping becasue it cannot continue? Basically I need to make a script that will ignore .bmp and .eps files.
Thanks for your input.

If the file is open you can use something like this..
var EXT = decodeURI(activeDocument.name).toLowerCase().match(/[^\.]+$/);
if (EXT == "eps" || EXT == "bmp") {
    app.activeDocument.close(SaveOptions.DONOTSAVECHANGES);
You can just select the file types you require or use selected files in Bridge

Similar Messages

  • How can i handle with event, when i close a file (notped or word,excel..)??

    How can i handle with event, when i close a file (notped or excel...). i want do something..
    Edited by: Legy on Apr 21, 2008 11:45 PM

    of course notepad.exe is closed again as soon as the operating system has completed the process of loading its content into memory...
    And no "event" is fired when that happens, except maybe internal to the process that loaded the application to indicate that it's been loaded successfully and can now be executed.
    But there's no way your Java process is ever going to receive that notification.

  • Can I exclude certain file types in the Photo Downloader?

    Hi there!
    I am very new here, so please do correct me on etiquette and if I'm doing something wrong. I've been searching the web for quite a while now but couldn't find an answer or even questions concerning this problem...
    I like using Bridge's Photo Downloader, for the nice renaming and other options it gives me. Usually I want to download all images from a card and then delete them on the card. The problem I am having is that Photo Downloader will not only see images (like .JPG, .CR2 or .ARW) but camera database files and settings (.INT, .BDM, .BIN, ...). This is annoying, since I neither want them stored on my hard drive nor deleted on my card. I also would like to import movies in a different way. The way I can work around this now is that I manually deselect all non-images in the Advanced Dialog and then only download these. But I was hoping that there is a more elegant and automatic way to just exclude certain file types from automatic selection. Or even just a way to mark or unmark the images by file type. This should be very easy to implement and I am really curious if I am missing something obvious here or if this is just not possible yet.
    Has anyone else thought this before? Or are you all using different methods to import images from your card reader?
    Any help or comment is appreciated.

    Sorry, download history is either on or off. There is no preference setting to exclude specific file types.

  • Using the value "Image/*" for the accept attribute of the HTML input Element, how can I add .pdf to the array of preconfigured file types (.jpe, .jpg, .jpeg, .?

    On a form, using the value "image/*" for the accept attribute of the HTML input Element, how can I add .pdf to the array of pre-configured file types (.jpe, .jpg, .jpeg, .gif, .png, .bmp, .ico, .svg, .svgz, .tif, .tiff, .ai, .drw, .pct, .psp, .xcf, .psd, .raw)?
    Say I wanted to add .gif, .jfif or .ico. I find this array limited, how can I add types to image?
    <input type="file" name="file" accept="image/*" id="file" />
    mimeTypes.rdf does not seem to allow this.

    ''mimeTypes.rdf'' has nothing to do with web development. It's a file that stores your file handling preferences (e.g. if you want ZIP files automatically saved or opened).
    You can't change the file types of the pre-defined content specifiers (audio/*, video/*, image/*), but you can specify additional MIME types. To add PDF to your above example,
    <pre><nowiki><input type="file" name="file" accept="image/*,application/pdf" id="file" /></nowiki></pre>
    For details, see
    * [https://developer.mozilla.org/En/HTML/Element/Input developer.mozilla.org/En/HTML/Element/Input]

  • Can't set plugins (like Quicktime, to be run in FF) for certain file types

    When I go to the application tab in options, I don't have the option to select a plugin for certain files - I'm trying to get Quicktime to open mp3s in Firefox, I know it can, it use to do that on my old computer, but Firefox doesn't give me the option - I see it listed for other files, but it doesn't appear for this one.
    == This happened ==
    Every time Firefox opened

    Still more data. iTunes on the Vista machine will still not allow me to change the location of the iTunes Folder with the Browse button. It acts like the network doesn't exist.
    But, surprisingly, if I go to File-Add File to Library, the network appears! Even stranger, File-Add Folder to Library, the network does NOT appear.
    Again, the network is clearly operationaly, and iTunes can even see the network in the Add File menu, but refuses to see it in the Advanced menu or Add Folder.
    It's not that Apple doesn't want me to be able to do this, because all of my XP machines running 7.6 do this flawlessly. There is clearly some bug between 7.6 and Vista.
    Rummaging around the forums convinces me that this is a pretty common problem, but I haven't found an answer yet.
    Thanks for any help,
    Shawn M.

  • What can be done if I cannot import an unsupported file type

    Does anyone know if it is possible to change the file type from PowerdDVD.exe to something I can import into PE11.  I have about 40 dvd's that I want to edit and make a new condensed version but can not import.

    SamBatman
    Thanks for the follow up.
    There are lots of online links to explore for help navigating the Premiere Elements learning curve.
    I find that the Premiere Elements Help PDF is the best initial approach. It is comprehensive and a good source. And, free. If you decide that you want to supplement any of that information with books, I would suggest that you seek those that go to your version. Principles stay the same from version to version, but features do not, often changing, relocating, or disappearing.
    http://helpx.adobe.com/pdf/premiere-elements_reference.pdf
    If you are into using the Elements Organizer which comes with the program, then also
    http://helpx.adobe.com/pdf/elements-organizer_reference.pdf
    But to the immediate issue of what you have on that DVD disc and how to get its contents into Premiere Elements 11 workspace for editing. We need to determine if you have content in DVD-VIDEO standard or widescreen format. If you do, then my suggestion of
    1. disc in DVD burner tray
    2. Add Media/DVD camera or compuer drive
    would be applicable.
    Your screenshot suggests that you have file or files in .ico format. That is not DVD-VIDEO format. So just to be sure, please place one of your DVD disc in the DVD burner tray, go to Computer, and explore the DVD drive. Do you see at least two folders, at least one being named VIDEO_TS?
    I am wondering if I assumed too much when I saw the DVD in your question. So, let me back up and ask for confirmation on
    a. What is this "PowerdDVD.exe" representing? Was it the CyberLink PowerDVD software?
    and, if so,
    b. What was the export from that program, the import exported in DVD-VIDEO standard or widescreen format or something else.
    c. Until proven otherwise, I do not see CyberLink PowerDVD exporting a file with an .ico file extension. Did someone convert the original files from PowerDVD in transferring them to the DVD disc that you presently have?
    2. By any chance is your PowerDVD software referring to this king of software instead, as per this link
    http://powerdvd1.software.informer.com/download-powerdvd-icon-ico/
    suggesting maybe you are dealing with "icons files" and not video files?
    Please review and then we can decide what next if necessary.
    Thanks.
    ATR

  • What script to find associated program for a file type?

    Hi friends,
    I am looking for OSX commands that can do the following:
    - return name of associated program for a particular file type, i.e "QuickTime' for .mov
    - return path of the executable file of the program name returned above.
    I hope to get some ideas/suggestions from you.
    Thanks and have a nice day!

    Microsoft has a recover pst program that you can get from their
    site. But when I worked on a help desk and used the program, it might have worked about once out of 15 times. When I contacted Microsoft about it, they stated that they knew that the program really did not work and there was no rush on revising it. Saying
    that, we are talking about five years ago when I was on the help desk. Or use Outlook Restore Toolbox from  
    http://www.outlook.restoretools.com/
    http://www.filerepairforum.com/forum/microsoft/microsoft-aa/outlook/1168-does-anyone-have-any-ideas-for-solution-this-problem

  • Can a script be written to take the next 2 files in a folder and place them on a background image..then saving with the first images filename..?

    Hello all, I hope you can help.
    In Photoshop I have a problem to overcome and have delved into the world of scripting..
    If there is a quick way to produce the following could someone help me with some pointers?
    Here is my situation..
    I need to produce a photograph proof card, these are for a double image option so cause me a headache compared to just creating an action..
    This proof card really is just a set of two different photographs placed onto a background image.
    I would produce two different images of the same person and name them exactly the same except they are suffixed with an A or B to keep them together, these would be in a folder with approx 500 other images for example (250 x two of each person)
    My preference for the process would be done in the following sequence:
    1/ Open the background file jpg (which is sized at 2400 x 1800 pixels @ 300dpi)
    2/ Load the first image from the batch file and place this.
    3/ Get the filename of the first image and create it as a text layer and write it below the image at 10 point text size.
    4/ Create another copy of this layer and change the font to 3of9barcode font, however the font needs an asterisk before the text then again after it. e.g. *filenameA*
         Only the first image has the need for a barcode as they are for the same person. This is at 18 point.
    5/ Load the next sequential image from the batch file and place this.
    6/ Get the filename for the second image and as Item 3/ create a text layer below at 10 point text size.
    7/ Place a png overlay with my copyright information over the images (I need to do this twice, once for each image)
    8/ Flatten the images and save the file in a new folder with the same filename as the first image.
    I can do this in Lightroom with the exception of putting the barcoded text, and the filenaming, this is because the background image is used as the identity plate and the filename is not based on the data from either photograph..
    Can anyone shed some light on where to go from here?
    Kind regards
    Bryan

    Photoshop Scripting-wise this seems fairly "easy".
    But I would recommend creating a template file (that already combines background image, png overlay and the Type Layers).
    Maybe data driven graphics would also be an option …
    Photoshop Help | Creating data-driven graphics

  • Can a script be written to improve the import process?

    Hello everyone -
    One of our managers would like to create topics by importing text from Word.  That is simple enough, but she would like to add a 'mapping' function to the import process that would create the topics in the appropriate folder.
    For example, the RH table of contents is structured by category (4), state(50) and line of business(15).  The Word file is structured as a table, and in that table are columns for category, state and line of business, along with additional text (such as description, etc).
    During the import process, she would like to map the Word file by category, state and line of business.  Using that mapping, import each line of the table and create a topic in the appropriate category, state and line of business.
    Is it possible to write a script to accomplish this task?  Or, is this just too complicated an operation?

    Photoshop Scripting-wise this seems fairly "easy".
    But I would recommend creating a template file (that already combines background image, png overlay and the Type Layers).
    Maybe data driven graphics would also be an option …
    Photoshop Help | Creating data-driven graphics

  • Can automator be set to always open certain files types?...

    Since screenshots (command/shift/4) always save as PNG files and these are not readable by most email programs, I am always manually converting these to JPGs in order to email the pic. I would like to create a workflow in Automator that would automatically convert ALL PNG files to JPG. Can this be done?
    I have created the workflow to convert specified PNG files, but this requires dragging the specific PNG file to the workflow each time. It would be great if automator automatically converted ALL PNG files. Any way to do this?
    Thanks!

    I must be doing something wrong. I think I have enabled and attached properly: I right-click on my desktop and enable folder actions and attach the workflow script I created following your instructions. My workflow has these 3 steps:
    1. Get specified finder items
    Name: desktop
    Path: (HD path to my desktop)
    2. Filter finder items
    Name extension is equal to .PNG (I've also tried PNG without the "." - doesn't seem to make a difference)
    3. Change type of images
    To type JPEG
    And if I look at the script by right-clicking the desktop again and selecting "edit a folder action" this is what it says:
    on adding folder items to this_folder after receiving added_items
    tell application "Macintosh HD:Users:marcgimbel:Library:Workflows:Applications:Folder Actions:jpeg converter 2.app"
    open added_items
    end tell
    end adding folder items to
    Any idea what I've done wrong? Thanks.

  • I can't restore the iPhone archive because a certain file is unrestorable

    Hello everyone, I'm new to this Discussion Board I've been an iPhone 3GS 32GB user for over a year now, and I decided to make an account here and start this topic, because I've got a really serious problem... As the topic title can give you a hint on what is going on, let me describe everything in detail:
    Not so long ago I had upgraded my iPhone with iOS 4.0 to 4.0.1 (I did that 1 day after the official release of the new version). 2 days ago, when I wanted to make a call, I came across an issue manifesting itself by iPhone nearly instantly showing "Call ended" and later on "Call failed", consecutively. It was happeninng so, regardless of whom I wanted to call. What's noticable is that I could send and receive text messages, as well as receive incoming calls, without any problems. Making some research on the Internet, I found out that similar issues had been occurring with the earlier versions of the OS. None of the solutions described (turning off the automatic date and time setting and so on) didn't help me, as well as turning the iPhoone on and off, trying to get into the DFU mode, and downgrading to iOS 4.0 (I couldn't downgrade anyway) which didn't help either. Not knowing what to do next, I restored my iPhone to the factory settings, losing, as obvious, all apps, text messages, contacts etc. along the way. After this restore I was able to make outgoing cals again but wanting to have all my text messages, I decided to load the newest backup onto my iPhone, and see what would happen. After loading the backup, I had all my contest back again but I was also again unable to make outgoing calls... (this proved that the issue was caused by some saved iPhone settings, or something similar, but not the iOS version itself). In this case I had nothing else to do, but to get back to the factory settings once again. As I cared abot keeping all my text messages, I read on the Internet the the way to save them is to copy the file called "3d0d7e5fb2ce288813306e4d4636395e047a3d28" from the backup folder. In the next step you were supposed to make a backup of the phone restored to the factory settings, and overrite the file in that backup with the one you had copied earlier (to spare myself any problems, I also copied the "31bb7ba8914766d4ba40d6dfb6113c8b614be442" file with the contacts). The problem turned out to be the fact that in the guide about all these files, there wasn't mentioned any information that you also should copy the following files: Info.plist, Manifest.plist i Status.plist (unfortunately, I found out about this fact later). I ompletely lost the rest of these files be deleting folders with the previous backup.
    So now, when I put the files I had copied earlier to the folder with the new backup, I am presented with this kind prompt while trying to restore: "iTunes cannot restore "iPhone (XXX)" because some files from the archive could not be restored" (or something similar because, since I have the Polish version of iTunes installed, I'm not sure how it is put in the original literally). I've tried to restore these *.plist files with some file recovery tools. These tools do find these files from the same day (that is, the 18th), but they differ from each other by the time they were last modified (some are from 12:19A.M., others from 3:20P.M. etc.), as well as they differ from the 2 files I had copied by the same manner. I assume that these differences in time (as well as in checksums that I found out about) cause the backup to not be seen by iTunes when I put these revovered *.plist (along with the 2 files that I had copied) in the backup folder. The same result occurrs when I recover these files with the long names the same way I had recovered the *.plist files, and put them in the backup folder with these *.plist files.
    I can't deny that I would really like to have all my text messages back.... Does anyoneone know how to import them back on the iPhone from that "3d0d7e5fb2ce288813306e4d4636395e047a3d28" file, because I'm getting really frustrated here I read it could be achieved by changing the *.plist files checksums if iTunes doesn't want to restore a backup the normal way. If this is the only way to do it (or if there are any other work arounds), please guide me on how to do it. I really need help

    fep516 wrote:
    Would you recommend upgrading again to Mountain Lion after the Snow Leopard upgrade?
    Yes, Lion and Mountain Lion are a significant upgrade from Snow Leopard, and they fully support iCloud syncing.
    First verify that your model number supports Mountain Lion (I'm pretty sure it does), then check how much RAM you have. Your model only comes with 1 GB (https://support.apple.com/kb/sp16), which is inadequate for later versions. Upgrade to 4 GB if you haven't already. The upgrade is a do-it-yourself project that will take 5 minutes if you are at all handy with modern electronics; you just remove the 1 GB DIMM and insert 2 2GB DIMMs. Here's an example of a memory upgrade kit: http://www.amazon.com/Kingston-Modules-Macbook-KTA-MB667K2-4GR/dp/B001265GI2/ref =sr_1_2?ie=UTF8&qid=1362357462&sr=8-2&keywords=imac+memory+2gb.
    This is not an endorsement of this vendor or this manufacturer; it is just a reference for the type of memory you need. (Not that there's anything wrong with Amazon or Kingston.)

  • Can you block file types???

    Can you block certain file types from playing to force users to have a standardized file type to be uploaded to the server?  For example, if we decide we do not want .wav files played on the server, is there a configuration setting to block/stop a .wav from playing from the server?  I want to standardize the server and force end users to copy only certain file types into the vod folder.

    That would be in the technology you use to upload the files.
    If you build out a server side solution that would upload files to your web server you could do that, but no, FMS is about streaming what's already there or creating new files.  It doesn't care how it got there...
    Something like this:  http://www.inaflashuploader.com/ might work for you.  ( I think there's a max size limit to the files you can upload. just FYI )
    **disclaimer i have not used this I just googled for a flash + php upload script **

  • How can i download mp3,mp4,flv,vedio,all tape file.

    how can i download mp3,mp4,flv,vedio,all tape file.

    If I understand the question correctly, you want to download certain file types and not play them. See
    [[Set how Firefox handles different types of files]]

  • How can a script access all link properties?

    I'm really glad to find this pool of expertise out in the cloud. TIA for all replies.
    I'm looking for proper syntax to access the more detailed properties of graphic file links, such as the page# on which they appear and effective PPI. These are visible in the link window, but I cannot find them in the ESTK for CS4 Object Model Viewer. There is are name, filePath, and linkType, which are all very useful and also visible in the link window. But as for the other info I see only a suggestive attribute called "properties" which is itself an object, and I cannot seem to query its contents.
    As I'm very, very new to scripting the cause could be little more than my own ignorance.
    Is there a way to convert and object to strings so I can see how it is built?
    In case anyone is interested, I'm trying to amplify a very helpful little script written three years ago by Steve Wareham:
    // ====== ListLinks ====== \\
    /* This is a JavaScript for InDesign. It will create a new text box on the first page of your document, and list all the links used in your document.
    A dialog box provides options to list the links names, files paths, and file types. Created by Steve Wareham 5/08/2007
    attempts to amplify with addition of Page and Effective PPP by Marc Shargel May 2010 */
    // ----- Dialog Box ------\\
    var myDialog = app.dialogs.add({name:"Link Lister", canCancel:true});
    with(myDialog){
    with(dialogColumns.add()){
    with(borderPanels.add()){
    with(borderPanels.add()){
    staticTexts.add({staticLabel:"What link information do you want? "});
    with(dialogColumns.add()){
    with(borderPanels.add()){
    var my1RadioButton = checkboxControls.add({staticLabel:"Names", checkedState:true});
    var my2RadioButton = checkboxControls.add({staticLabel:"Paths"});
    var my3RadioButton = checkboxControls.add({staticLabel:"File type"});
    var my4RadioButton = checkboxControls.add({staticLabel:"Page"});
    var my5RadioButton = checkboxControls.add({staticLabel:"Effective PPI"});
    // extending the dialogue box was easy...
    // ----- End of Dialog Box ----- \\
    //----- Begin ----- \\
    if(myDialog.show() == true){
    var myDocument = app.activeDocument;
    var totalLinks = myDocument.links.length;
    var myNewTextFrame = myDocument.textFrames.add() // Add a text frame to display the list of links
    myNewTextFrame.geometricBounds = [ "0p0", "0p0", "50p5", "50p5"];
    for ( i = 0;  i < totalLinks;  i++ )
    if (my1RadioButton.checkedState == true) {
    myNewTextFrame.contents = ( myNewTextFrame.contents + "File: " + myDocument.links.item(i).name );
    if (my1RadioButton.checkedState == true) {
    myNewTextFrame.contents = ( myNewTextFrame.contents + " Path: " + myDocument.links.item(i).filePath );
    if (my3RadioButton.checkedState == true) {
    myNewTextFrame.contents = ( myNewTextFrame.contents + " Type: " + myDocument.links.item(i).linkType );
    //... but the following lines do not work. I can refer to "myDocument.links.item(i).properties" but it is reported as an object.
    //if (my4RadioButton.checkedState == true) {
    //myNewTextFrame.contents = ( myNewTextFrame.contents + " Page#: " + myDocument.links.item(i).page );
    //if (my5RadioButton.checkedState == true) {
    // myNewTextFrame.contents = ( myNewTextFrame.contents + " PPI: " + myDocument.links.item(i).effectivePPI );
    myNewTextFrame.contents = ( myNewTextFrame.contents + '\r' );
    myDialog.destroy();

    Is there a way to convert and object to strings so I can see how it is built?
    Whoops, I'd meant to answer this. Sure, you can just loop over the object. For instance, since you were curious about the "properties" member, suppose we wanted to look at the individual members of the properties object of a link.
    Just type in the JavaScript console:
    { var p = app.activeDocument.links[0].properties; for (var i in p) $.writeln(i + "\t"+p[i]); }
    which produces:
    versionState     1986221653
    editingState     1986217301
    linkXmp     [object LinkMetadata]
    index     0
    parent     [object Image]
    assetURL    
    assetEtag    
    assetID    
    edited     false
    name     yeti.png
    needed     true
    status     1852797549
    linkType     Portable Network Graphics (PNG)
    date     Mon May 24 2010 15:36:52 GMT-0400
    size     113083
    filePath     Hermann Zapf:Users:writer:Desktop:yeti.png
    id     209
    label
    You'll note that these are all the same members that the links[0] object itself has. Again, "properties" is just a convenience for setting more than one at once. So compare the output to:
    { var p =  app.activeDocument.links[0]; for (var i in p) $.writeln(i +  "\t"+p[i]); }
    How does that work? Well, the syntax "for (i in p)" calls the for loop once for every member of the Object p, and then we print out the name of each member along with its value.
    (I guess the good JavaScript programmers would encourage you to put {}'s around the $.writeln, and the really anal people would remind you that JavaScript does not have block scope* and therefore you should wrap the whole thing in:
    "function(){ ... }()".
    (*:reference is to Javascript: The Good Parts; Awful Parts, a book (well, chapter thereof) well worth reading.))

  • I can't get video to loop exporting an OAM file and importing into Muse. Seems to ignore all triggers.

    I've tried everything I can think of, but triggers are ignored. I've tested in Safari and Firefox so far. Tested in Muse Preview. Tested in An. Nothing is paying attention to the trigger I have set up.
    I've used a label to get it to loop back to the beginning. I've used zero to get it to loop back. I've searched the web, YouTube, and here looking for answer none will fix this. No errors in the error box BTW. Been back to Lynda.com re-re-viewing videos. All seems fine, but it isn't.
    Website is here: http://www.moviesandfx.com. The animation on the home page is what I want to loop. It plays okay in Safari, has mixed results in Firefox. Not sure yet about IE, I'm on a Mac.
    I'd love to hear ideas to fix this. The workflow is An—>OAM export—>Muse "place"—>Muse publish to ftp.
    Thank you,
    Dan

    I'm having the same problem. I inserted the oam in Dreamweaver, where it loops forever in split and live view. As soon as I view it in a browser (Safari and Chrome), the looping is disabled. There are no console errors.

Maybe you are looking for