Cant get any Batch Script to run

Hello together,
first of, Thank you for this community.
It´s a shame, i can´t get any Batch script to run.
For example a PDF making Batch with a folder selection.
I always get the alert, no matching files found.
I use cs 5  on a  g 5 with osx 10.8.2
here is the script..  should not be a big thing !?
why does no file fit in the "mask" ?
here is the script
ADOBE SYSTEMS INCORPORATED
Copyright 2005-2006 Adobe Systems Incorporated
All Rights Reserved
NOTICE:  Adobe permits you to use, modify, and
distribute this file in accordance with the terms
of the Adobe license agreement accompanying it. 
If you have received this file from a source
other than Adobe, then your use, modification,
or distribution of it requires the prior
written permission of Adobe.
Export to PDFs.jsx
DESCRIPTION
This sample gets files specified by the user from the
selected folder and batch processes them and saves them
as PDFs.
Edits by Patrick Mineault:
- only .ai files processed
- files saved in same folder as the input files
- export files have name (oldname)_export.pdf
- PDF settings: non-editable / acrobatLayers=false
      for maximum compatibility with Preview
// Main Code [Execution of script begins here]
// uncomment to suppress Illustrator warning dialogs
// app.userInteractionLevel = UserInteractionLevel.DONTDISPLAYALERTS;
var destFolder, sourceFolder, files, fileType, sourceDoc, targetFile, pdfSaveOpts;
// Select the source folder.
sourceFolder = Folder.selectDialog( 'Select the folder with Illustrator .ai files you want to convert to PDF');
// If a valid folder is selected
if ( sourceFolder != null )
    files = new Array();
    fileType = "*.ai"; //prompt( 'Select type of Illustrator files to you want to process. Eg: *.ai', ' ' );
    // Get all files matching the pattern
    files = sourceFolder.getFiles( fileType );
    if ( files.length > 0 )
        // Get the destination to save the files
        //destFolder = Folder.selectDialog( 'Select the folder where you want to save the converted PDF files.', '~' );
        destFolder = sourceFolder;
        for ( i = 0; i < files.length; i++ )
            sourceDoc = app.open(files[i]); // returns the document object
            // Call function getNewName to get the name and file to save the pdf
            targetFile = getNewName();
            // Call function getPDFOptions get the PDFSaveOptions for the files
            pdfSaveOpts = getPDFOptions( );
            // Save as pdf
            sourceDoc.saveAs( targetFile, pdfSaveOpts );
            sourceDoc.close();
        alert( 'Files are saved as PDF in ' + destFolder );
    else
        alert( 'No matching files found' );
getNewName: Function to get the new file name. The primary
name is the same as the source file.
function getNewName()
    var ext, docName, newName, saveInFile, docName;
    docName = sourceDoc.name;
    ext = '_export.pdf'; // new extension for pdf file
    newName = "";
    for ( var i = 0 ; docName[i] != "." ; i++ )
        newName += docName[i];
    newName += ext; // full pdf name of the file
    // Create a file object to save the pdf
    saveInFile = new File( destFolder + '/' + 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 = true;
    pdfSaveOpts.enablePlainText = true;
    pdfSaveOpts.generateThumbnails = true; // default
    pdfSaveOpts.optimization = true;
    pdfSaveOpts.pageInformation = false;
    pdfSaveOpts.preserveEditability = false;
    return pdfSaveOpts;
is my problem really that stupid ?
is it only working in cs 3  ?

Mr. Schneider, Brilliant =) and weired
on windows 7 it runs perfectly. even with the prompt commented out ?!?!?!
Why is it not working on a maC ?
now i have so many more ideas to optimize my workflow...
i´am not shure how to get into this ..
if i have to send out datafiles i have to do several things.
1.collect images and fonts
2. throw unused colors away
3. check if there is white overprinted,if yes fixing it.
4. put black on overprinting
5.clean up empty textfields, unfilled objects, and usesless anchorpoints
6.unlock everything
7. save the ai
8.convert in paths
9.save an *_path.ai
10.make a printable PDF with our XYZ. Joboptions
11. preview pdf, optional with a watermark sized 100% 100% to the artboard / artboards
12. wonderfull would be a print out
this is just a wishlist.. i want to learn it. . how to do
will be a hell of scripting or not ?
is it usefull to do somethings in an action and load the action as a script ?
In scriptinghappiness best greetings from Germany..

