Printing items in a folder problem - help

Ok, I've created a workflow that basically goes like this:
Get specified items
Get folder contents
Filter contents for text files
Print text files
Move text files to somewhere else
I then save it as a folder action plug in and assign it to a specific folder so that the script runs when I insert a file into the folder. When I do, the script runs ok, goes through all the steps, opens up Printer Setup Utility and the Print dialog but nothing comes out the printer.
If I look at the completed items list on the printer, it shows like the file was completed but the printer never actually printed anything.
Is this a problem with the printer driver or with Automator? Anyone have an idea what might be happening? If I substitute "Print File" for any other command like "Open File" it works great. It seems the problem is somewhere in the printer. If I open the file and Print it, everything works.
Is there anyway I can get the script to not open the Printer Setup Utility and the Print Dialog box?
iMac G5 17"   Mac OS X (10.4.7)  

Iam not able to set the main folder's (i.e INPRISE) acl (MyAcl) on the subfolder "MyFolder" because the owner of MyAcl is "system" whereas the owner of MyFolder is user "i1" .Which is the best way of solving these ownership issue which iam running into ? I want to be able to create different folders ,assign a group of uers to each of the folders who can create as well as modify,delete each other's folders/documents (as i have mentioned in my first post in this thread) ?
thanks
Srinivas

