Problem in sending buffered image to remote machine

iam able to capture ithe desktop screen as a buffered image by using buffered image class in java.awt.image.but iam bot able to send that buffered image to remote machine.it is only possible to send some part of that buffered image.but iam not able to transmit the whole buffere image of my desktop.can u help.

Hi,
For this topic you should have a look ( 2004-07-08 The Java Specialists' Newsletter [Issue 091] )
from Dr. Heinz Kabutz. Indeed, the newsletter is quite useful and sometimes also amazing.
I really enjoy reading it.
In this newsletter he is exactly doing what you wanted to know.
He uses an ObjectOutputStream, but compresses the screenshot beforehand as follows:
    import com.sun.image.codec.jpeg.*;
    Toolkit defaultToolkit = Toolkit.getDefaultToolkit();
    Rectangle shotArea = new Rectangle(
        defaultToolkit.getScreenSize());
    ByteArrayOutputStream bout = new ByteArrayOutputStream();
    JPEGImageEncoder encoder = JPEGCodec.createJPEGEncoder(bout);
    encoder.encode(robot.createScreenCapture(shotArea));
    return bout.toByteArray();Hope that helps

Similar Messages

  • Problem in sending JMS message on remote OC4J

    I have two OC4J standalone (10.1.3.0.0 build 041119.0001.2385)
    The containers work on Windows2000 in different machines connected by the LAN.
    The First container has deployed application from example http://www.oracle.com/technology/tech/java/oc4j/1013/howtos/how-to-jca-intro/doc/how-to-jca-intro.html
    The second container has j2ee application (Servlet) that sending JMS messages in the queue of the first container.
    Code Servlet in second OC4J:
    package mypackage2;
    import javax.servlet. *;
    import javax.servlet.http. *;
    import java.io. PrintWriter;
    import java.io. IOException;
    import javax.jms. *;
    import javax.naming. *;
    import java.util. *;
    public class Servlet1 extends HttpServlet
    private static final String CONTENT_TYPE = "text/html;charset=windows-1251";
    public void init (ServletConfig config) throws ServletException
    super.init (config);
    String QUEUE_NAME = "OracleASjms/MyQueue1";
    String QUEUE_CONNECTION_FACTORY = "OracleASjms/MyQCF";
    public void doGet (HttpServletRequest request, HttpServletResponse response)
    throws ServletException, IOException
    response.setContentType (CONTENT_TYPE);
    PrintWriter out = response.getWriter ();
    out.println (" < html > ");
    out.println (" < head > < title > Servlet1 < /title > < /head > ");
    out.println (" < body > ");
    try
    Hashtable env = new Hashtable ();
    env.put (Context. INITIAL_CONTEXT_FACTORY, "oracle.j2ee.rmi.RMIInitialContextFactory");
    env.put (Context. SECURITY_PRINCIPAL, "admin");
    env.put (Context. SECURITY_CREDENTIALS, "admin");
    env.put (Context. PROVIDER_URL, "ormi://host_OC4J_1:23791/jcamdb");
    env.put ("dedicated.rmicontext", "true");
    InitialContext ic = new InitialContext (env);
    QueueConnectionFactory connectionFactory = (QueueConnectionFactory)ic.lookup (QUEUE_CONNECTION_FACTORY);
    QueueConnection connection = connectionFactory.createQueueConnection ();
    connection.start ();
    QueueSession queueSession =
    connection.createQueueSession (false, Session.AUTO_ACKNOWLEDGE);
    Queue queue = (Queue) ic.lookup (QUEUE_NAME);
    ic.close ();
    System.out.println (" Queue: " + queue);
    QueueSender sender = queueSession.createSender (queue);
    System.out.println (" creating Message: " + queue);
    Message message = queueSession.createMessage ();
    System.out.println (" Message created ");
    message.setJMSType ("theMessage");
    message.setLongProperty ("time", System.currentTimeMillis ());
    message.setStringProperty ("id", "11111");
    message.setStringProperty ("oamount", "55555");
    message.setStringProperty ("message", "77777");
    message.setStringProperty ("RECIPIENT", "MDB");
    System.out.println (" Sending message... ");
    sender.send (message);
    System.out.println (" Message sent ");
    sender.close ();
    queueSession.close ();
    connection.close ();
    catch (Exception e)
    System.out.println (" ** TEST FAILED ** < br > Exception: " + e);
    out.println (e.toString ());
    e.printStackTrace ();
    out.println (" < p > The servlet has received a GET. This is the reply. < /p
    ");out.println (" < /body > < /html > ");
    out.close ();
    Error: This code send message in The First container, and should send in the second OC4J !!!!
    Please answer :
    As configure (what code it is necessary to write) servlet (any J2EE the application in OC4J) to use a path to OC4J JMS (remote OC4J JMS) through the Resource Adapter (using OracleASjms.rar). ???

    I have two OC4J standalone (10.1.3.0.0 build 041119.0001.2385)
    The containers work on Windows2000 in different machines connected by the LAN.
    The First container has deployed application from example http://www.oracle.com/technology/tech/java/oc4j/1013/howtos/how-to-jca-intro/doc/how-to-jca-intro.html
    The second container has j2ee application (Servlet) that sending JMS messages in the queue of the first container.
    Code Servlet in second OC4J:
    package mypackage2;
    import javax.servlet. *;
    import javax.servlet.http. *;
    import java.io. PrintWriter;
    import java.io. IOException;
    import javax.jms. *;
    import javax.naming. *;
    import java.util. *;
    public class Servlet1 extends HttpServlet
    private static final String CONTENT_TYPE = "text/html;charset=windows-1251";
    public void init (ServletConfig config) throws ServletException
    super.init (config);
    String QUEUE_NAME = "OracleASjms/MyQueue1";
    String QUEUE_CONNECTION_FACTORY = "OracleASjms/MyQCF";
    public void doGet (HttpServletRequest request, HttpServletResponse response)
    throws ServletException, IOException
    response.setContentType (CONTENT_TYPE);
    PrintWriter out = response.getWriter ();
    out.println (" < html > ");
    out.println (" < head > < title > Servlet1 < /title > < /head > ");
    out.println (" < body > ");
    try
    Hashtable env = new Hashtable ();
    env.put (Context. INITIAL_CONTEXT_FACTORY, "oracle.j2ee.rmi.RMIInitialContextFactory");
    env.put (Context. SECURITY_PRINCIPAL, "admin");
    env.put (Context. SECURITY_CREDENTIALS, "admin");
    env.put (Context. PROVIDER_URL, "ormi://host_OC4J_1:23791/jcamdb");
    env.put ("dedicated.rmicontext", "true");
    InitialContext ic = new InitialContext (env);
    QueueConnectionFactory connectionFactory = (QueueConnectionFactory)ic.lookup (QUEUE_CONNECTION_FACTORY);
    QueueConnection connection = connectionFactory.createQueueConnection ();
    connection.start ();
    QueueSession queueSession =
    connection.createQueueSession (false, Session.AUTO_ACKNOWLEDGE);
    Queue queue = (Queue) ic.lookup (QUEUE_NAME);
    ic.close ();
    System.out.println (" Queue: " + queue);
    QueueSender sender = queueSession.createSender (queue);
    System.out.println (" creating Message: " + queue);
    Message message = queueSession.createMessage ();
    System.out.println (" Message created ");
    message.setJMSType ("theMessage");
    message.setLongProperty ("time", System.currentTimeMillis ());
    message.setStringProperty ("id", "11111");
    message.setStringProperty ("oamount", "55555");
    message.setStringProperty ("message", "77777");
    message.setStringProperty ("RECIPIENT", "MDB");
    System.out.println (" Sending message... ");
    sender.send (message);
    System.out.println (" Message sent ");
    sender.close ();
    queueSession.close ();
    connection.close ();
    catch (Exception e)
    System.out.println (" ** TEST FAILED ** < br > Exception: " + e);
    out.println (e.toString ());
    e.printStackTrace ();
    out.println (" < p > The servlet has received a GET. This is the reply. < /p
    ");out.println (" < /body > < /html > ");
    out.close ();
    Error: This code send message in The First container, and should send in the second OC4J !!!!
    Please answer :
    As configure (what code it is necessary to write) servlet (any J2EE the application in OC4J) to use a path to OC4J JMS (remote OC4J JMS) through the Resource Adapter (using OracleASjms.rar). ???

  • Has anyone solved the problem of sending Pages docs to Windows machines?

    I am trying to create a business newsletter that can be emailed to anyone who wants it. I'm working with OS X 10.4.10 and Pages. My business partner, who works on a PC, can't read a Pages doc, so I converted it to a pdf, and Windows won't read that, either. So I exported it as a Word doc, and he can read that, except the colors aren't true. What kind of a program creates files that pdf readers can't view? And why did I spend my money on Pages if it can't create a file everyone can read?

    Strange, I've been emailing PDFs with no problems at all.
    I am the only MAC-MAN in the office so all my work goes to 100% PC "market".
    A wild guess - are you using Apple Mail app? If so, make sure the "Send Windows friendly attachments" is selected.
    Do not encrypt the PDFs.
    Do not include EPS graphics (just in case...)
    JPEGs rather than TIFFs (dunno why, but better safe...)
    And most importantly, make sure the end users have the latest Acrobat Reader!!!
    You would be surprised to find how many "incompatibilities" boil down to obsolete software being used.
    To give you an example, I did an internal use web page using a FLASH animation, and several users sent me VERY ANGRY emails that the "MAC crap" doesn't work on their computers, well, guess what, for security (MS-security, not REAL security) FLASH was disabled on the network computers, nuf'said!
    Failing all above, send HTML.
    Hope you solve the problem. Keep us posted.
    i.3d

  • Problem in sending images

    Hi All,
    I have a problem in sending HTML mail with images.I am able to get the image in my mail if i place the image part and the html part in two different tables I am able to get the image along with the html message but if i use the following code i.e using single table i am not able to get the image someone plase help me to get this done and tell me where am i going wrong?
    Properties props = System.getProperties();
                    props.put("mail.smtp.host", smtpServer);
                    Session session = Session.getDefaultInstance(props, null);
                     Message message = new MimeMessage(session);
                   message.setFrom(new InternetAddress(from));
                    message.setRecipients(Message.RecipientType.TO,InternetAddress.parse(to, false));
                     message.setSubject(subject);
                   message.setSentDate(new Date());
                    MimeBodyPart messageBodyPart = new MimeBodyPart();
              MimeBodyPart messageBodyPart1 = new MimeBodyPart();
              MimeBodyPart messageBodyPart2 = new MimeBodyPart();
    StringBuffer msgStrBuf = new StringBuffer();
    msgStrBuf.append("<html><head></head> <body><table  width=\"640\" align=\"center\"  height=\"293\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" bgcolor=\"#D3D3D3\" ><tr><td><img src=\"cid1:image1\" width=\"640\" height=\"92\"></td></tr>");
    DataSource fds1 = new FileDataSource("webimages\\sampleimage.jpg");
    messageBodyPart.setDataHandler(new DataHandler(fds1));
    messageBodyPart.setHeader("Content-ID1","<image1>");
    String headerbody = "";
    msgStrBuf.delete(0,msgStrBuf.length());
    msgStrBuf.append("<tr><td width=\"640\" align=\"center\"   bgcolor=\"#E6E6E6\" height=\"50\" valign=\"top\"><font size=\"2\" color=\"#4C4C4C\" face=\" Arial,Verdana, Helvetica, sans-serif\">����Dear "+locUserName+","+"<br><br>����"+"Here is the updated status report on your project.</font></td></tr>"+"  <tr> <td bgcolor=\"#E6E6E6\" height=\"100\" align=\"center\" valign=\"middle\">  <table width=\"95%\" height=\"100\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" bgcolor=\"4C4C4C\" >" +"<tr> <td width=\"200\" align=\"left\" valign=\"middle\"><strong><font  size=\"2\" face=\" Arial,Verdana, Helvetica, sans-serif\" color=\"#FFFFFF\">��PROJECT:</font></strong></td><td><font  size=\"2\" face=\" Arial,Verdana, Helvetica, sans-serif\" color=\"#FFFFFF\"><strong>"+getProjectName+"</strong></font></td></tr>"+"   <tr> <td  width=\"200\" align=\"left\" valign=\"middle\"><font  size=\"2\" face=\" Arial,Verdana, Helvetica, sans-serif\" color=\"#FFFFFF\"><strong>��LAST UPDATE:</strong></font></td><td><font  size=\"2\" face=\" Arial,Verdana, Helvetica, sans-serif\" color=\"#FFFFFF\"><strong>"+concatTime+"</strong></font></td></tr></tr></table></td></tr> "  );
    msgStrBuf.append("<tr> <td  bgcolor=\"#E6E6E6\" height=\"50\" valign=\"middle\"><font size=\"2\" color=\"#4C4C4C\" face=\" Arial,Verdana, Helvetica, sans-serif\">����" +"In case you have any questions, please send an email to <a href=\"mailto: </a>. Our customer <br>����service representative will contact you to address any  concerns. ");
    msgStrBuf.append("<br><br>����Thank You,<br> ���.</font></td></tr>");
    msgStrBuf.append("<tr><td  bgcolor=\"#E6E6E6\" height=\"100\" valign=\"top\"> <br><hr><font color=\"#666666\" size=\"-6\" face=\" Arial,Verdana, Helvetica, sans-serif\">����This is an automatically generated email. Please do not reply to this. If you need further information, contact the email address <br>����given above.<br>����If you wish to change your contact email address, please log in to follow the link and modify your<br>����preferences. You can also change the frequency of email updates in the project settings link.</font></td></tr>");
    msgStrBuf.append("</table></body></html>");
    headerbody = msgStrBuf.toString();
    messageBodyPart1.setContent(headerbody,"text/html");
    // Part two is attachment
    String mailingFileId = "";
    if(locGroupClass.equals("2"))
    mailingFileId = "XL Data/"+getProjectID+".xls";
    else{
    mailingFileId = "GPXL Data/"+getProjectName+".xls";
    System.out.println("mailingFileId :"+mailingFileId);
    System.out.println("locGroupClass :"+locGroupClass);
    String mailingFileNAme = getProjectName+".xls";
    DataSource source = new FileDataSource(mailingFileId);
    messageBodyPart2.setDataHandler(new DataHandler(source));
    messageBodyPart2.setFileName( mailingFileNAme);
    multipart.addBodyPart(messageBodyPart);
    multipart.addBodyPart(messageBodyPart1);
    multipart.addBodyPart(messageBodyPart2);
    // Put parts in message
              message.setContent(multipart);
                       Transport.send(message);
                    System.out.println("Message sent OK.");
                  } catch (Exception ex)
                              ex.printStackTrace();
                        }Message was edited by:
    rameshr

    messageBodyPart.setHeader("Content-ID1","<image1>");The name of the header is "Content-ID", not "Content-ID1".
    Of course, if you used the setContentID method on MimeBodyPart,
    the compiler would find this error for you.

  • Problem in Sending image in Email Notification

    Hi All,
    In our implementation we have to send customer logo in each email notification.
    We have SIM 7.1 deployed on SUN JES Application server 8.2.
    I tried to send the image using two ways but nothing got succeed.
    1) Using <IMG src"http<machine name>:<port number>/idm/images/<image name>"/>
    2) Deployed another trial.war file having only image folder and then using <IMG src"http<machine name>:<port number>/trial/images/<image name>"/>
    Where "machine name", "port number" and "image name" have suggestive values as per our environment.
    But i am not able to send the image. however second options works well with Tomcat.
    If anybody has any prior experience or some idea please share. it will really be helpful for us.

    Hi all,
    Its done.
    Actually there is some issue related with the intranet (may be they are blocking the image to get diaplayed) as its working for gmail and all.
    Thanks

  • Linked server problem, its works locally but not from remote machine

    Hi,
    i am using the application NAV and have written the query in the application. am using automation variable to link to the SQL Server.
    The problem is that , the query which i have written executes only when i am working on local machine .
    I mean when i want to execute the same query from remote machine through my app Dynamics NAV then its not getting executed.
    Thanks in advance

    Depends on what you are trying to do and what security you are using.
    What error did you get?
    If you are using windows authentication then take a look at delegation
    http://www.databasejournal.com/features/mssql/article.php/3696506/Setting-Up-Delegation-for-Linked-Servers.htm
    Regards, Ashwin Menon My Blog - http:\\sqllearnings.com

  • Connection problems with DI-SERVER 2007 & B1WS from remote machine

    Hi,
    Can you please help us better understand what the issue is, and how to solve it?
    I am seeking to get B1WS working on remote machines.
    I have built a small test application, which works fine on the server which also hosts the SQL Server instance and IIS.
    When I move the application to another machine, no connection happens, and it always throws this error:
    Message: 
    "Unable to connect to the remote server"
    Inner Exception:
    "No connection could be made because the target machine actively refused it 127.0.0.1:80"
    Error Code:
    10061
    This configuration works:
    Licensing Server:  Server A
    Database Server:  Server B
    IIS Server (B1WS):  Server B
    Running App:  Server B
    This configuration does not work:
    Licensing Server:  Server A
    Database Server:  Server B
    IIS Server (B1WS): Server B
    Running App:  Workstation C
    I have checked permissions on the web services folder, and gave Everyone all permissions.  The same connection problems persists.
    All help is welcome!
    Thank you in advance,
    Mike

    Dear Michael Gurevich,
    Was resolved?
    Thanks.
    João Paulo

  • Have been trying all weekend to upload Jpegs- either Send does not work or shows files uploading then shows error- never had this problem with Send Now-16 images total size 92MB-largest image 13MB

    Have been trying all weekend to upload Jpegs- either Send does not work or shows files uploading then shows error- never had this problem with Send Now-16 images total size 92MB-largest image 13MB

    Hi Ciaran19,
    Are you sending files from the Adobe Send interface, Adobe Reader, or the Outlook plug-in?
    Have you checked to see whether the files that you're sending appear in the Recent Files/Sent Files list when you're logged on to https://cloud.acrobat.com? (It could be that they're uploading, but not being sent.)
    It would also be worthwhile to send the files in smaller batches, to see whether a particular file or files is problematic, and causing the error.
    Please let us know how it goes. If you're still having trouble, please let us know where you're sending from, and whether you're able to send the files in smaller batches. It would also be helpful to know the exact error message that you're receiving.
    Best,
    Sara

  • Problem in sending image from applet to servlet

    dear friends,
    i have a need to send an image from applet to servlet via HttpConnection and getting back that image from applet.
    i am struggling with this sice many hours and got tired by searching any post that would help me but haven't got yet.
    i tried using this code but it dosent make any execution sit right. i got NPE at ImageIcon.getDescription() line;
    at applet side
          jf.setContentPane(getJContentPane());
                     FileDialog fd=new FileDialog(jf,"hi");
                     fd.setMode(FileDialog.LOAD);
                     fd.setVisible(true);   
                     v=new Vector();
                     try{                                                
                               FileInputStream fis=new FileInputStream(new File(fd.getDirectory()+fd.getFile()));      
                               byte[] imgbuffer=new byte[fis.available()];
                               fis.read(imgbuffer);
                               ImageIcon imgdata=new ImageIcon(imgbuffer);
                               v.add(0,imgicon);
                                String strwp ="/UASProject/Storeimage";              
                                URL servletURL = new URL(getCodeBase(),strwp);             
                                HttpURLConnection servletCon = (HttpURLConnection)servletURL.openConnection();       
                                servletCon.setDoInput(true); 
                                servletCon.setDoOutput(true);
                                servletCon.setUseCaches(false);
                                servletCon.setDefaultUseCaches(false);   
                                servletCon.setRequestMethod("POST");     
                                servletCon.setRequestProperty("Content-Type", "application/octet-stream");   
                                servletCon.connect();            
                                ObjectOutputStream oboutStream = new ObjectOutputStream(servletCon.getOutputStream());                     
                                oboutStream.writeObject(v);
                                v.remove(0);
                                oboutStream.flush();      
                                oboutStream.close();  
                                //read back from servlet
                                ObjectInputStream inputStream = new ObjectInputStream(servletCon.getInputStream());
                                 v= (Vector)inputStream.readObject();                     
                                 imgicon=(ImageIcon)v.get(1);
                                 showimg.setIcon(imgicon);
                                 this.getContentPane().validate();
                                 this.validate();  
                                inputStream.close();                                                        
                             //  repaint();
                     }catch(Exception e){e.printStackTrace();}  and this is at servlet side
            try {       
                         Vector v=new Vector();                    
                         ObjectInputStream inputFromjsp = new ObjectInputStream(request.getInputStream());                                      
                          v = (Vector)inputFromjsp.readObject();                                                                                                          
                          imgicon=(ImageIcon)v.get(0);                     
                          inputFromjsp.close();            
                          System.out.println(imgicon.getDescription());                                      
                          v.remove(0);
                          v.add(1,imgicon);
    //sending back to applet
                           response.setContentType("application/octet-stream");
                          ObjectOutputStream oboutstream=new ObjectOutputStream(response.getOutputStream());            
                          oboutstream.writeObject(v);
                          oboutstream.flush();
                          oboutstream.close();
                   } catch (Exception e) {e.printStackTrace();}  i really need your help. please let me out of this headche
    thanks
    Edited by: san_4u on Nov 24, 2007 1:00 PM

    BalusC wrote:
    san_4u wrote:
    how can i made a HttpClient PostMethod using java applets? as i have experience making request using HttpURLConnection.POST method. ok first of all i am going make a search of this only after i will tell. please be onlineOnce again, see link [3] in my first reply of your former topic.
    yeah! i got the related topic at http://www.theserverside.com/tt/articles/article.tss?l=HttpClient_FileUpload. please look it, i am reading it right now and expecting to be reliable for me.
    well what i got, when request made by html code(stated above) then all the form fields and file data mixed as binary data and available in HttpServletRequest.getinputstream. and at servlet side we have to use a mutipart parser of DiskFileItemFactory class that automatically parse the file data and return a FileItem object cotaing the actual file data,right?.You can also setup the MultipartFilter in your environment and don't >care about it further. Uploaded files will be available as request attributes in the servlet.is the multipartfilter class file available in jar files(that u suggested to add in yours article) so that i can use it directly? one more thing the import org.apache.commons.httpclient package is not available in these jar files, so where can got it from?
    one mere question..
    i looked somewhere that when we request for a file from webserver using web browser then there is a server that process our request and after retrieving that file from database it sends back as response.
    now i confused that, wheather these webservers are like apache tomcat, IBM's webspher etc those processes these request or there is a unique server that always turned on and process all the request?
    because, suppose in an orgnisation made it's website using its own server then, in fact, all the time it will not turned on its server or yes it will? and a user can make a search for kind of information about this orgnisation at any time.
    hopes, you will have understand my quary, then please let me know the actual process
    thanks
    Edited by: san_4u on Nov 25, 2007 11:25 AM

  • Compiling based on variable remote machine

    I am having great trouble getting a script to compile based on a repeat loop from a record. The script compiles fine if the finder actions are something simple like a beep but when I put in my required actions it fails to compile.
    I think the problem is related to how I refer to the "of machine ....." but can't work out why it is related to my finder actions...
    Any help much appreciated.
    set catlist to {{catname:"Ollie", catip:"eppc://192.168.1.12", ssdDrive:":Volumes:Cat109 Content A:"}, {catname:"Richard", catip:"eppc://192.168.1.13", ssdDrive:":Volumes:Cat109 Content A:"}}
    repeat with cat_ref in catlist
    set theMachine to catip of cat_ref
    with timeout of 10 seconds
    tell application "Finder" of machine theMachine
    activate
    set sourceFile1 to document file "001_Sahr.mov" of folder "096-Act 1 - Club shots" of folder "Cast Rotation" of folder "SSD" of disk "Cat109 Content A"
    set destinationFile1 to folder "096-Act 1 - Club shots" of folder "Active" of disk "Cat109 Content A"
    duplicate sourceFile1 to destinationFile1 with replacing
    set foldercontents1 to result
    end tell
    end timeout
    end repeat

    There are many issues to deal with when using remote Apple Events, especially with regard to user permissions/access. In general you can't easily target an application on a remote machine that's running as a different user (e.g. you're logged in as 'joe', but the 'bob' is logged in the remote machine - 'joe' can't tell 'bob's Finder what to do.
    Once you address that issue, please never, ever, ever do this:
    tell application "Finder" of machine theMachine
      activate
    Imagine you're bob running on the remote machine, in the middle of writing a document, editing an image, browsing the web - it doesn't really matter - when all of a sudden, without any notice or warning, the Finder pops to the front for no apparent reason. Aaagghhhh! How annoying would that be?
    There is rarely, if ever, any need to activate the Finder. If it's running, even in the background, you can send it commands and it will do what you ask. It does not have to be frontmost to do so.
    That said, I'd take a slightly different approach to your task and eschew the Finder altogether. A shell command is probably an easier way to achieve what you're trying here:
    tell application "System Events" of machine theMachine
      do shell script "cp -r '/Cat109 Content A/SSD/Cast Rotation/096-Act 1 - Club shots/001_Sahr.mov' '/Cat109 Content A/Active/096-Act 1 - Club shots/'"
    end tell

  • Send Aperture images via PowerMail

    PowerMail is not listed as an option in Aperture's email preference, but you can use PowerMail if you want to. Here's how:
    1. open Aperture's Preferences.
    2. click on the 'Email images using' popup menu and make a note of all active options; i.e., black instead of grey. Aperture will only list the mail applications it believes exist on your hard disk.
    3. Now select one of the active mail applications that you *don't* use. At the very least, you could use the Mail option if you use PowerMail instead of Mail.
    4. open Aperture/Contents/PlugIns/
    -- this is where Aperture keeps the AppleScript scripts for its Send Mail command.
    4. find the script for the application you selected; eg, 'Mail.applescript'.
    5. duplicate the script and keep the duplicate as a backup.
    6. open the original script in Script Editor and replace the script text with this:
    <code>
    -- Mail.applescript
    -- Liberated from iPhoto
    -- May 2006. adapted for PowerMail v5.2 by Gregory Charles Rivers [email protected].
    -- Copyright (c) 2003 Apple Computer. All rights reserved.
    on mailimages(emailsubject, default_address, image_count, new_files, new_captions, new_comments, cancel_string)
       try
          tell application "PowerMail"
             if image_count is 0 then
                set combined_caption to new_captions
             else
                set combined_caption to ""
                repeat with i from 1 to image_count
                   if new_captions's item i is not "" then
                      set combined_caption to combined_caption & new_captions's item i & return
                   end if
                   if new_comments's item i is not "" then
                      set combined_caption to combined_caption & new_comments's item i & return
                   end if
                   if new_captions's item i is not "" or new_comments's item i is not "" then
                      -- add one more return character for spacing between image data
                      set combined_caption to combined_caption & return
                   end if
                end repeat
             end if
             -- create message
             set newMsg to make new message with properties {subject:email_subject, content:combined_caption}
             tell newMsg
                if default_address is not "" then
                   make new recipient with properties {address:default_address, recipient type:to recipient}
                end if
                repeat with i from 1 to image_count
                   make new attachment at end with properties {file:(POSIX file (new_files's item i as string)) as alias}
                end repeat
                open -- display the message
             end tell
             activate
          end tell
       on error error_message number error_number
          log error_message & " " & error_number
          if the error_number is not -128 then
             tell application "Finder"
                beep
                display dialog error_message buttons {cancel_string} default button 1
             end tell
          end if
       end try
    end mail_images
    </code>
    7. save the script file and close it.
    now try sending an image from inside Aperture.

    Butch_M wrote:
    areohbee wrote:
    Just be aware the built-in FTP'er ala sample in the SDK is not as robust as a 3rd party FTP client is likely to be. It may work OK if your connection is rock solid and both machines as well. But has the potential to leave files "half way up" when there are problems...
    Rob
    I have not had that experience ... I've been using the sample plugin for over a year .... uploaded well over 100,000 images ... to my own remote servers, and those of over a dozen clients  ... no problems ...
    Fair enough Butch. It was just a word of caution to the OP - consider checking integrity after uploading. And if not so lucky as you, consider plan B.
    My experience: There's a reason its relegated to a sample in the SDK (potential for corrupt files on server), as opposed to being included natively in Lightroom. Granted, I'm on a really bad internet connection, but I don't know about the OP's connection...
    Also, I've heard sFTP mode may have some better error-checking, although I've also heard there are some bugs in sFTP mode - I have no personal experience with Lightroom's sFTP implementation.
    R

  • How to copy image from client machine to server machine?

    Hi ,
    Im doing a project in web applications...im using tomcat 5.0....when clients (using different machine) upload a image i need to make a copy of that in my "webapps" folder...can u help to solve it?
    The following code is working only in my machine..but not working when i upload from remote machines....
    can u sort out?
    try
                   FileInputStream input = new FileInputStream(fileSource);
                   byte b[] = new byte[input.available()];
                   input.read(b);
                   input.close();
                   fileDest.mkdirs();
                   FileOutputStream output = new FileOutputStream(new File(fileDest, fileSource.getName()));
                   output.write(b);
                   output.flush();
                   output.close();
              catch(IOException e)
                   System.out.println(e);
              }

    Hi,
    I having same problem. did you find solution for your issue.
    Can you please give your source if you dont mind?
    Thanks

  • Problem in sending HTTP request to the server.

    Hi,
    i dveloped an ant script for sar deployment.
    i deployed a sar to my local soa server with ant script. it got deployed succesfully..
    but when i try to deploy to a remote server, getting the below error..
    "Problem in sending HTTP request to the server. Please make sure the server is up and/or check standard HTTP response code for 404"
    but the server is up and runnig and i am able to ping it from my machine and also access the console...
    below is my script
    build.properties
    wn.bea.home=C:/Oracle/Middleware
    all.needed.jars.path=D:/SourceCode/neededJAR
    oracle.soa.home=C:/Oracle/Middleware/Oracle_SOA1
    java.passed.home=C:/Oracle/Middleware/jdk160_24
    #Deployment environment
    deployment.plan.environment=DEV
    #Deploy Action
    deployAction =redeploy
    #credentials
    user=weblogic
    password=welcome1
    #For Composite deployment
    serverURL=http://10.177.154.6:7001
    forceDefault=true
    server=10.177.154.6
    port=7001
    sarLocation=D:/SourceCode/JAR
    build.xml
    <?xml version="1.0" encoding="iso-8859-1"?>
    <project name="soaDeployAll" default="deployAll">
         <echo>basedir ${basedir}</echo>
         <property environment="env"/>
    <echo>current folder ${basedir}</echo>
         <property file="${basedir}/build.properties"/>
         <taskdef resource="net/sf/antcontrib/antlib.xml">
         <classpath>
              <pathelement location="${all.needed.jars.path}/ant-contrib.jar"/>           
         </classpath>
         </taskdef>
         <target name="init">
              <tstamp>
                   <format property="timestamp" pattern="yyyy-MM-dd_HH-mm-ss"/>
              </tstamp>
              <property name="build.log.dir" location="${basedir}/buildlogs"/>
              <mkdir dir="${build.log.dir}"/> <property name="build.log.filename" value="build_${timestamp}.log"/>
              <record name="${build.log.dir}/${build.log.filename}" loglevel="verbose" append="false"/>
              <echo message="Build logged to ${build.log.filename}"/>
         </target>
         <target name="deployAll" depends="init">
         <echo>Deploy for environment ${deployment.plan.environment}</echo>
         <antcall target="deployAllComposites"/>
    </target>
    <!-- Following Actions are performed for Composite files in Managed Server - Deploy,Redeploy -->
         <target name="deployAllComposites" depends="init">
         <foreach target="deployComposites" param="Files">
              <fileset dir="${sarLocation}" casesensitive="no" includes="*.jar"/>
         </foreach>
         </target>
         <target name="deployComposites" depends="init">
         <basename file="${Files}" property="basename"/>
    <echo>Deploy Project ${basename} for environment ${deployment.plan.environment}</echo>
              <if>
                   <equals arg1="${deployAction}" arg2="deploy" />
                   <then>
                        <echo message="Deploying composites in Managed server........." />
                        <ant antfile="${oracle.soa.home}/bin/ant-sca-deploy.xml" inheritAll="true" target="deploy">
                             <property name="serverURL" value="${serverURL}"/>
                             <property name="user" value="${user}"/>
                             <property name="password" value="${password}"/>
                             <property name="overwrite" value="false"/>
                             <property name="forceDefault" value="${forceDefault}"/>
                             <property name="sarLocation" value="${sarLocation}/${basename}"/>
                        </ant>
                   </then>
                   <else>
                        <echo message="ReDeploying composites in Managed server........." />
                        <ant antfile="${oracle.soa.home}/bin/ant-sca-deploy.xml" inheritAll="true" target="deploy">
                             <property name="serverURL" value="${serverURL}"/>
                             <property name="user" value="${user}"/>
                             <property name="password" value="${password}"/>
                             <property name="overwrite" value="true"/>
                             <property name="forceDefault" value="${forceDefault}"/>
                             <property name="sarLocation" value="${sarLocation}/${basename}"/>                         
                        </ant>
                   </else>
              </if>
    </target>
    </project>
    please help....

    Hi,
    Give the serverURL as http://<host>:<managed.server.port>/soa-infra/deployer and try.
    e.g . http://10.177.154.6:8001/soa-infra/deployer
    Regards,
    Neeraj Sehgal

  • Creating directories in a remote machine.

    Hi all,
    Is there any way to create directories in remote machines?
    I'm sending files from a server machine to a client machine.
    Now I'm just sending them in bytes and writing them in the client in a file already created.
    Please help me to dynamically create files and directories in the client machine.
    Thanks in advance.

    hi,
    u can pass the Directories list (or path)and then create them there using mkdir() and mkdirs().
    refer java.io.File in API.
    can u suggest me a way to do this?
    I am working in a project where i need to get files from a folder present in local drives or from a shared folder in some other machine connected in the LAN
    I'm having problem with accessing files in a shared folder i.e., I'm getting Null Pointer Exception.Should the folder be considered as a file in a remotehost and that host be connected with my machine?
    Is there anyway to do this?

  • Sending an Image file via UART

    Hi All,
    1. Is it possible to send an image file( .jpg -1080p) from PC to FPGA(ML605 evaluation board) via UART ?
    2. .jpg to .hex to .txt then  through hyper terminal ? or any  other way ?
    Meganadhan
     

    thanks ignacio
    i will try it letter
    but for sending an image to fpga, can i use realterm?  actually i'm doing image encryption project and the size pixel is 1600X1600, it's very big , but it's ok if it will take a long time for transfer it via UART because i just want to make sure that my alghorithm was true.
     and i have some trouble with the uart rx code. i would like to simulate it with random bit that represent transfer bit from pc, but it's hard to sychronise the timing between uart rx and the random bit program , here the code
    RANDOM BIT
    library IEEE;
    use IEEE.STD_LOGIC_1164.ALL;
    entity random is
    generic (
    g_CLKS_PER_BIT : integer := 87 -- Needs to be set correctly--> 10 MHZ/115200(baud rate)
    Port ( clk :in STD_LOGIC;
    output : out STD_LOGIC);
    end random;
    architecture Behavioral of random is
    signal counter: integer:=0;
    begin
    process (clk)
    begin
    if rising_edge(clk) then
    counter <= counter+1;
    if counter= (g_CLKS_PER_BIT-1) then
    output <= '1';
    elsif counter=55 then
    output <= '0';
    elsif counter=65 then
    output <= '0';
    elsif counter=75 then
    output <= '0';
    elsif counter=85 then
    output <= '1';
    elsif counter=95 then
    output <= '0';
    elsif counter=105 then
    output <= '0';
    elsif counter=115 then
    output <= '0';
    --elsif counter =1 then
    counter <= 0;
    end if;
    end if;
    end process;
    end Behavioral;
    ----------------------------------------------------------------------UART RX
    -- File Downloaded from http://www.nandland.com
    -- This file contains the UART Receiver. This receiver is able to
    -- receive 8 bits of serial data, one start bit, one stop bit,
    -- and no parity bit. When receive is complete o_rx_dv will be
    -- driven high for one clock cycle.
    -- Set Generic g_CLKS_PER_BIT as follows:
    -- g_CLKS_PER_BIT = (Frequency of i_clk)/(Frequency of UART)
    -- Example: 10 MHz Clock, 115200 baud UART
    -- (10000000)/(115200) = 87
    library ieee;
    use ieee.std_logic_1164.ALL;
    use ieee.numeric_std.all;
    entity receive is
    generic (
    g_CLKS_PER_BIT : integer := 87 -- Needs to be set correctly--> 10 MHZ/115200(baud rate)
    port (
    i_clk : in std_logic;
    i_rx_serial : in std_logic;
    o_rx_dv : out std_logic;
    o_rx_byte : out std_logic_vector(7 downto 0)
    end receive;
    architecture rtl of receive is
    type t_SM_MAIN is (s_IDLE, s_RX_START_BIT, s_RX_DATA_BITS,
    s_RX_STOP_BIT, s_CLEANUP);
    signal r_SM_MAIN : t_SM_MAIN := s_IDLE;
    signal r_RX_DATA_R : std_logic := '0';
    signal r_RX_DATA &colon; std_logic := '0';
    signal r_CLK_COUNT : integer range 0 to g_CLKS_PER_BIT-1 := 0;
    signal r_BIT_INDEX : integer range 0 to 7 := 0; -- 8 Bits Total
    signal r_RX_BYTE : std_logic_vector(7 downto 0):= (others => '0');
    signal r_RX_DV : std_logic := '0';
    begin
    -- Purpose: Double-register the incoming data.
    -- This allows it to be used in the UART RX Clock Domain.
    -- (It removes problems caused by metastabiliy)
    p_SAMPLE : process (i_clk)
    begin
    if rising_edge(i_clk) then
    r_RX_DATA_R <= i_rx_serial;
    r_RX_DATA <= r_RX_DATA_R;
    end if;
    end process p_SAMPLE;
    -- Purpose: Control RX state machine
    p_UART_RX : process (i_clk)
    begin
    if rising_edge(i_clk) then
    case r_SM_MAIN is
    when s_IDLE =>
    r_RX_DV <= '0';
    r_CLK_COUNT <= 0;
    r_BIT_INDEX <= 0;
    if r_RX_DATA = '0' then -- Start bit detected
    r_SM_MAIN <= s_RX_START_BIT;
    else
    r_SM_MAIN <= s_IDLE;
    end if;
    -- Check middle of start bit to make sure it's still low
    when s_RX_START_BIT =>
    if r_CLK_COUNT = (g_CLKS_PER_BIT-1)/2 then
    if r_RX_DATA = '0' then
    r_CLK_COUNT <= 0; -- reset counter since we found the middle
    r_SM_MAIN <= s_RX_DATA_BITS;
    else
    r_SM_MAIN <= s_IDLE;
    end if;
    else
    r_CLK_COUNT <= r_CLK_COUNT + 1;
    r_SM_MAIN <= s_RX_START_BIT;
    end if;
    -- Wait g_CLKS_PER_BIT-1 clock cycles to sample serial data
    when s_RX_DATA_BITS =>
    if r_CLK_COUNT < g_CLKS_PER_BIT-1 then
    r_CLK_COUNT <= r_CLK_COUNT + 1;
    r_SM_MAIN <= s_RX_DATA_BITS;
    else
    r_CLK_COUNT <= 0;
    r_RX_BYTE(r_BIT_INDEX) <= r_RX_DATA;
    -- Check if we have sent out all bits
    if r_BIT_INDEX < 7 then
    r_BIT_INDEX <= r_BIT_INDEX + 1;
    r_SM_MAIN <= s_RX_DATA_BITS;
    else
    r_BIT_INDEX <= 0;
    r_SM_MAIN <= s_RX_STOP_BIT;
    end if;
    end if;
    -- Receive Stop bit. Stop bit = 1
    when s_RX_STOP_BIT =>
    -- Wait g_CLKS_PER_BIT-1 clock cycles for Stop bit to finish
    if r_CLK_COUNT < g_CLKS_PER_BIT-1 then
    r_CLK_COUNT <= r_CLK_COUNT + 1;
    r_SM_MAIN <= s_RX_STOP_BIT;
    else
    r_RX_DV <= '1';
    r_CLK_COUNT <= 0;
    r_SM_MAIN <= s_CLEANUP;
    end if;
    -- Stay here 1 clock
    when s_CLEANUP =>
    r_SM_MAIN <= s_IDLE;
    r_RX_DV <= '0';
    when others =>
    r_SM_MAIN <= s_IDLE;
    end case;
    end if;
    end process p_UART_RX;
    o_rx_dv <= r_RX_DV;
    o_rx_byte <= r_RX_BYTE;
    end rtl;
    TOP
    library IEEE;
    use IEEE.STD_LOGIC_1164.ALL;
    entity top is
    port(cl_k: in std_logic
    end top;
    architecture Behavioral of top is
    --component random
    component random is
    generic (
    g_CLKS_PER_BIT : integer := 87 -- Needs to be set correctly--> 10 MHZ/115200(baud rate)
    Port ( clk :in STD_LOGIC;
    output : out STD_LOGIC
    end component;
    --component uart rx
    component receive is
    generic (
    g_CLKS_PER_BIT : integer := 87 -- Needs to be set correctly--> 10 MHZ/115200(baud rate)
    port (
    i_clk : in std_logic;
    i_rx_serial : in std_logic;
    o_rx_dv : out std_logic;
    o_rx_byte : out std_logic_vector(7 downto 0)
    end component;
    --signal
    signal mlebu:std_logic;
    signal enabl:std_logic;
    signal metu :std_logic_vector (7 downto 0);
    begin
    a:random port map( output=>mlebu,
    clk=>cl_k
    b:receive port map( i_clk=>cl_k,
    i_rx_serial=>mlebu,
    o_rx_dv=>enabl,
    o_rx_byte=>metu
    end Behavioral;
    regards
    halim

Maybe you are looking for

  • Re: HP Deskjet 820CSE Win 8.1 Install

    I have the same problem with my HP 820cse I agree, it is one of the best printers plus I have not only an almost full ink cartridge I have one spare too I am able to use this printer with my laptop that has Windows XP but my new desktop has a Windows

  • Unable to stop pump process

    Hi, I tried to stop the extract(pump process in middle tier) using the below command. stop EXTRACT1 and it is giving the below error ERROR: EXTRACT EXTRACT1 not currently running. But current extract status is showing as running as mentioned below, n

  • Order of servlet mapping in web.xml

    Hello, is the order of multiple <servlet-mapping> in web.xml important? Or it doesn't matter in which order they are declared? For example, if i have two controllers, one is <servlet-name>Faces Servlet</servlet-name>   <servlet-class>javax.faces.weba

  • Flash CC audio problems

    Okay, so I was having so much problems with Flash CS6 I actually upgraded and the first video didn't have any problems.   It wasn't until I started actually creating something in CC is when I had problems.  First off when I put audio in a scene, it w

  • Addl planning field in ME21N

    dear sirs, please let me know the importance of the field ADDL PLANNING which is appearing in the bottom part of the PO creation screen(ME21N) just in between item tabs and po line items. what is the importance of the same,