Similar Messages

  • I reset all the settings last night, now I cant get any icons up, plus I'm on a local computer that cant download itunes, anyone know how i can get my screen back to normal? All it shows is the itunes sybol with the usb cord connecting to it.

    I reset all the settings last night, now I cant get any icons up, plus I'm on a local computer that cant download itunes, anyone know how i can get my screen back to normal? All it shows is the itunes sybol with the usb cord connecting to it.

    Your only option at this point is to connect the device to a computer running iTunes so you can restore it.
    B-rock

  • Satellite Pro L40 - I cant get any software download

    I have had to use the Toshiba Product recovery disc but now I cant get any software download, everytime I try all I get is Unknown Publisher!!!
    Can anyone help or advise me what I can do to fix this problem, Thanx

    Hi!
    To be honest I dont know what you mean.
    What software do you try to download and where do you download them? What OS do you have?
    Can you post a screenshot or something else?
    I dont know what internet browser do you use but I use always Firefox and never had problems with this browser.
    Bye

  • I cant get any gems in clash of clans with my iTunes card i go into the game and click buy but it says unable to purchase and i have added $20 to my account is it because my ipad is jailbroken?Help!!

    I cant get any gems in clash of clans with my iTunes card i go into the game and click buy but it says unable to purchase and i have added $20 to my account is it because my ipad is jailbroken?Help!!

    Possibly, but jailbroken devices aren't supported by Apple or these forums.

  • Hi Guys,  My iPhone is stuck in a mode where it thinks the headset is still plugged in.   I cant get any sounds through the speaker. Cant hear sms or emails arrive. If the phone rings i hear it but pple cant hear me or i cant hear them.  The phone works f

    Hi Guys,
    My iPhone is stuck in a mode where it thinks the headset is still plugged in.
    I cant get any sounds through the speaker. Cant hear sms or emails arrive. If the phone rings i hear it but pple cant hear me or i cant hear them.
    The phone works fine with the headphones plugged in.
    I have tried all the usual solutions, inserted and removed the headset (at least 50 times)
    Soft reboot
    full restore
    Nothing seems to work. I have searched on this and it seems to be a well know issue but there doesnt seem to be any firm solutions that i can find to fix the problem

    If no change after inserting and removing the headset at least 50 times, powering the iPhone off and on, an iPhone reset, and restoring the iPhone with iTunes as a new iPhone or not from the backup, the iPhone has a hardware problem.
    Make an appointment at an Apple Store if there is one nearby.

  • I cant get any pop ups to open? i have allowed sites and still cant get anything, so turned off and still cant enlarge pictures etc thru a pop window

    i have firefox version 3.6.10, and until about a week ago, i had no problems clicking on pictures (example: on ebay) to enlarge them in a new pop window. i have tried disabling the pop up blocker completely, even though i had ebay as an "allow" site on my pop up blocker when it was enabled.
    cant get any pop up to go through. in the lower left hand corner of the window, when i click on a link that should open a pop up window, all it shows is "javascript:;" and nothing happens
    i have updated to the newest version of java and deleted older version.. still having issues

    Ouch, tough spot, but offhand I'd say some memory may have gone bad, or maybe just needs re-seating after all this time.
    Not much you can do, but try this anyway...
    PRAM reset, CMD+Option+p+r...
    http://support.apple.com/kb/ht1379
    In fact, do 3 in a row, takes a bit of time.

  • After doing a factory reset my iphone 3g recongnises o2 as its primary carrier but i cant get any signal at all so please anybody do know how to fix this?

    after doing a factory reset my iphone 3g recongnises o2 as its primary carrier but i cant get any signal at all so please anybody do know how to fix this?

    hi peter, that was the plan to get o2 to unlock the which they do 4 £15 but as i cant get any network signal signal of them (but i am getting a 3g signal as i can access the internet???) o2 are saying there is nowt they can do. i still get no signal after doing a factory reset which in a perfect world should reset my network back to o2 but no signal only getting 3g.im at lost now on how to restore the network im sure its something to do with the carrier signal ?

  • HT4528 i recently switched to an android and now i cant get any messages from other iphone users due to imessage. how do i fix this?

    i recently switched to an android and now i cant get any messages from other iphone users due to imessage. how do i fix this?

    As Peter noted and please pay attention to this line
    "If you can't deactivate iMessage after you perform the steps above or you can't access the iPhone, please contact Apple Support"

  • TS1398 i have recently bought an i-phone of a friend of mine after he renewed his contract, it is an i-phone 4, i cant get any service to my phone ,can anybody help

    i have recently bought an i-phone of a friend of mine after he renewed his contract, it is an i-phone 4, i cant get any service to my phone ,can anybody help
    it has been unblocked i think

    Do you have an active sim card in the iphone?

  • I migrated a user from another mac and cant get any updates to install!

    Hi
    I migrated a user from another mac and cant get any updates to install, for example it says iPhoto is intalled but its not, i never copied it from the older imac, and i cant download it to this one now
    any help appreciated

    Try setting up another admin user account to see if the same problem continues. If Back-to-My Mac is selected in System Preferences, the Guest account will not work. The intent is to see if it is specific to one account or a system wide problem. This account can be deleted later.
    Isolating an issue by using another user account
    If the problem is still there, try booting into the Safe Mode using your normal account.  Disconnect all peripherals except those needed for the test. Shut down the computer and then power it back up after waiting 10 seconds. Immediately after hearing the startup chime, hold down the shift key and continue to hold it until the gray Apple icon and a progress bar appear. The boot up is significantly slower than normal. This will reset some caches, forces a directory check, and disables all startup and login items, among other things. When you reboot normally, the initial reboot may be slower than normal. If the system operates normally, there may be 3rd party applications which are causing a problem. Try deleting/disabling the third party applications after a restart by using the application un-installer. For each disable/delete, you will need to restart if you don't do them all at once.
    Safe Mode
    Safe Mode - About

  • TS1424 My Apple ID has been disabled. I have tried everything and cant get any help correcting it. Any suggestions?? Please help!! I have 25 updates and can't update anything

    My Apple ID has been disabled. I have tried everything and cant get any help correcting it. Any suggestions?? Please help!! I have 25 updates and can't update anything

    http://www.apple.com/support/contact/

  • I cant get any FRee app from apple store After upgrade ios7.0.4 and reset my apple id pass. What should i do? It says u should give your master or... Card number but i dont have any,befor this it wasn't like this i could get free apps

    I Cant get any FREe apps from apple store after i upgrade ios7.0.4 and reset my apple id password. It says u should give your card number but i did'nt have any begor this i could get free apps but now i cant ,what should i do?

    Hi Sognam,
    If you are having issues with the billing information on your Apple ID account for free apps on the iTunes Store, you may find the following article helpful:
    iTunes Store: Changing your payment information
    http://support.apple.com/kb/ht1918
    Regards,
    - Brenden

  • I cant get any volume from YouTube video with safari.  With Chrome it's OK

    I cant get any audio volume from YouTube video playing in Safari.  In Chrome its OK

    1. System Preferences >  Flash Player > Advanced >  Delete  All
         Press the "Delete All" button under “Browsing Data and Settings”.
         Install Adobe Flash Player.
        http://get.adobe.com/flashplayer/
       Download it first.
       The next step is important.
       Click Safari in the menubar and select “Quit Safari”.
        Follow the prompts and install it.
        Restart computer. Relaunch Safari.
    2.  Allow  Plug-ins
        Safari > Preferences > Security
        Internet Plug-ins >  "Allow  plug-ins"
        Enable it.
    3. Safari > Preferences > Privacy  > Cookies and website data:
        Press the “ Remove All Website Data” button.
        Press the “Details” button.
        Remove YouTube related cookies.
    4. Safari > Preferences > Extensions
        Turn those off and relaunch Safari.
        Turn those on one by one and test.

  • I cant get any iTunes songs

    I cant get any iTunes
    songs

    If you are in the U.S., then download them from the cloud:
    http://www.apple.com/icloud/

  • I just bought a new 2TB time capsule and I am so frustrated that I cant get any help!!!!!

    Yesterday, I bought a new (4th gen) 2TB TC to replace by mid 2007 500gb TC. I did this simple to upgrade the wirelass capability to the very latest as the wifi in our home is intermittent. I also bought a Zepplin recently so that i could use Airplay to stream music but the wifi is also intermittent, it works when it wants to and not usually when when i want it too!! Hence the purchase of a new TC for £249.
    The instructions on the Apple site and in the instruction book all say it is so easy to set up the TC and the wireless network.
    So here I am , 24 hours later and frustrated at having spent hours and hours and gotten no-where. Ive logged calls with Apple Support and even though I am sat by the phone they keep emailing me saying they've tried to reach me and if I still need help then to rearrange a call!! But I'm here!!!
    Here's my problem (apart from the desire to take the TC back and get a refund)...
    - when I open Airport Utility (6.2), I get a picture that shows the world and the word Internet with a line to the time capsule but all the instructions that I have found and read say that I should get a dialogue box that lists the devices on the left hand side. The instructions with the TC say I open AU and follow the instructions and prompts - what instructions and prompts, there arnt any!!!
    - also, the picture does NOT pick up the 2 airport expressess in the house that I used to extend the wirelass network on the previous TC
    - there is no option to extend the wireless network
    - every now and then the TC light goes Yellow and airport utility "looses" the TC
    - TC seems to want to back up the entire MAC (c350gb) but it is doing so at a very slow speed and only did about 2.5gb over night. I dont mind a whole new backup to the new TC but it cant be right that it will take 19 days (the last time I looked!)
    My main frustration is that the so-called simple instructions dont seem to replate at all to my system and I'm frustrated because I dont know where to go to get any help....and if Apple email me one more time to say they cant reach me then I will definately take the TC back!!
    Can anyone help me?
    p.s. sorry for the rant, i though this would be a half hour job to upgrade my wirelass and is turning into a nightmare!

    Unfrotunately, this sounds like a dead TC.
    - also, the picture does NOT pick up the 2 airport expressess in the house that I used to extend the wirelass network on the previous TC
    - there is no option to extend the wireless network
    You need to reconfigure the Expresses to rejoin the TC's network via a factory reset.

Maybe you are looking for