Similar Messages

  • Problem creating items in a folder owned by another user

    Hi
    Iam getting an exception when i try to create a folder owned (or shall i say) created by another user.Let me explain what iam doing :
    1. I have created a folder "INPRISE" under "/home".I have
    created an ACL "MyAcl" having group INPRISEGROUP
    as the ACE having all permissions.I have set the ACL "MyAcl" on the folder "INPRISE".
    2. I have created two users i1 and i2
    and placed them in the group INPRISEGROUP .Both these users have a link under thei home folder to "INPRISE" folder(achieved by using and addItem()).
    3. I could successfully login as i1 and create a folder "WebApps" under "INPRISE" and upload a document "A.txt" under "WebApps".
    4.But when i log in as "i2" and try to create a document "B.txt" under "WebApps" which was created by user "i1" i get the following exception :
    javawebserver: Got the user
    javawebserver: got the primary user profile
    javawebserver: THE HOME FOLDER IS --> i1
    javawebserver: The home folder name is --> i1
    javawebserver: home folder
    javawebserver: Got the user
    javawebserver: got the primary user profile
    javawebserver: THE HOME FOLDER IS --> i1
    javawebserver: The home folder name is --> i1
    javawebserver: home folder
    javawebserver: Got the user
    javawebserver: got the primary user profile
    javawebserver: THE HOME FOLDER IS --> i1
    javawebserver: The home folder name is --> i1
    javawebserver: home folder
    javawebserver: **********Creating document in /home/i1/INPRISE/WebApps
    javawebserver: Created document..
    javawebserver: Setting permissions for the document....
    javawebserver: setting the access level
    javawebserver: Got the user
    javawebserver: got the primary user profile
    javawebserver: THE HOME FOLDER IS --> i2
    javawebserver: The home folder name is --> i2
    javawebserver: home folder
    javawebserver: Got the user
    javawebserver: got the primary user profile
    javawebserver: THE HOME FOLDER IS --> i2
    javawebserver: The home folder name is --> i2
    javawebserver: home folder
    javawebserver: Got the user
    javawebserver: got the primary user profile
    javawebserver: THE HOME FOLDER IS --> i2
    javawebserver: The home folder name is --> i2
    javawebserver: home folder
    javawebserver: **********Creating document in /home/i2/INPRISE/WebApps
    javawebserver: Error while creating document.....
    javawebserver: oracle.ifs.common.IfsException: IFS-30002: Unable to create new
    LibraryObject
    javawebserver: oracle.ifs.common.IfsException: IFS-30048: Insufficient access t
    o add items to a Folder
    javawebserver: oracle.ifs.common.IfsException: IFS-30030: Permission not grante
    d on specified ACL
    javawebserver: at java.lang.Throwable.<init>(Compiled Code)
    javawebserver: at java.lang.Exception.<init>(Compiled Code)
    javawebserver: at org.omg.CORBA.UserException.<init>(Compiled Code)
    javawebserver: at oracle.ifs.common.IfsException.<init>(Compiled Code)
    javawebserver: at oracle.ifs.common.IfsException.<init>(Compiled Code)
    javawebserver: at oracle.ifs.common.IfsException.<init>(Compiled Code)
    javawebserver: at oracle.ifs.server.S_AccessControlList.verifyStandardPermissi
    onEnabled(S_AccessControlList.java:602)
    javawebserver: at oracle.ifs.server.S_PublicObject.verifyPublicObjectPermissio
    n(S_PublicObject.java:2169)
    javawebserver: at oracle.ifs.server.S_Folder.verifyCanAddItem(S_Folder.java:10
    05)
    javawebserver: at oracle.ifs.server.S_Folder.addReference(S_Folder.java:719)
    javawebserver: at oracle.ifs.server.S_Folder.addReference(S_Folder.java:697)
    javawebserver: at oracle.ifs.server.S_PublicObject.postCreateAddToFolder(S_Pub
    licObject.java:2753)
    javawebserver: at oracle.ifs.server.S_PublicObject.extendedPostInsert(S_Public
    Object.java:995)
    javawebserver: at oracle.ifs.server.S_LibraryObject.postInsert(S_LibraryObject
    .java:1341)
    javawebserver: at oracle.ifs.server.OperationState.executeAtomicOperations(Com
    piled Code)
    javawebserver: at oracle.ifs.server.S_LibraryObject.createInstance(S_LibraryOb
    ject.java:2348)
    javawebserver: at oracle.ifs.server.S_LibrarySessio n.newLibraryObject(S_Librar
    ySession.java:6596)
    javawebserver: at oracle.ifs.server.S_LibrarySession.newPublicObject(S_Library
    Session.java:6637)
    javawebserver: at oracle.ifs.server.S_LibrarySession.newPublicObject(S_Library
    Session.java:6619)
    javawebserver: at oracle.ifs.server.S_LibrarySession.DMNewPublicObject(S_Libra
    rySession.java:6407)
    javawebserver: at oracle.ifs.beans.LibrarySession.DMNewPublicObject(LibrarySes
    sion.java:6913)
    javawebserver: at oracle.ifs.beans.LibrarySession.NewPublicObject(LibrarySessi
    on.java:4564)
    javawebserver: at oracle.ifs.beans.LibrarySession.createPublicObject(LibrarySe
    ssion.java:2562)
    javawebserver: at oracle.ifs.utils.common.PublicObjectUtilities.createDocument
    (PublicObjectUtilities.java:537)
    javawebserver: at oracle.ifs.utils.common.PublicObjectUtilities.putAsDocumentW
    ithVersioning(PublicObjectUtilities.java:163)
    javawebserver: at oracle.ifs.adk.filesystem.IfsFileSystem.createDocument(IfsFi
    leSystem.java:922)
    javawebserver: at dp.DPDocManager.uploadDocument(DPDocManager.java:374)
    javawebserver: at ifs.jsp_sbin._dp._dpDoc._jspService(_dpDoc.java:115)
    javawebserver: at oracle.ifs.protocols.http.jsp.pagecompile.jsp.runtime.HttpJs
    pBase.service(HttpJspBase.java:94)
    javawebserver: at javax.servlet.http.HttpServlet.service(Compiled Code)
    javawebserver: at oracle.ifs.protocols.http.jsp.IfsJspServlet.runServlet(IfsJs
    pServlet.java:865)
    javawebserver: at oracle.ifs.protocols.http.jsp.IfsJspServlet.processJspPage(C
    ompiled Code)
    javawebserver: at oracle.ifs.protocols.http.jsp.IfsJspServlet.service(IfsJspSe
    rvlet.java:240)
    javawebserver: at javax.servlet.http.HttpServlet.service(Compiled Code)
    javawebserver: at com.sun.server.ServletState.callService(ServletState.java:22
    6)
    javawebserver: at com.sun.server.ServletManager.callServletService(ServletMana
    ger.java:936)
    javawebserver: at com.sun.server.ProcessingState.invokeTargetServlet(Processin
    gState.java:423)
    javawebserver: at com.sun.server.http.HttpProcessingState.execute(HttpProcessi
    ngState.java:79)
    javawebserver: THE ERROR MESSAGE IS IFS-30002: Unable to create new LibraryObje
    ct
    javawebserver: Setting permissions for the document....
    javawebserver: setting the access level
    javawebserver: at com.sun.server.http.stages.Runner.process(Runner.java:79)
    javawebserver: at com.sun.server.ProcessingSupport.process(Compiled Code)
    javawebserver: at com.sun.server.Service.process(Service.java:204)
    javawebserver: at com.sun.server.http.HttpServiceHandler.handleRequest(HttpSer
    viceHandler.java:374)
    javawebserver: at com.sun.server.http.HttpServiceHandler.handleRequest(Compile
    d Code)
    javawebserver: at com.sun.server.HandlerThread.run(Compiled Code)
    javawebserver:
    javawebserver:
    javawebserver: Error during JSP page processing: /ifs/jsp-bin/dp/dpDoc.jsp
    javawebserver: java.lang.NullPointerException
    The Code is :
    package dp;
    import oracle.ifs.beans.*;
    import oracle.ifs.common.*;
    import oracle.ifs.beans.parsers.*;
    import oracle.ifs.adk.security.*;
    import oracle.ifs.adk.filesystem.*;
    import java.io.*;
    import java.util.Locale;
    import javax.servlet.http.*;
    * The document manager bean for the Deal Planner app.
    * <p>
    * This class provides a login session/creates a new account in the IFS. The class
    * implements the <code>IfsHttpLogin</code> interface so it can share login data with other
    * beans.
    * @author Srinivas Sampige
    * @version 1.0
    * @see IfsHttpLogin
    public class DPDocManager implements IfsHttpLogin
    private String userName = "";
    private LibrarySession ifsSession = null;
    private FolderPathResolver fPathResolver = null;
    private IfsFileSystem ifsFileSystem; // File System object
    public DPDocManager()
    {//does nothing
    *Creates a new account in the IFS for
    *a new deal when the deal code is passed in.
    *@ param dealCode The deal code of the deal for which an account has to be created
    *@ param password A system generate d password for the account being created.
    *@ return String Will return "SUCCESS" on creating the account or the reason if an
    * error occurrs.
    public String createDealFolder(String dealCode)
    String result = "SUCCESS";
    try
    ifsSession = getIfsConnection("system","manager","ServerManager","i5ifs");
    ifsSession.setAdministrationMode(true);
    //create a new folder for this deal
    Folder dealFolder = createFolder("/home",dealCode);
    //create a group for this deal;place the group as
    //an access control entry in an access control list.
    //Set the access control list to the folder.
    AccessControlList acl = createDealGroup(dealCode);
    dealFolder.setAcl(acl);
    ifsSession.setAdministrationMode(false);
    }catch(IfsException ie)
    int code = ie.getErrorCode();
    System.out.println("THE ERROR CODE WHILE CREATING DEAL FOLDER IS -- "+code);
    ie.printStackTrace();
    result = ie.getMessage();
    return result;
    }//createDealFolder
    public String createUser(String userId,String password,String dealCode)
    String result = "SUCCESS";
    System.out.println("Creating user and adding to a group "+userId);
    try
    this.ifsSession = getIfsConnection("system","manager","ServerManager","i5ifs");
    ifsSession.setAdministrationMode(true);
    System.out.println("Logged in successully");
    //form the XML necessary for creating the simple user;
    //the new user in the IFS will be the Deal.User id will be the deal code;
    //password is fetched from the DEALS table.
    String simpleUserString = "<?xml version = '1.0' standalone = 'yes'?>\n"
    + "<SimpleUser>\n"
    + " <UserName>"+userId+"</UserName>\n"
    + " <Password>"+userId+"</Password>\n"
    + " <HomeFolderRoot>/home</HomeFolderRoot>\n"
    + "</SimpleUser>\n";
    System.out.println("Parsing "+simpleUserString);
    //invoke the XML parser for creating the new user
    StringReader userDefinition = new StringReader(simpleUserString);
    SimpleXmlParser xmlParser = new SimpleXmlParser(ifsSession);
    xmlParser.parse(userDefinition,null,null);
    //a valid user for a deal must belong to the deals group;add the user
    //to the appropriate group for the deal
    String userToGroupString = "<?xml version = '1.0' standalone = 'yes'?>\n"
    + "<DirectoryGroup>\n"
    + " <Update reftype='Name'>" + dealCode+"Group" + "</Update>\n"
    + " <Members>"
    + " <Member reftype='Name'>" + userId + "</Member>"
    + " </Members>"
    + "</DirectoryGroup>\n";
    //invoke the XML parser for adding the new user to the group
    StringReader groupUpdate = new StringReader(userToGroupString);
    xmlParser = new SimpleXmlParser(ifsSession);
    LibraryObject lo = xmlParser.parse(groupUpdate,null,null);
    System.out.println ("The LO returned by parse is " + lo);
    //link this user's home folder to the deal folder
    Collection c = ifsSession.getDirectoryUserCollection();
    DirectoryUser du = (DirectoryUser) c.getItems(userId);
    System.out.println("The DirectoryUser created is " + du.getDistinguishedName());
    //Folder homeFolder = (Folder) getIfsFileSystem().findPublicObjectByPath("/home/"+dealCode);
    Folder homeFolder = du.getPrimaryUserProfile().getHomeFolder();
    System.out.println("Home folder is"+homeFolder);
    homeFolder.addItem((Folder)getIfsFileSystem().findPublicObjectByPath("/home/"+dealCode));
    System.out.println("Created a link to the deal folder... ");
    ifsSession.setAdministrationMode(false);
    }catch(IfsException ie)
    IfsException.setVerboseMessage(true);
    ie.printStackTrace();
    return result;
    }//public
    /* public String addUserToGroup(String groupName)
    try
    InternetFileSystem ifs = getFileSystem();
    ifs.findPublicObjectByPath(goupName);
    }catch(IfsException ie)
    ie.setVerboseMessage(true);
    System.out.println("Problem while adding user to the group "+ie.getMessage());
    ie.printStackTrace();
    }//addUserToGroup
    *This method creates a group that for a particular deal.
    *All members having access to this deal must belong to thi                                                                                                            s
    * group.
    public AccessControlList createDealGroup(String dealCode)
    AccessControlList acl = null;
    try
    DirectoryGroupDefinition def = new DirectoryGroupDefinition(ifsSession);
    def.setAttribute("NAME",AttributeValue.newAttributeValue(dealCode+"Group"));
    DirectoryGroup dealGroup = (DirectoryGroup)ifsSession.createPublicObject(def);
    AccessControlListDefinition aclDef = new AccessControlListDefinition(ifsSession);
    AccessControlEntryDefinition aceDef = new AccessControlEntryDefinition(ifsSession);
    AccessLevel aLevel = new AccessLevel();
    aLevel.enableAllStandardPermissions();
    aLevel.disableStandardPermission(AccessLevel.ACCESSLEVEL_ADDITEM);
    aLevel.disableStandardPermission(AccessLevel.ACCESSLEVEL_CREATE);
    aLevel.disableStandardPermission(AccessLevel.ACCESSLEVEL_ALL);
    aceDef.setGrantee(dealGroup);
    aceDef.setDistinctAccessLevel(aLevel);
    aclDef.addAceDefinition(aceDef);
    acl = (AccessControlList) ifsSession.createPublicObject(aclDef);
    acl.setName(dealCode+"ACL");
    }catch(IfsException ie)
    System.out.println("error while creating group for deal");
    IfsException.setVerboseMessage(true);
    ie.printStackTrace();
    return acl;
    }//createUser
    *makes a connection the the IFS and returns the LibrarySession object.
    *@param userName user name for a valid IFS account.
    *@param password password for a valid IFS account.
    *@param serviceName the IFS service name.
    *@param schemaPassword the IFS schema password.
    private LibrarySession getIfsConnection(String username, String password, String serviceName,
    String schemaPassword) throws IfsException
    LibraryService service = new LibraryService();
    CleartextCredential me = new CleartextCredential(username, password);
    ConnectOptions connection = new ConnectOptions();
    connection.setLocale(Locale.getDefault());
    connection.setServiceName(serviceName);
    connection.setServicePassword(schemaPassword);
    ifsSession = service.connect(me, connection);
    fPathResolver = new FolderPathResolver(ifsSession);
    ifsFileSystem = new IfsFileSystem(ifsSession);
    return ifsSession;
    }//getIfsConnection()
    public String loginToIfs(String userName,String password,String serviceName,String schemaPassword)
    String result = "SUCCESS";
    try
    getIfsConnection(userName,password,serviceName,schemaPassword);
    this.userName = userName;
    //getResolver().setHomeFolder("/home/"+userName);
    }catch(IfsException ie)
    int code = ie.getErrorCode();
    System.out.println("ERROR CODE "+code);
    result = "FAILED -- "+code+" -- "+ie.getMessage();
    System.out.println("Failed to login "+ie.getMessage());
    ie.printStackTrace();
    return result;
    }//loginToIfs
    public LibrarySession getSession()
    return ifsSession;
    }//getSession()
    public FolderPathResolver getResolver()
    return fPathResolver;
    public IfsFileSystem getIfsFileSystem()
    return ifsFileSystem;
    public Folder getHomeFolder()
    Folder homeFolder = null;
    try
    DirectoryUser user = ifsSession.getUser();
    System.out.println("Got the user");
    PrimaryUserProfile primary = user.getPrimaryUserProfile();
    System.out.println("got the primary user profile");
    homeFolder = primary.getHomeFolder();
    System.out.println("THE HOME FOLDER IS --> "+homeFolder);
    System.out.println("The home folder name is --> "+homeFolder.getName());
    }catch(IfsException ie)
    ie.printStackTrace();
    System.out.println("home folder");
    return homeFolder;
    }//getHomeFolderPath()
    * Called when this object is bound to the HTTP session object.
    * @param event The event when the object is bound to the Http session.
    public void valueBound(HttpSessionBindingEvent event)
    // do nothing
    * Called when this object is unbound from the HTTP session object.
    * @param event The event when the object is unbound to the Http session.
    public void valueUnbound(HttpSessionBindingEvent event)
    //release the reources like the ifsSession etc.
    fPathResolver = null;
    try
    if (ifsSession != null)
    ifsSession.di sconnect();
    }catch (IfsException e)
    e.printStackTrace();
    finally
    ifsSession = null; // release the resources
    }//valueUnbound()
    public Folder createFolder(Folder destinationFolder,String theNewFolderPath)
    Folder createdFolder = null;
    try
    System.out.println("<*---*> IN THE FOLDER "+destinationFolder);
    IfsFileSystem ifs = getIfsFileSystem();
    System.out.println("Creating the folder..");
    createdFolder = ifs.createFolder(theNewFolderPath,destinationFolder,true,null);
    System.out.println("Created the folder..");
    }catch(IfsException ie)
    System.out.println("ERROR CREATING A FOLDER IN THE DESTINATION FOLDER");
    IfsException.setVerboseMessage(true);
    ie.printStackTrace();
    return createdFolder;
    }//createFolder(String inTheFolder,theNewFolder)
    public Folder createFolder(String inTheFolder,String theNewFolderPath)
    Folder createdFolder = null;
    try
    System.out.println("<*---*> IN THE FOLDER "+inTheFolder);
    IfsFileSystem ifs = getIfsFileSystem();
    System.out.println("Creating ANOTHER folder for test");
    Folder destinationFolder = (Folder) ifs.findPublicObjectByPath("/"+inTheFolder);
    System.out.println("The destination folder is "+destinationFolder);
    /* Folder destinationFolderMyTest = (Folder) ifs.findPublicObjectByPath("/home/c6/COREL/MY-TEST/");
    System.out.println("The destination folder my test is "+destinationFolderMyTest);*/
    createdFolder = ifs.createFolder(theNewFolderPath,destinationFolder,true,null);
    /* System.out.println("Created folder in destination folder ");
    createdFolder = ifs.createFolder(theNewFolderPath,(Folder) ifs.findPublicObjectByPath(inTheFolder),true,null);
    System.out.println("Created folder in MY-TEST ");*/
    }catch(IfsException ie)
    System.out.println("ERROR CREATING A FOLDER IN THE DESTINATION FOLDER");
    IfsException.setVerboseMessage(true);
    ie.printStackTrace();
    return createdFolder;
    }//createFolder(String inTheFolder,theNewFolder)
    *Method creates a folder in the path specified(the path includes the name of the folder
    *to be created).If a parent of any of the folders in the path
    *is not found then that folder is automatically created.
    public String createFolder(String folderPath)
    System.out.println("*-*-*-*-* Creating folder *-*-*-*-*");
    String result = "SUCCESS";
    try
    //ifsSession.setAdministrationMode(true);
    IfsFileSystem ifs = new IfsFileSystem(ifsSession);
    Folder folder = (Folder) ifs.findPublicObjectByPath("home/"+userName);
    ifs.createFolder(folderPath,(Folder) folder,true,null);
    }catch(IfsException ie)
    result = ie.getMessage();
    ie.printStackTrace();
    return result;
    }//createFolder
    //Upload a document to the ifs
    public Document uploadDocument(String localPath,String destinationPath)
    Document document = null;
    try
    IfsFileSystem ifs = new IfsFileSystem(ifsSession);
    FileInputStream fis = new FileInputStream(localPath);
    System.out.println("**********Creating document in "+destinationPath);
    document = ifs.createDocument("B.txt", fis, destinationPath, null, false, null);
    System.out.println("Created document..");
    }catch(IfsException e)
    System.out.println("Error while creating document.....");
    IfsException.setVerboseMessage(true);
    e.printStackTrace();
    System.out.println("THE ERROR MESSAGE IS "+e.getMessage());
    catch(Exception e)
    System.out.println("File not found/io exception ");
    e.printStackTrace();
    return document;
    }//uploadDocument
    * Adds an access control entry to the public object passed in.
    *@param PublicObject the publicObject for which permissions have to be set.
    public void setAccessControlOnObject(PublicObject publicObject)
    try
    System.out.println("Setting permissions for the document....");
    AccessControlListDefinition aclDef = new AccessControlListDefinition();
    aclDef.setName(publicObject+"ACL");
    AccessControlEntryDefinition aceDef = new AccessControlEntryDefinition();
    //this sets the acceess control entry's granntee as the "user" who ha s loggen on
    aceDef.setGrantee(ifsSession.getDirectoryUser());
    aceDef.enableGrantToWorld(false);
    String[] permissions = {"ACCESSLEVEL_NONE"};
    System.out.println("setting the access level");
    AccessLevel accessLevel = new AccessLevel(permissions);
    /*PermissionBundleDefinition pbDef = new PermissionBundleDefinition(ifsSession);
    PermissionBundle pb = (PermissionBundle) ifsSession.createSystemObject(pbDef);
    pbDef.setAccessLevel(accessLevel);
    pbDef.setAccessLevel(accessLevel);
    aceDef.addPermissionBundle(pb);*/
    aceDef.setDistinctAccessLevel(accessLevel);
    aclDef.addAceDefinition(aceDef);
    AccessControlList acl = (AccessControlList) ifsSession.createPublicObject(aclDef);
    publicObject.setAcl(acl);
    }catch(IfsException ie)
    System.out.println("The error while settin access control is -0> "+ie.getMessage());
    ie.setVerboseMessage(true);
    ie.printStackTrace();
    }//createAccessControlList
    }//class DPDocManager
    Note : since iam still experimenting with the code please ignore any irrelevant/wrong commenting.Iam using method "CreateDealFolder()" to create the folder "INPRISE" and "CreateUser()" to create users "i1","i2"

    Iam not able to set the main folder's (i.e INPRISE) acl (MyAcl) on the subfolder "MyFolder" because the owner of MyAcl is "system" whereas the owner of MyFolder is user "i1" .Which is the best way of solving these ownership issue which iam running into ? I want to be able to create different folders ,assign a group of uers to each of the folders who can create as well as modify,delete each other's folders/documents (as i have mentioned in my first post in this thread) ?
    thanks
    Srinivas

  • Move footage item to folder problem.

    Hi,
    I have a problem. I have created script with following action:
    Import footage.
    Create "_MAIN_RENDER_FX##" comp from footage.
    Precomp footage from _MAIN_RENDER_FX## to _MAIN_COMP_FX##.
    Add it to render queue.
    Create "Composition" and "Footage" folder.
    Add comp to Composition folder and footages to Footage folder.
    Problem is that if I move Footages to "Footages" folder in the script and launch script again to import another footage,
    It will keep in memory older footage information. If I comment that section out which moves footages to "Footages" folder it works,
    It even works if I move footage to folder by hand and run script again.
    My script consists three functions:
    getInfoItem(item) // takes footage item and parse filename to different keywords.
    findFolderItemByName(name) // this just checks that if folder exists by given name.
    ChooseFile() // This is where we do import stuff which i explained earlier.
    Can you spot mistake from my code or give some advice to improve my coding (Im quite new of scripting)?
    NOTE: This is hard coded to our project folder structure so getInfoItem function only works with this kind of folder structure.
    Windows: X:\Projects\<Project>\Exports\VFX\FX##\
    MAC: /Volumes/<NetworkDrive>/Projects/<Project>/Exports/VFX/FX##/
    function getInfoItem(item){
        // Test OS
        var OS = $.os;
        if (OS.search("Windows") != -1) {
            OS = "Windows";
            var splitNum = 4;
        } else {
            OS = "Mac";
            var splitNum = 5;
        //  KEYWORDs
        this.fullpath = item.file;
        this.fullpath = String(this.fullpath);
        this.path_array = this.fullpath.split("/");
        this.fxnum = this.path_array[this.path_array.length-2];
         // split path based on splitNum variable which is based which OS currently in use.
        this.project_array= this.fullpath.split("/",splitNum);
        this.project_path = this.project_array.join("/");
        // Make a COPY from this.path_array
        this.path = this.path_array.slice();
        // remove last cell (Filename)
        this.path.pop();
        this.path = this.path.join("/");
        this.path = this.path + "/";
        this.fps = item.frameRate;
        this.duration = item.duration;
        this.width = item.width;
        this.height = item.height;
        this.name = item.name;
        this.left_index = this.name.indexOf("[");
        this.right_index = this.name.indexOf("]");
        this.sub = this.name.substring(this.left_index+1,this.right_index);
        this.filename = this.name.substring(0,this.left_index-1);
        this.splitted = this.sub.split("-");
        this.first_frame = this.splitted[0];
        this.last_frame = this.splitted[1];
        this.ext = ".dpx"
        // FOLDER RULES
        var padding = "#########################";
        this.aeProjectFolder = "/Project_Files/AE/";
        this.renderFolder = "/Renders/VFX/"+this.fxnum+"/";
        this.padnum = String(this.first_frame).length;
        this.outputseq = this.project_path+this.renderFolder+this.filename+"_["+padding.slice(-this.padnum)+"]"+this.ext;
        var outputfile = this.outputseq.slice(0,-this.padnum-6);
        this.outputfile = outputfile + this.first_frame + this.ext;
    function findFolderItemByName(name){
            var found = false;
            for (i = 1; i <= app.project.numItems; i++){
                if (app.project.item(i).name == name && app.project.item(i) instanceof FolderItem ){
                    var myFolder = app.project.item(i);
                    found = myFolder;
                    break
            return found;
    function ChooseFile(){
        var myItem = app.project.importFileWithDialog();
        var checkFile = 1;
        var footage = new getInfoItem(myItem[0]);
        var rndFolder = footage.project_path+footage.renderFolder;
        // Create MAIN RENDER Comp
        var comp = app.project.items.addComp("_MAIN_RENDER_"+footage.fxnum,footage.width,footage.height,1,footage.duration,footage.fps);
        // Check if comp or footage folder exists. otherwise create it.
        if(!findFolderItemByName("Compositions")){
            var compFolder = app.project.items.addFolder("Compositions");
        else{
            var compFolder = findFolderItemByName("Compositions");
        if(!findFolderItemByName("Footages")){
            var footageFolder = app.project.items.addFolder("Footages");
        else{
            var footageFolder = findFolderItemByName("Footages");
        // Add footage to _MAIN_RENDER_FX## Comp. 
        comp.displayStartTime = footage.first_frame/footage.fps;
        comp.layers.add(myItem[0]);
        // Precomp layer from _MAIN_RENDER_FX##
        var layerIndices= [1];
        var precomp = comp.layers.precompose([1],"MAIN_COMP_"+footage.fxnum);
        precomp.parentFolder = compFolder;
        // add Comp to render Queue
        rqi = app.project.renderQueue.items.add(comp);
        // Find DPX template and apply
        for (x in rqi.outputModules[1].templates) {
            if (rqi.outputModules[1].templates[x] == "DPX" ){
                rqi.outputModules[1].applyTemplate(rqi.outputModules[1].templates[x]);
                rqi.outputModules[1].file = File (footage.outputseq);        
        // Put all footage items to footage folder
        for (i = 1; i <= app.project.numItems; i++){
                if (app.project.item(i).typeName == "Footage"){
                        app.project.item(i).parentFolder = footageFolder;
    ChooseFile();
    Thanks,
    .M

    sorry, lost track of this thread for a while. this is actually pretty easy. the simplest would be to use applescript only but it can be done with automator with only minimal use of applescript. I don't know how to do it without using apple script altogether.
    make the following workflow in automator.
    1. get selected finder items.
    2. run applescript
    <pre style="
    font-family: Monaco, 'Courier New', Courier, monospace;
    font-size: 10px;
    margin: 0px;
    padding: 5px;
    border: 1px solid #000000;
    width: 720px;
    color: #000000;
    background-color: #ADD8E6;
    overflow: auto;"
    title="this text can be pasted into the Script Editor">
    on run {input, parameters}
    tell application "Finder"
    container of item 1 of input as alias
    end tell
    end run</pre>
    3. set variable value.
    make a new storage variable and use it in this action.
    4. run applescript
    <pre style="
    font-family: Monaco, 'Courier New', Courier, monospace;
    font-size: 10px;
    margin: 0px;
    padding: 5px;
    border: 1px solid #000000;
    width: 720px;
    color: #000000;
    background-color: #ADD8E6;
    overflow: auto;"
    title="this text can be pasted into the Script Editor">
    on run {input, parameters}
    end run</pre>
    this is adummy action to break the workflow chain.
    4. get selected finder items.
    5. make new folder.
    drag the variable you made to the "where" field.

  • Print error - there was a problem connecting to the server - spinning beach ball

    This has happened pre-yosemite and since.  It used to only happen at home but now also happens at work.  Every time I try to print, I get a spinning beach ball and a long delay until I get an error message saying there was a problem connecting to the server. At home, after clicking OK, I get a second spinning beach ball session with same error.  Once I click OK second time, I get print window and can print.  At work, it's only one session of spinning beach ball.  The office problem occurred after upgrading to yosemite.  I've deleted and added the printers without resolution.  I've repaired permissions.  The home problem has been going on for at least a year, probably a couple.  Using a macbook pro.

    There are many possible causes for this issue, and it may be very hard to resolve without wiping your account clean of everything except documents as a last resort. Please take each of the following steps that you haven't already tried. Back up all data before making any changes.
    If you get the alert in the login screen before you log in, stop here and ask for instructions.
    Step 1
    If you get the alert as soon as you log in, it's probably caused by one of your login items or by software that otherwise loads at startup or login. Ask if you need help identifying it. Known offenders are "1Password" and "Adobe Resource Synchronizer."
    Step 2
    If there's an icon representing the server in the sidebar of a Finder window, hold down the command key and drag it out.
    Step 3
    In the Finder, press the key combination command-K or select
              Go ▹ Go to Server...
    from the menu bar. In the upper right corner of the window that opens is a Recent Servers popup menu represented by a clock icon. From that menu, select
              Clear Recent Servers…
    and confirm. Test.
    Step 4
    Open the Printers & Scanners pane in System Preferences and delete any network devices you no longer use. If in doubt, delete them all and add back the ones you want.
    Step 5
    Triple-click anywhere in the line below on this page to select it, then copy the text to the Clipboard by pressing  command-C:
    ~/Library/PDF Services
    In the Finder, select
              Go ▹ Go to Folder...
    from the menu bar and paste into the box that opens by pressing command-V. You won't see what you pasted because a line break is included. Press return. A folder may open. If it does, move the contents to the Desktop, or to a new folder on the Desktop. Log out and log back in. Test. If there's no change, put the items you moved back where they were and continue.
    Step 6
    Open the folder
    ~/Library/Preferences
    as in Step 5 and move the file named "loginwindow.plist" items in that folder to the Trash, if it exists (it may not.)
    Log out and back in again, and test.
    Step 7
    Other possible causes are references in the iPhoto, iTunes, or iMovie library pointing to the server, bookmarks in the Preview application, and PDF files created by Adobe Acrobat with embedded scripts.
    Try rebuilding the iPhoto library, if applicable.
    Step 8
    Resources such as images or sounds stored on the server may have been added to various applications. Examples would be pictures added to Contacts and custom sounds added to Mail. The range of possibilites here is practically infinite, so I can't be more specific. You might get a hint by launching the Console application and looking for error messages that appear at the same time as the alerts.
    Step 9
    Disconnect all wired peripherals except those needed to start up. Start up in safe mode. Test. After testing, restart as usual (not in safe mode) and verify that you still have the problem.
    Note: If FileVault is enabled in OS X 10.9 or earlier, or if a firmware password is set, or if the startup volume is a Fusion Drive or a software RAID, you can’t do this. Ask for further instructions.
    Step 10
    Triple-click the line below to select it:
    /System/Library/CoreServices/Directory Utility.app
    Rght-click or control-click the highlighted text and select
              Services ▹ Open
    from the contextual menu.* The application Directory Utility will open.
    In the Directory Utility window, select the Directory Editor tool in the toolbar. Select Mounts from the Viewing menu in the toolbar, and/Local/Default from the node menu, if not already selected. On the right is a list of names and values. By default, the list is empty. If it's not empty, post a screenshot of the window and stop here.
    *If you don't see the contextual menu item, copy the selected text to the Clipboard (command-C). Open a TextEdit window and paste into it (command-V). Select the line you just pasted and continue as above.
    Step 11
    Open the following file as you did in the last step:
    /etc/auto_master
    It will open in a TextEdit window. The contents should be exactly this:
    # Automounter master map
    +auto_master          # Use directory service
    /net               -hosts          -nobrowse,hidefromfinder,nosuid
    /home               auto_home     -nobrowse,hidefromfinder
    /Network/Servers     -fstab
    /-               -static
    If there are any other lines in the window, post them. Otherwise, close the window.

  • Recently purchased a scanner which I connect my iPad to.  everything scanned goes into iPhoto. I purchased FileApp Pro to place scanned items into files. I still can't move the scanned items to a file.  Help!

    Scanning items into iPad. Scanned items go directly to iPhoto. Purchased FileApp Pro to create file folders on iPad. Still cannot move items from iPhoto to file folder.  Help?

    Is this a NAS type of setup (of which I know very little)?  Mine is not a response based upon strong technical knowledge but iTunes seems to have problems with those.  Just about everybody has issues with iTunes but you say it is not fit  for the purpose.  What is that?  I bet for 99% of people it does.  Not  everybody has 8TB collections they are trying to use with a RAID structured  external server. iTunes is really a mass consumer piece of software.  Yes, many people have expanded beyond internal drives, but NAS arrangements seem to add levels of complexity beyond a direct external drive that is Mac formatted and at most served by an Apple brand wireless router which I suspect is probably how everything is tested. Anything more is fortuitous in terms of support.  Except that you say the library files are on the external drive too it sounds to me like the server is asleep when you say it cannot find files and then suddenly can when you go to find one.

  • All folders on my iMac are in alphabetical order, however, when I save an item to a folder they are not. Why?

    All folders on my iMac are in alphabetical order, however, when I save an item to a folder they are not. Why?

    Thanks for helping BDAqua
    No it doesn't.
    If I go to that folder afterwards, it is all in alphabetical order.
    If I am working in Quickbooks, Mail or QuarkXpress and go to a folder from those programs the folder is out of order and I waste a lot of time
    searching through the folder looking for what I want. This never used to be a problem until the last couple of months.

  • Rom UK to South IPhone 3GS Synching Problems - HELP PLEASE

    Hey, I need help.
    Every time I connect my iphone to my HP laptop, it says it can't read the iphone and wants to restore the software.
    I go through this route, and it sometimes allows me to synch my contacts, but I have no joy with apps or music. This iPhone has worked perfectly with this PC previously.
    I am now running the latest iTunes software and also iOS4 on my iPhone and still no success.
    I get a message saying that an iPhone has previously been synched with this PC, which is true, as it is my one and only iPhone.
    As an aside, but may be related, I recently moved from UK to South Africa, and had my iPhone unlocked by o2 in the UK and now work from a Vodacom sim card.
    I've taken my iPhone and laptop into a local Apple store, and whilst it appeared to work in the shop, as these things always do, when I got home, reconnected, I got the same problem and has to restore my iPhone completely.
    Can anyone possibly help.
    I feel I need to get my iTunes to recognise that this is the iPhone thats been synched with it in the past.
    Other random error messages I get are things like, "cannot sync as item is a folder rather than a file"
    HELP

    Welcome to the club. This is a problem that has surfaced with OS 3.0.1 and continues into 3.1. All 3rd party apps crash at startup on iPhone 3g and 3gs. OS 3.0 didn't behave this way and Apple apparently has no comment to make on the matter.

  • Since I installed a new printer I can no longer print items from the internet.

    See above question. Bought my printer at Best Buy. They said it could be a browser problem. I have Firefox. My Firefox is up to date. No problem printing documents, just cant print items from the internet.

    Have you tried to see of the firmware on your printer needs to be updated? If apple happened to change the protocols for air print (I don't know if they did but anything is possible) then your printer's firmware will also need to be updated.
    You can also see if a simple reboot helps. Turn your printer off then on, power cycle your router - unplug it, count to ten, plug it back in, and reboot your iPad (hold down the sleep and home keys until you see the silver apple, then let go and let it reboot)
    sometimes just letting the electronics get a fresh start can help a ton.

  • Print PDF file from folder using SSIS

    Is there a way in SSIS to print pdf file from folder?
    ANy help much appreciated.

    One method is calling Adobe Acrobat Reader exe from Execute Process Task within SSIS passing the document path as the argument
    The command and arguments will look like this
    http://geekswithblogs.net/JeremyRamos/archive/2013/10/22/print-ssrs-report--pdf-from-sql-server-agent-or.aspx
    Please Mark This As Answer if it solved your issue
    Please Vote This As Helpful if it helps to solve your issue
    Visakh
    My Wiki User Page
    My MSDN Page
    My Personal Blog
    My Facebook Page

  • Add a new folder item in existing folder

    Hi
       All when i add a new folder item in an existing form
       and when i add some new controls with in this folder(tab) all controls are see the existing folder i want
      these control is see only this new folder
      plz help me
    Thanks & Regards
      Mohd Shahid

    Hi Sha
    I don't understand fully, but what i think you are saying is that you want to add a item, but to a specific tab.
    To do that, when you add your item, you must also do the following in addition to it's height,width,ect
    oitem.FromPane = 2
    oitem.ToPane = 2
    this say which pane/folder it will show on. If both are zero it will show on all tabs. If like above it will show on 1 tab.
    Hope this helps

  • Folder problems on external drive, not showing correct file size

    I've run across a strange problem. I'm media managing for a tv show, meaning I'm offloading video from CF cards onto 2 external drives, one is a Drobo Raid (set up for backup) and another is a Lacie rugged drive. After copying the media to both drives, the folder I copy will match, but sometimes as I drill upward in my folder structure, suddenly the file sizes will not match. To be more clear: 2 folders will show differing file sizes, but inside that folder is only another folder,nothing else, which matches across the drives. I've shown all files in finder and there's no hidden files, though sometimes I see the ds_store files are different sizes (8k vs 16k), but that's not always the case. Sometimes if I simply create a new folder and move it's contents into it I can get the folders to match, but sometimes that doesn't work. It's part of my workflow to show that these copies match exactly via screenshots, and although the most important folder (the direct folder holding the footage) always matches, these folder problems are super frustrating as it's not constant, and any workarounds also work inconsistantly.
    I had an accidental disconnect of the Drobo one time, and although none of the data seems to have any problem, I fear it's done something to the directory. The rugged drive is swapped out every few days and the problem seems to be on the Drobo. Because the nature of the data is pretty important, I'm afraid to just try messing around with repairing or other software solutions unless I know it's super safe and won't harm the data.
    I'm at a loss as to what's causing it and at the very least how to avoid it cropping up. Any help or insight would be appreciated!

    I had the same problem with my iMac, first I repaired the disk, then I ejected the disk, restarted, and then reinserted the USB in a different port.  All of my files magically showed up.  I don't know what caused the error but it has been working fine since. 

  • Canon Pixma MP 540 does not scan any longer after update mountain lion. printer works normally. Who can help.

    My Canon Pixma MP 540 does not scan any longer after update mountain lion. MP Navigator EX 2.0 starts and immediatley stops and comes with this message:
    Application Specific Information:
    *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSImageCell loadingState]: unrecognized selector sent to instance 0x825c0f0'
    Printer works normally. Who can help.
    Thank you
    PeterPan52

    Hi
    Did you find a solution to this ? I amhaving same problem
    Thanks

  • IPad syncing problem - HELP!

    iPad sync problem - HELP!  I keep getting this message "...cannot be synced because there is not enough free space to hold all of the items in the iTunes library (additional ...space needed)"  and yet I seem to have plenty of space on the iPad.  This just started today.  I even tried deleting some things to make even more room, but it didn't help.  Any ideas??? 
    I was thinking of restoring, but I've never done it...  should I? 
    thank you!

    Hello florafromnv,
    Welcome to Apple Support Communities.
    The following article addresses how to resolve the issues related to this message:
    iOS: "Not enough free space" alert when trying to sync
    http://support.apple.com/kb/TS1503
    Regards,
    Jeff D.

  • Display vs. For Sale items... Need help thinking this out

    Hi,
    Okay, here's the problem.  I have created a separate catalog called Museum  for joden.businesscatalyst.com
    In that catalog is a sub catalog for Edwardian Jewelry.
    These products are not for sale, but I want to display them.   
    We also have a store with items in another catalog that are for sale.
    It does not appear that I can create a separate template for Online Store Modules that can be used for the Museum catalog, for when I add this catalog to a menu, it creates a product display but also has Add to shopping cart  buttons and the large images also have the add to button.  Since there is no inventory or price, it won't be added, but I am wondering if there is a way to keep this inventory separate from our overall store, display it on a different Module when clicked, etc.   Basically what I need is a display area for not for sale items and a regular catalog for sale items.
    http://joden.businesscatalyst.com/museum/edwardian-jewelry
    My client says that any catalog, even though it is a separate catalog called museum, will interfere with our inventory for the store.
    Not sure what to do  about this.  I could create static pages for sample items, but will lose our current museum of previously owned items and NFS items.
    I could create a gallery of special items for each jewelry period (BTW,  the fact that the photo gallery uses a complete folder rather than selected items in a folder is a real problem).
    None of these solutions seems to facilitate what I need to do.
    I have another client I am thinking of moving to Business Cat with the same issue. He wants to display samples of his previous jewelry creations that are not for sale, but also needs a current inventory.
    I'm starting to think BC is not going to be able to serve these larger clients.
    Jeff

    If you're wanting to remove the add to cart button from the template for products in a particular catalogues you're going to have to put something into place, BC won't do it for you in this case unfortunately.
    You can use the backup list view or a custom template to remove the add to cart from them.
    As for the detail view you just need to remove the '.moreoption' div - or if you don't want to show the price either then the 'prod_options' div.
    You could utilise a custom field (from inside the product options) and fill it with something like 'noSale'.  Then in the CSS have '.noSale .moreoption { display: none }'
    Add the custom tag field into your large product template somewhere at the top inside a class.
    If you fill it in, it'll hide, if you don't, it won't.
    There are other options, but this seems pretty easy. This also allows items in any catalogue to be not for sale, not anything specifically - so you could have multiple that are not for sale, multiple that are.
    Justin / BCTemple.com

  • How to remove an item in a folder in Reminders on the IMAC

    I am trying to remove an item in a folder in Reminders on my IMAC.  I tried holding down the control key and clicking on the item.  Sometimes I get a pop up menu with the "delete" option.  But more often than none when I do this I get a pop up menu to cut, copy etc...not to delete.  Why the inconsistencies in holding down the control key and clicking the mouse?  Is there another way to remove the item listed in the folder?
    Thank you for your help.

    Hi ly_he,
    You have posted the same thread in the chinese forum of WPF, and I have replied. You could see here:
    https://social.msdn.microsoft.com/Forums/zh-CN/029bccae-f2f0-4218-980b-2389da8e5d2c/mvvm-wpf-treeview?forum=wpfzhchs
    Best Regards,
    Xavier Eoro
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

Maybe you are looking for

  • Merge two resultsets into one column

    Hi Guys, I have two SQL statements. The first returns 12 columns and the second returns 2 columns but both return the same number of rows. I can't seem to merge both the queries into a common query as the WHERE clauses in both are different. I have t

  • Block GR if GR date before the delivery date in the PO

    Dear all, A key-user would like to avoid goods receipts to be posted if the date of the goods receipts is before the delivery date in the PO. The key-user wants to refuse systematically delivery from the supplier which is sooner than the delivery dat

  • Syndicate Step in workflow

    Hi All, Is syndication server required for syndicate step in workflow? I have doubt that syndicate step is for either manually syndicating or automatically syndicating. Please clarify. Thanks Narendra

  • Java.policy and signed applets

    guys i have signed my applet but still some clients seem to not handle my applets properly... my applet connects to a web server to get data and display this data in my applet. but some machines in my network cant connect to get data to the server. c

  • Problem - JHS generating methods too large

    Migration From 10.1.2 to 10.1.3.1.26 (licensed) Thanks for the previous fix. Now I have another problem. I get the following error: Error(19,15): code segment of method _jspService(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServlet