Batch automation - need to remove "choose" popup for folder selection in the automation

Am new to scripting, and am creating a script to batch automate CS5 .idml to CS4 .inx. I have found a few scripts out there close enough that I can modify, but they all include the same variable of selecting the folder to get the files to process. Even when I put the ("//server/directorypath/folder") in place, it still opens the popup to “choose” the folder I just told it to go to. In the end what I need is a place people can put their .idml files on the network and, through an action folder running the script from a dedicated machine with CS4, spit the .inx they need. I have figured out how to turn indd dialog/alerts on and off, but not this!
How can I make the “var myFolder =” be a fixed location?? Everything I try seems to create an exception later in the script
var myFolder = Folder.selectDialog("Select a folder with InDesign files to open");
if (myFolder == null) exit();
var myFilelist = [];
var myAllFilesList = myFolder.getFiles();

Thanks John, it took care of the popup, but presents alert stating “no files to open”. here is the full script I started out with. Aside from server location the only thing I changed was substituting indd with idml on line 20, and of course the file path. It also throws a “Done” alert at the end. I also moved the INTERACT_WITH_ALL (line 77) to the end, but isn't stopping the done alert.
// Export to interchange script.jsx
// Script for InDesign CS3.
// Opens all InDesign documents in selected folder
// and  exports them into 'Interchange Files' subfolder as inx files, which is created in the selected folder.
// Version 1.0
// Jan 28 2010
// Written by Kasyan Servetsky
// http://www.kasyan.ho.com.ua
// e-mail: [email protected]
var myInDesignVersion = Number(String(app.version).split(".")[0]);
var myFolder = Folder.selectDialog("Select a folder with InDesign files to resave");
if (myFolder == null) exit();
var myFilelist = [];
var myAllFilesList = myFolder.getFiles();
for (var f = 0; f < myAllFilesList.length; f++) {
    var myFile = myAllFilesList[f];
    if (myFile instanceof File && myFile.name.match(/\.indd$/i)) {
        myFilelist.push(myFile);
if (myInDesignVersion < 5) {
    alert("This script is for InDesign CS3/4.", "Export to interchange script");
    exit();
if (myFilelist.length == 0) {
    alert("No files to open.", "Export to interchange script");
    exit();
var myExportFolder = new Folder( myFolder.fsName + "/Interchange Files/" );
VerifyFolder(myExportFolder);
var myCounter = 1;
app.scriptPreferences.userInteractionLevel = UserInteractionLevels.NEVER_INTERACT;
// Progress bar -----------------------------------------------------------------------------------
var myProgressWin = new Window ( "window", "Export to interchange script" );
var myProgressBar = myProgressWin.add ("progressbar", [12, 12, 350, 24], 0, myFilelist.length);
var myProgressTxt = myProgressWin.add("statictext", undefined, "Starting exporting files");
myProgressTxt.bounds = [0, 0, 340, 20];
myProgressTxt.alignment = "left";
myProgressWin.show();
// Progress bar -----------------------------------------------------------------------------------
for (var i = myFilelist.length-1; i >= 0; i--) {
        var myCurrentFile = myFilelist[i];
        var myNewName = GetNameWithoutExtension(myCurrentFile) + ".inx";
    try {
        var myDoc = app.open(myCurrentFile, false);
        var myDocName = myDoc.name;
        var myDocFilePath = new File(myExportFolder.fsName + "/" + myNewName);
        // Progress bar -----------------------------------------------------------------------------------
        myProgressBar.value = myCounter;
        myProgressTxt.text = String("Exporting file - " + myDocName + " (" + myCounter + " of " + myFilelist.length + ")");
        // Progress bar -----------------------------------------------------------------------------------
        myDoc.exportFile(ExportFormat.INDESIGN_INTERCHANGE, myDocFilePath);
        myDoc.close(SaveOptions.NO);
        myCounter++;
    catch(e) {
        alert(e);
    // Progress bar -----------------------------------------------------------------------------------
    myProgressWin.close();
    // Progress bar -----------------------------------------------------------------------------------
app.scriptPreferences.userInteractionLevel = UserInteractionLevels.INTERACT_WITH_ALL;
alert("Done.", "Export to interchange script");
function VerifyFolder(myFolder) {
    if (!myFolder.exists) {
        var myFolder = new Folder(myFolder.absoluteURI);
        var myArray1 = new Array();
        while (!myFolder.exists) {
            myArray1.push(myFolder);
            myFolder = new Folder(myFolder.path);
        myArray2 = new Array();
        while (myArray1.length > 0) {
            myFolder = myArray1.pop();
            if (myFolder.create()) {
                myArray2.push(myFolder);
            } else {
                while (myArray2.length > 0) {
                    myArray2.pop.remove();
                throw "Folder creation failed";
function GetNameWithoutExtension(myFile) {
    var myFileName = myFile.name;
    var myIndex = myFileName.lastIndexOf( "." );
    if ( myIndex > -1 ) {
        myFileName = myFileName.substr(0, myIndex);
    return myFileName;

Similar Messages

  • What flash player to use on iPad 2 that is similar to Adobe Flash Player?  Need this to choose files for upload of assignments to my online university.  I started my profile using my iPad 2 and couldn't choose a picture to upload as well.  Hmm

    What flash player to use on iPad 2 that is similar to Adobe Flash Player?  Need this to choose files for upload of assignments to my online university.  I started my profile for this site using my iPad 2 and couldn't choose a picture to upload as well.  Hmm

    There is no "flash player similar to Adobe Flash Player". Flash is a proprietary Adobe product. There is currently no version of Flash for iOS.

  • HT1725 The files seems to be corrupted.  To redownload the file, choose "Check for Available Downloads" from the Store menu.

    While downloading apps from iTunes Store following error is repeatedly coming "The files seems to be corrupted.  To redownload the file, choose "Check for Available Downloads" from the Store menu."? Please suggest any solution.

    Contact itunes support.

  • Need to change screen colours for each system in the landscape

    hi ,
    we are in need of having different themes for different systems in the landscape .
    that is
    if i click development system , the screen with 'theme1'
    if i click quality system system , the screen with 'theme2'
    if i click production system system , the screen with 'theme3'
    how to configure this colour setting in accord to the system for all the users

    Hi Susin,
    You would do this by changing the parameter sapgui/theme for each system. It uses the Tradeshow theme by default as of Web AS 6.40. As long as the SAPgui itself is set to "System Dependant" then it should work fine.
    Regards,
    Nelis

  • Assign specific metadata for folder structures in the Content Server

    Assign specific metadata for folder structures in the Content Server
    Hi to all,
    I working with Oracle Content Server 10g and Desktop Integration Suite and I will like to know how can I restrict or enable some specific metadatas from the default metadata, for differents content folder. This is different from the function: Information Field Inherit Configuration.
    tnks!

    I am a bit unclear about your question:
    - do you ask about metadata assigned to folders, or
    - do you ask about metadata assigned to items in folders?
    Starting from #2, if you forget about folders, there is standard functionality that you can use to restrict, enable, ... metadata for an item. Read this chapter: http://docs.oracle.com/cd/E21764_01/doc.1111/e10978/c04_metadata.htm#sthref288 to get full details.
    I am not sure whether you can use anything of this functionality (profiles, option lists, etc.) when you check in a new folder. I doubt it, though. The logic of folders is slightly different - whilst e.g. profiles correspond to "content item", you don't find such a correspondence in folder's hierarchy (why a folder could not contain various content types, for instance?)
    Last question is, from where you want to use this functionality - even for items. In 10g, Desktop Integration Suite's functionality was rather limited (often it was supposed that a user will just 'throw' an item to a folder, and metadata will be inherited from folders). You might have to upgrade your DIS to 11g; it should work even with 10g Content Server, but make sure you verify it before mass upgrade. In 11g, DIS should offer profiles, etc. with full capabilities.

  • Extending Screens for Multi-Select in the LightSwitch HTML Client

    Hi i
    read Mike Droney's article of 
    Extending Screens for Multi-Select in the LightSwitch HTML Client
    But i just want to understand the code, so what is the ‘__isSelected’ property? from where does it come?
    why does the contentItem.value.details have an ‘__isSelected’ property?
    is the value of the contentItem not the screen?
    and also how can i implement the ‘Can Execute Code’ only if one or more check boxes are checked?
    Thanks  

    But i just want to understand the code, so what is the ‘__isSelected’ property? from where does it come?
    why does the contentItem.value.details have an ‘__isSelected’ property?
    is the value of the contentItem not the screen?
    and also how can i implement the ‘Can Execute Code’ only if one or more check boxes are checked?
    The '__isSelected' property is a private member of the class msls.ContentItem related to the backing data for the selected item.  That is to say, it would be a private member if JavaScript actually had encapsulation and information hiding like a typical
    object-oriented language. I like to reference David Herman's description from his book
    Effective JavaScript:
    Often, JavaScript programmers resort to coding conventions rather than any absolute enforcement mechanism for private properties. For example, some programmers use naming conventions such as prefixing or suffixing private property names with an underscore
    character (_). This does nothing to enforce information hiding, but it suggests to well-behaved users of an object that they should not inspect or modify the property so that the object can remain free to change its implementation.
    ...which means that it's generally not recommended to directly get or set backing data properties like __isSelected, instead working with the public property 'selectedItem', although it may work fine in certain cases like this one.
    To make _canExecute fire only when an item in the list is selected to enable a button method, try:
    return (screen.Contacts.selectedItem !== null);

  • TS4036 i need to remove my ios7 for my iphone 5 to be repaired how do i do this?

    my iphone hasbeen sent off to be repaired but they cant do this without me removing my ios7 from icloud how do i do this??

    Hey lisamaria1000,
    Thanks for the question. It sounds like you need to remove the phone from Find my iPhone (Activation Lock). To do so, follow these steps:
    Find My iPhone Activation Lock: Removing a device from a previous owner’s account
    http://support.apple.com/kb/TS4515
    Make sure the device is powered on and connected to a Wi-Fi or cellular network. Then contact the previous owner and ask them to follow these steps:
    1. Sign in to their iCloud account at www.icloud.com/find.
    2. Select the device from their Find My iPhone device list by clicking All Devices at the top of the screen.
    3. Erase the device by clicking the Erase button. This will erase all content and settings from the device. When prompted, do not enter a phone number or message. Click Next until the device is erased.
    4. When the erase is complete, click "Remove from Account" to remove the device from the account.
    After the device has been erased and removed from the account, you can proceed with the device setup process.
    Note: These directions may sound out of context for your situation, but don't worry, it's definitely what will fix the issue.
    Thanks,
    Matt M.

  • Need to remove white background for use on dark background

    Hi,
    I have a stock image of some people on a white background. I need to remove the white background so I can use the image in a project with a dark background. However when I put the edited subjects on the dark background, the people all have noticeable white borders around them which I assume means I am not getting all of the white out, especially around the hair. Can anyone recommend the best way of overcoming this? Thanks.

    Can anyone recommend the best way of overcoming this? Thanks.
    There is no single "best way". It all depends on the resolution of the image and its other quality properties. The - theoretically - cleanest and less workladden method would be to extract the luminance e.g. by converting to Lab mode and selecting the L channel, then adjust the channel range. However, if the foreground also contains lots of bright colors, clipping back the channel black and white points would also affect them and you'd need more adjustments to compensate or work with teh refine mask tool a lot to feather edges just like you would with a conventioan layer mask created from an interactive selection. On top of that you may also still need to apply all teh other dirty tricks like using a dark inner glow to cover up remaining bright areas or fill the outside with a dark color... Really depends, but you should be prepared to invest some time. Using longwinded manual painting and cloning may even be required...
    Mylenium

  • How to remove User IDs for deleted users from the Disk Quota list

    Hello,
    We have a computer lab setup with an Xserve managing 15 stations in the lab. Users are setup with networked home directories and quota's are setup on the drive containing the home directories to limit users' storage.
    The user account and the quota limit are setup with Workgroup Manager. When a student has been gone for a while and we are sure they no longer need the account we delete their account within Workgroup Manager and move their Home folder to the trash.
    When viewing disk usage in Server Admin (by selecting the volume and clicking the Quatas tab) user ids for deleted users are listed and it still shows the disk usage and quota settings for the user.
    How can I remove theses user ids from the quota list?
    Any help would be appreciated.
    Brian

    I would restore User's file structre back to normal just by copying from standby user?
    Did you mean copy files to a new user profile? If so, hope this link can be helpful for you
    http://windows.microsoft.com/en-in/windows/fix-corrupted-user-profile#1TC=windows-7
    For the unknown user, as you said, it's probably a user account from second OS or
    action. If you're annoying about this unknown user, then you can remove all occurrences of granted rights to the specified SID with this command icals [/remove[:g|:d]] <Sid>[...]] [/t] [/c] [/l] [/q]
    http://technet.microsoft.com/en-us/library/cc753525.aspx
    Yolanda Zhu
    TechNet Community Support

  • Need applescript to search Itunes then prompt for a selection from the results of the search.

    I have included my script below:
    set myPrefsFile to (choose file with prompt "Select a file to read:")
    set notfound to ((path to desktop folder) as string) & "notfound.txt"
    open for access notfound with write permission
    open for access myPrefsFile
    set AppleScript's text item delimiters to {","}
    set prefsContents to read myPrefsFile using delimiter {","}
    close access myPrefsFile
    set x to 0
    set theplaylist to "Temp"
    tell application "iTunes"
      make new user playlist with properties {name:"Temp-1"}
    end tell
    repeat number of items in prefsContents times
              set x to x + 1
              set track_name to item x of prefsContents
              tell application "iTunes"
                        get view of front window
                        tell library playlist 1
                                  set search_results to (search for track_name)
                                  copy search_results to theplaylist
                        end tell
                        repeat with a_track in search_results
      duplicate a_track to playlist "Temp-1"
                        end repeat
              end tell
              if search_results = {} then write track_name to file notfound
    end repeat
    close access file notfound

    Proximity will become available if you're using a index (Tools > Document Processing > Full Text Index with Catalog), which you can create with Acrobat Pro for just this single document if you place it in a folder by itself. You will also have to select "match all words" or whatever the exact wording is in the advanced seach panel.

  • Need a simple  UPDATE statement for updating areas of the polygons

    Hi,
    I need a simple UPDATE SQL statement for updating areas of the polygons in a table shema.table (geom) with sdo_area function.
    Dejan

    Dejan,
    Maybe I don't understand your question but I will offer this:
    update SOME_TABLE t set t.areasqft = SDO_GEOM.SDO_AREA(GEOM, 0.005) where t.geom.GET_GTYPE() = 3
    This assumes a "feet" based SRID.
    r,
    dennis
    Edited by: user633187 on Dec 1, 2008 9:04 AM

  • SUMIF Need to add £ to cells for certain category against the date

    Hello,
    I need some help.
    In Table 1 I have coloums for the Date, Amount & a Category.
    In Table 2 I would like to break down the Amount spent in a certain category in a certain month.
    SOOO if for example:
    £100 spent 1/may/13 on advertising
    £200 spent 9/may/13 on advertising
    £400 spent 4/oct/13 on fuel
    Then in Table 2:
    Under may row, under advertising coloum would say £300
    under oct row, under fuel coloum would say £400
    etc etc
    What is the formula i need for this????

    Here's the part of your image above that shows where the (non) action is taking place:
    I'm assuming that "April Earning" is the name of the table on the left and that the word Expenditure is in row 1 of that table.
    The syntax for SUMIFS, taken from the Function Browser, is shown below, and compared with your formula immediately below it. April Earnings is shortened to AE so that the formula elements line up reasonably well with the syntax diagram.
    =SUMIFS(sum-values,test-values,condition,test-values,condition)
    =SUMIFS(AE::D3:D19,AE::C3:C19,"="&A3,AE::B3:B19,"="&B1)
    sum-values: Error: Column D contains category names. These are text, and text is given a numerical value of 0, so if this were the only error, the sum is correct. The range should refer to the column containing the values to be summed—column C.
    First test-values,condition set: Error: Test 1 compares the contents of A3 (on the table on the right) to the contents of cells in column C in the table on the left. A3 contains "Advertising"; column C contains three numbers, formatted as currency. The word "Advertising" does not appear in column C; the test will return FALSE for all examples. Sum: 0. The range should refer to th column containing the bill categories—column D
    Second test-values,condition set: Correct. Test 2 compares values in column B of AE (month number) with the month number in B1 of the right hand table, and returns TRUE where the values match (row 3 of AE) and FALSE where they do not (all other rows of AE.
    Fixed and Relative cell references: When corrected, you will want to fill this formula down column B of the smaller table and across to the columns for the other months. When you do, the formula will return either incorrect results or error messages unless you fix some cell references.
    ranges: No matter where the formula resides, you want it to refer to the same range of rows in the same columns. Insert a fixed reference operator ( $ ) before each column and row label in each range in the formula. The range in test 2 should look like this:
    AE::$B$3:$B$19
    cell references:
    When you fill down, you want the A3 reference to move down to match the row in which the formula resides.
    When you fill right, you want the A3 reference to remain fixed on column A. Insert a fixed reference operator before the letter, but not before the number: $A3
    When you fill down, you want the B1 reference to remain fixed on row 1.
    When you fill right, you want the B1 reference to column A.right down to match the column in which the formula resides.
    Insert a fixed reference operator before the number, but not before the letter: B$1
    Regards,
    Barry

  • Alas, I updated to Lion and need to remove Appleworks from laptop. What, besides the application (folder) else do I need to remove. I am putting items onto a CD so I may be able to work on a Leopard machine.

    Alas, I updated to Lion and need to remove Appleworks from laptop.  I am putting items onto a CD so I may be able to work on a Leopard machine.What, besides the application (folder) else do I need to remove to the CD?

    (user)/Documents/AppleWorks 6 Button Bars (this is no longer used) and Appleworks User Data
    (user)/Library/Preferences/Appleworks (folder)

  • Do I need an external voltage converter for Spain or is the white box on the end of my MacBook Air cord enough?

    Do I need an external voltage converter for my trip to Spain, or is the white box on the end of my MacBook Air power cord enough of a converter?

    Thank you very much!  Apple telephone support couldn't come up with the answer.  I won't haul that heavy external voltage converter to Spain.  It weighs a lot!

  • I would like to create chapters within my footage for Scene selection on the DVD menu

    I have edited footage using FCPX and exported it to allow me to use it in IDVD. I now would like to set chapter markers so that the DVD menues allow for scene selection. I believe that I may have to do this in FCPX before exporting it
    Can you tell me how to do it.
    Thank you

    This is one of the most embarrassing omissions in FCP X. There is no proper facility to add chapter markers and export them with your movie.
    The way I get around it is to make each chapter a separate project in its own right. I then export each of the chapters and when I bring them into my DVD Authoring application, it's a synch to add the chapter markers (between each file on the timeline) with precision.
    As you've already created your project (presumably in one hit) create a new project for each chapter then copy and paste the relevant clips into each 'chapter' project, then export.
    Alternatively, you can add chapter markers from within the preview window in Compressor if you have it - but it's quite fiddley and not very precise.
    Andy

Maybe you are looking for