Help - Difficulties with transate()

Hi, I am having some weird difficulties with the translate method. I am trying to reposition one of layers by using X and Y values from a CSV file. I tried to access the variables various ways. One was using part[5], (with 'part' as the variable'). Then tried setting variables for each value (as shown below). The dubber doesn't report any errors. The weird thing about it is that the code is supposedly executed, but the translate function is somehow 'ignored'. When I stop the script, I can see that it exists in the history panel. I get no errors during run time either. Can someone please help. I have no idea what is going on with this strange problem.
Also: I am working two documents. In my script I have it open an image that has a dpi of 266. The script duplicates the single layer of that file into a 72 dpi document and repositions the layer according to the x and y values defined in my CSV file. I tried setting both to 72 dpi, however nothing different happens. The only time something changes is if I put a constant number for x and y. By doing that, it doesn't even move to the spot it is suppose to. It repositions, but it is placed so far off the canvas.
//Duplicate unprocessed mugshot in its proper layer level, all-in-one step
app.documents[2].layers[0].duplicate(documents[1].layerSets[0].layerSets[part[3]].layerSet s[part[4]].artLayers[0], ElementPlacement.PLACEAFTER);
//Close unprocessed mugshot after duplicating
app.documents[2].close();
//Resize mugshot layer using a percentage
app.documents[1].layerSets[0].layerSets[part[3]].layerSets[part[4]].artLayers[1].resize(70 .7, 70.7, AnchorPosition.MIDDLECENTER);
//Reposition the image according to x and y values defined in CSV file
var x = part[5];
var y = part[6];
app.preferences.rulerUnits = Units.PIXELS;
app.documents[1].layerSets[0].layerSets[part[3]].layerSets[part[4]].artLayers[1].translate (x, y);
//Create mask clipping from mugshot layer
var desc3 = new ActionDescriptor();
var ref2 = new ActionReference();
ref2.putEnumerated( charIDToTypeID('Lyr '), charIDToTypeID('Ordn'), charIDToTypeID('Trgt') );
desc3.putReference( charIDToTypeID('null'), ref2 );
executeAction( charIDToTypeID('GrpL'), desc3, DialogModes.NO );

I've reworked your code a bit to use intermediate variables. This makes it
easier to read (for me, at least) and also perform better.
The translate() function is really a 'moveRelative' not a 'moveAbsolute'
function. The x and y parameters are deltas from the layers current location, so
that has to be taken into account as I've done below. BTW, I may have the terms
reversed where I compute x and y. I normally make an ActionManager-type call to
Transform to do the resize and move in one step.
-X
var doc1 = app.documents[1]
var doc2 = app.documents[2];
var ls0 = doc1.layerSets[0];
var ls3 = ls0.layerSets[part[3]];
var ls4 = ls3.layerSets[part[4]];
//Duplicate unprocessed mugshot in its proper layer level, all-in-one step
doc2.layers[0].duplicate(ls4.artLayers[0], ElementPlacement.PLACEAFTER);
//Close unprocessed mugshot after duplicating
doc2.close();
var layer = ls4.artLayers[1];
//Resize mugshot layer using a percentage
layer.resize(70.7, 70.7, AnchorPosition.MIDDLECENTER);
var bnds = layer.bounds;
//Reposition the image according to x and y values defined in CSV file
var x = part[5] - bnds[0].value;
var y = part[6] - bnds[1].value;
app.preferences.rulerUnits = Units.PIXELS;
layer.translate (x, y);
//Create mask clipping from mugshot layer
var desc3 = new ActionDescriptor();
var ref2 = new ActionReference();
ref2.putEnumerated( charIDToTypeID('Lyr '), charIDToTypeID('Ordn'),
charIDToTypeID('Trgt') );
desc3.putReference( charIDToTypeID('null'), ref2 );
executeAction( charIDToTypeID('GrpL'), desc3, DialogModes.NO );

Similar Messages

  • Hi, i'm having great difficulties with my safari on my laptop it will not open at all and has been doing this for quite a long time now, can anybody help??!!!

    hi, i'm having great difficulties with my safari on my laptop it will not open at all and has been doing this for quite a long time now, can anybody help??!!!

    What laptop? What operating system? What version of Safari?

  • Help needed with passing data between classes, graph building application?

    Good afternoon please could you help me with a problem with my application, my head is starting to hurt?
    I have run into some difficulties when trying to build an application that generates a linegraph?
    Firstly i have a gui that the client will enter the data into a text area call jta; this data is tokenised and placed into a format the application can use, and past to a seperate class that draws the graph?
    I think the problem lies with the way i am trying to put the data into co-ordinate form (x,y) as no line is being generated.
    The following code is from the GUI:
    +public void actionPerformed(ActionEvent e) {+
    +// Takes data and provides program with CoOrdinates+
    int[][]data = createData();
    +// Set the data data to graph for display+
    grph.showGrph(data);
    +// Show the frame+
    grphFrame.setVisible(true);
    +}+
    +/** set the data given to the application */+
    +private int[][] createData() {+
    +     //return data;+
    +     String rawData = jta.getText();+
    +     StringTokenizer tokens = new StringTokenizer(rawData);+
    +     List list = new LinkedList();+
    +     while (tokens.hasMoreElements()){+
    +          String number = "";+
    +          String token = tokens.nextToken();+
    +          for (int i=0; i<token.length(); i++){+
    +               if (Character.isDigit(token.charAt(i))){+
    +                    number += token.substring(i, i+1);+
    +               }+
    +          }     +
    +     }+
    +     int [][]data = new int[list.size()/2][2];+
    +     int index = -2;+
    +     for (int i=0; i<data.length;i++){+
    +               index += 2;+
    +               data[0] = Integer.parseInt(+
    +                         (list.get(index).toString()));+
    +               data[i][1] = Integer.parseInt(+
    +                         (list.get(index +1).toString()));+
    +          }+
    +     return data;+
    The follwing is the coding for drawing the graph?
    +public void showGrph(int[][] data)  {+
    this.data = data;
    repaint();
    +}     +
    +/** Paint the graph */+
    +protected void paintComponent(Graphics g) {+
    +//if (data == null)+
    +     //return; // No display if data is null+
    super.paintComponent(g);
    +// x is the start position for the first point+
    int x = 30;
    int y = 30;
    for (int i = 0; i < data.length; i+) {+
    +g.drawLine(data[i][0],data[i][1],data[i+1][0],data[i+1][1]);+
    +}+
    +}+

    Thanks for that tip!
    package LineGraph;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import java.util.*;
    import java.util.List;
    public class GUI extends JFrame
      implements ActionListener {
      private JTextArea Filejta;
      private JTextArea jta;
      private JButton jbtShowGrph = new JButton("Show Chromatogram");
      public JButton jbtExit = new JButton("Exit");
      public JButton jbtGetFile = new JButton("Search File");
      private Grph grph = new Grph();
      private JFrame grphFrame = new JFrame();   // Create a new frame to hold the Graph panel
      public GUI() {
         JScrollPane pane = new JScrollPane(Filejta = new JTextArea("Default file location: - "));
         pane.setPreferredSize(new Dimension(350, 20));
         Filejta.setWrapStyleWord(true);
         Filejta.setLineWrap(true);     
        // Store text area in a scroll pane 
        JScrollPane scrollPane = new JScrollPane(jta = new JTextArea("\n\n Type in file location and name and press 'Search File' button: - "
                  + "\n\n\n Data contained in the file will be diplayed in this Scrollpane "));
        scrollPane.setPreferredSize(new Dimension(425, 300));
        jta.setWrapStyleWord(true);
        jta.setLineWrap(true);
        // Place scroll pane and button in the frame
        JPanel jpButtons = new JPanel();
        jpButtons.setLayout(new FlowLayout());
        jpButtons.add(jbtShowGrph);
        jpButtons.add(jbtExit);
        JPanel searchFile = new JPanel();
        searchFile.setLayout(new FlowLayout());
        searchFile.add(pane);
        searchFile.add(jbtGetFile);
        add (searchFile, BorderLayout.NORTH);
        add(scrollPane, BorderLayout.CENTER);
        add(jpButtons, BorderLayout.SOUTH);
        // Exit Program
        jbtExit.addActionListener(new ActionListener(){
        public void actionPerformed(ActionEvent e) {
             System.exit(0);
        // Read Files data contents
         jbtGetFile.addActionListener(new ActionListener(){
         public void actionPerformed( ActionEvent e) {
                   String FileLoc = Filejta.getText();
                   LocateFile clientsFile;
                   clientsFile = new LocateFile(FileLoc);
                        if (FileLoc != null){
                             String filePath = clientsFile.getFilePath();
                             String filename = clientsFile.getFilename();
                             String DocumentType = clientsFile.getDocumentType();
         public String getFilecontents(){
              String fileString = "\t\tThe file contains the following data:";
         return fileString;
           // Register listener     // Create a new frame to hold the Graph panel
        jbtShowGrph.addActionListener(this);
        grphFrame.add(grph);
        grphFrame.pack();
        grphFrame.setTitle("Chromatogram showing data contained in file \\filename");
      /** Handle the button action */
      public void actionPerformed(ActionEvent e) {
        // Takes data and provides program with CoOrdinates
        int[][]data = createData();
        // Set the data data to graph for display
        grph.showGrph(data);
        // Show the frame
        grphFrame.setVisible(true);
      /** set the data given to the application */
      private int[][] createData() {
           String rawData = jta.getText();
           StringTokenizer tokens = new StringTokenizer(rawData);
           List list = new LinkedList();
           while (tokens.hasMoreElements()){
                String number = "";
                String token = tokens.nextToken();
                for (int i=0; i<token.length(); i++){
                     if (Character.isDigit(token.charAt(i))){
                          number += token.substring(i, i+1);
           int [][]data = new int[list.size()/2][2];
           int index = -2;
           for (int i=0; i<data.length;i++){
                     index += 2;
                     data[0] = Integer.parseInt(
                             (list.get(index).toString()));
                   data[i][1] = Integer.parseInt(
                             (list.get(index +1).toString()));
         return data;
    public static void main(String[] args) {
    GUI frame = new GUI();
    frame.setLocationRelativeTo(null); // Center the frame
    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    frame.setTitle("Clients Data Retrival GUI");
    frame.pack();
    frame.setVisible(true);
    package LineGraph;
    import javax.swing.*;
    import java.awt.*;
    public class Grph extends JPanel {
         private int[][] data;
    /** Set the data and display Graph */
    public void showGrph(int[][] data) {
    this.data = data;
    repaint();
    /** Paint the graph */
    protected void paintComponent(Graphics g) {
    //if (data == null)
         //return; // No display if data is null
    super.paintComponent(g);
    //Find the panel size and bar width and interval dynamically
    int width = getWidth();
    int height = getHeight();
    //int intervalw = (width - 40) / data.length;
    //int intervalh = (height - 20) / data.length;
    //int individualWidth = (int)(((width - 40) / 24) * 0.60);
    ////int individualHeight = (int)(((height - 40) / 24) * 0.60);
    // Find the maximum data. The maximum data
    //int maxdata = 0;
    //for (int i = 0; i < data.length; i++) {
    //if (maxdata < data[i][0])
    //maxdata = data[i][1];
    // x is the start position for the first point
    int x = 30;
    int y = 30;
    //draw a vertical axis
    g.drawLine(20, height - 45, 20, (height)* -1);
    // Draw a horizontal base line4
    g.drawLine(20, height - 45, width - 20, height - 45);
    for (int i = 0; i < data.length; i++) {
    //int Value = i;      
    // Display a line
    //g.drawLine(x, height - 45 - Value, individualWidth, height - 45);
    g.drawLine(data[i][0],data[i][1],data[i+1][0],data[i+1][1]);
    // Display a number under the x axis
    g.drawString((int)(0 + i) + "", (x), height - 30);
    // Display a number beside the y axis
    g.drawString((int)(0 + i) + "", width - 1277, (y) + 900);
    // Move x for displaying the next character
    //x += (intervalw);
    //y -= (intervalh);
    /** Override getPreferredSize */
    public Dimension getPreferredSize() {
    return new Dimension(1200, 900);

  • Can someone PLEASE help me with my Satellite A665-S5170

    Ok.
    I am going to do my best to sum up what is going on right now. 
    So a few months ago, my uncle passed away, and I now have his laptop. Even though he bought it in March 2011, he never used it, so it was practically brand new when I got it. 
    Long story short, everything was fine up until about a week ago. That is when I noticed something was wrong, but didn't know what. 
    Well I ended up just resetting it to factory settings. ()
    At first I thought that after resetting it, everything would be fine, but I've had to do that with my old Dell Laptop. 
    Well, everything is not fine. 
    Now I just keep getting the same message pop up on my screen every so often, telling me I have to "start the backup process" 
    But I did that already, and it keeps popping up. 
    But there is no pop up about a disk failure, or how to fix it. 
    So, I'm really, really hoping that someone can help me with this!! 
    I uploaded a screen shot of the pop up, so you know exactly what I see. 
    Please and thank youu!! 
    =] 
    Katie.
    Attachments:
    wtf.PNG ‏68 KB

    It seems the hard disk is failing. The notice about backing up doesn't mean that the backup process will fix it. The computer has detected the hard disk is failing and needs replacing. It's suggesting you back up your data so that you can replace the hard drive. You could take it to a service center or try replacing the hard disk yourself. Replacing the HDD isn't usually too terribly difficult if you're comfortable. Somewhere on the bottom will be a door that can be removed to give you access to the drive. Sometimes there's a metal caddy on the drive, and sometimes there isn't it. If there isn't, you simply swap in the new drive. If there is, you'll need to remove the caddy and put it on the new drive. You'll want to ensure you have recovery discs though. You can use the Toshiba Recovery Media Creator (sometimes called Toshiba Recovery Disc Creator) to create back ups. Then you replace the hard drive, put the disc in, and start the recovery process.
    - Peter

  • Help needed with printer settings for wired ethernet connection

    I'm hoping someone can help me with a network printing issue. I have a large format color laser printer (Tektronix Phaser) and since moving to OS 10.6 I can't figure out how to configure the printer so that the system sees it. I have a simple wired ethernet network with a couple of Macs and a couple of printers. All devices are connected via a switch. When using earlier OSs I was able to connect to the Phaser using Ethertalk. Obviously this is no longer supported and I can't figure out how to set the printer so the OS can see it. I have lots of options which can be turned on or off and in some cases set up in other ways: Ethertalk, IPX, Netware, TCP/IP, DNS, LPR, HTTP and remote internet printing, I've tried messing with these but the result is always the same--system doesn't see the printer. Currently Ethertalk is on, IPX and Netware are off, TCP/IP is on, DNS and LPR are on, as are AppSocket, HTTP, FTP and remote internet printing. I can change the IP address but no matter what address I've tried I cannot ping the printer. (I'm using a Gutenprint driver for this printer.)
    I don't really know enough about all this to get anywhere and I haven't been able to find help anywhere even from tech friends. Xerox won't help me and neither will Apple. Any help would be appreciated. I can supply more detail on specifics where necessary. Thanks, Bob

    Old Phaser models may becoming more and more difficult to use, but you can give this a try.
    1. Configure the printer via front panel to use TCP/IP and enable DHCP if it's supported. If not then you will need to configure an IP address for the printer together with your local network's mask, and gateway IP address. Except for the first the others will be provided by opening Network preferences to see what those settings are. The printer's IP address needs to be set somewhere within the range of IP addresses your router provides locally.
    2. You need the PPD file required for your printer. If you have the Phaser driver installer you can use it to install the PPD or you can extract the specific PPD from the installer package. This part is tricky because I don't know where you may find the driver now if you don't have the installer. The older installers can be accessed through the Finder by selecting the package then CTRL- or RIGHT-click and select Show Package Contents from the contextual menu. You can then rummage through the package to search for the PPD for your printer. Then navigate to the /Library/Printers/PPD/Contents/Resources/ folder and drop the PPD file inside.
    3. Open Print & Fax preferences and click on Add [+] to add a new printer. Click on the IP icon in the toolbar. Select Line Printer Daemon - LPD from the Protocol drop down menu. Input the IP address you assigned the printer in the Address field. You can file in the optional fields that follow. Then from the Print Using drop down menu locate the listing for your printer and select it.

  • Help required with (soundcard) connection / settings, thanks in advan

    Help required with connection / settings between a Creative Sound Blaster Audigy Platinum EX (soundcard) and a Creative DTT3500 Digital (5. speakers).
    The problem
    No sound from any of the speakers. (Exception can plug in headphones at front)
    Background
    My computer has been recently upgraded at my local computer shop and all programs re-installed (including driver update from Creative's website). However after reconnecting speakers and restoring the original settings I?m getting no sound from any of the speakers. I?ve followed all the available advice/instructions I can find on this website and manuals to no avail.
    Set-up
    Physical
    (Digital DIN) Speakers/decoder amplifier (DTT3500) connected to the (digital out) soundcard (Audigy Platinum EX) using minijack to DIN cable. (As per instruction manual)
    Software
    Creative Audio Consul ? setting as per instructions, however have tried variations in vain. (Note: above tabs there is a select device box with SB Audigy [A0000] in it ? only option. Just wondering what [A0000] means?)
    Your advice please. A simple step by step guide would be appreciated, many thanks in advance, Jon

    "My computer has been recently upgraded at my local computer shop and all programs re-installed (including driver update from Creative's website). "
    Do you have the original installation disk?
    If so, try installing THOSE drivers, ESPECIALLY if it worked before. Be sure to uninstall what is there now, first.
    Its natural for most people to want the 'latest' drivers for their hardware. However:
    After experiencing some difficulties with some CL 'updates' for certain products, I now avoid them UNLESS I am having a PROBLEM with the existing drivers.

  • Help please with my navigation buttons

    Can anyone please help me with my vertical navigation buttons. I'm trying to set up my nav bar so that all the buttons have a background image (button.jpg) behind them at all times and the only thing that changes when touched or the mouse rolls over them is that the colour of the text changes, except when the sub buttons appear, because the name of some of the sub buttons are so long i have created another button image that is longer (button2.jpg), i only want this to appear on sub buttons otherwise the buttons will end up taking most of the pages space. I'm having great difficulties getting the sub buttons to appear with the correct image (button2.jpg) and am getting increasingly frustrated with it, can anyone please help!!!
    www.milesfunerals.com/index2.html

    index2.html is a broken link for sure. The main index page looks like it's working fine.
    A little styling critique if it's okay... Personally I'd have gone with a CSS or Javascript multi-level menu across the bottom of the header. Saves visitors from having to scroll all the way down the page to see every menu item. And I'd rethink the color of the "Miles & Daughters" in the header image. It kinda gets lost in the roses.
    If you have a link to the "broken" page please put it up so we can analyze it.

  • I am having difficulties with distributing a PDF Form. Acrobat X pro

    I am having difficulties with distributing a PDF Form. When I click the distribute button I choose the "Manually collect responses in my email inbox option" then press next, I select the "Save a local copy and manually send it later and then I specify it's location, then press next. I then press finish. Then a little black box pops up that says creating response file and nothing is happening. Can anyone help me?

    [discussion moved to PDF Forms forum]

  • Little help please with forwarding traffic to proxy server!

    hi all, little help please with this error message
    i got this when i ran my code and requested only the home page of the google at my client side !!
    GET / HTTP/1.1
    Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, application/x-shockwave-flash, */*
    Accept-Language: en-us
    UA-CPU: x86
    Accept-Encoding: gzip, deflate
    User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; InfoPath.2; .NET CLR 2.0.50727)
    Host: www.google.com
    Connection: Keep-Alive
    Cookie: PREF=ID=a21457942a93fc67:TB=2:TM=1212883502:LM=1213187620:GM=1:S=H1BYeDQt9622ONKF
    HTTP/1.0 200 OK
    Cache-Control: private, max-age=0
    Date: Fri, 20 Jun 2008 22:43:15 GMT
    Expires: -1
    Content-Type: text/html; charset=UTF-8
    Content-Encoding: gzip
    Server: gws
    Content-Length: 2649
    X-Cache: MISS from linux-e6p8
    X-Cache-Lookup: MISS from linux-e6p8:3128
    Via: 1.0
    Connection: keep-alive
    GET /8SE/11?MI=32d919696b43409cb90ec369fe7aab75&LV=3.1.0.146&AG=T14050&IS=0000&TE=1&TV=tmen-us%7Cts20080620224324%7Crf0%7Csq38%7Cwi133526%7Ceuhttp%3A%2F%2Fwww.google.com%2F HTTP/1.1
    User-Agent: MSN_SL/3.1 Microsoft-Windows/5.1
    Host: g.ceipmsn.com
    HTTP/1.0 403 Forbidden
    Server: squid/2.6.STABLE5
    Date: Sat, 21 Jun 2008 01:46:26 GMT
    Content-Type: text/html
    Content-Length: 1066
    Expires: Sat, 21 Jun 2008 01:46:26 GMT
    X-Squid-Error: ERR_ACCESS_DENIED 0
    X-Cache: MISS from linux-e6p8
    X-Cache-Lookup: NONE from linux-e6p8:3128
    Via: 1.0
    Connection: close
    java.net.SocketException: Broken pipe // this is the error message
    at java.net.SocketOutputStream.socketWrite0(Native Method)
    at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
    at java.net.SocketOutputStream.write(SocketOutputStream.java:115)
    at java.io.DataOutputStream.writeBytes(DataOutputStream.java:259)
    at SimpleHttpHandler.run(Test77.java:61)
    at java.lang.Thread.run(Thread.java:595)
    at Test77.main(Test77.java:13)

    please could just tell me what is wrong with my code ! this is the last idea in my G.p and am havin difficulties with that cuz this is the first time dealin with java :( the purpose of my code to forward the http traffic from client to Squid server ( proxy server ) then forward the response from squid server to the clients !
    thanx a lot,
    this is my code :
    import java.io.*;
    import java.net.*;
    public class Test7 {
    public static void main(String[] args) {
    try {
    ServerSocket serverSocket = new ServerSocket(1416);
    while(true){
    System.out.println("Waiting for request");
    Socket socket = serverSocket.accept();
    new Thread(new SimpleHttpHandler(socket)).run();
    socket.close();
    catch (Exception e) {
    e.printStackTrace();
    class SimpleHttpHandler implements Runnable{
    private final static String CLRF = "\r\n";
    private Socket client;
    private DataOutputStream writer;
    private DataOutputStream writer2;
    private BufferedReader reader;
    private BufferedReader reader2;
    public SimpleHttpHandler(Socket client){
    this.client = client;
    public void run(){
    try{
    this.reader = new BufferedReader(
    new InputStreamReader(
    this.client.getInputStream()
    InetAddress ipp=InetAddress.getByName("192.168.6.29"); \\ my squid server
    System.out.println(ipp);
    StringBuffer buffer = new StringBuffer();
    Socket ss=new Socket(ipp,3128);
    this.writer= new DataOutputStream(ss.getOutputStream());
    writer.writeBytes(this.read());
    this.reader2 = new BufferedReader(
    new InputStreamReader(
    ss.getInputStream()
    this.writer2= new DataOutputStream(this.client.getOutputStream());
    writer2.writeBytes(this.read2());
    this.writer2.close();
    this.writer.close();
    this.reader.close();
    this.reader2.close();
    this.client.close();
    catch(Exception e){
    e.printStackTrace();
    private String read() throws IOException{
    String in = "";
    StringBuffer buffer = new StringBuffer();
    while(!(in = this.reader.readLine()).trim().equals("")){
    buffer.append(in + "\n");
    buffer.append(in + "\n");
    System.out.println(buffer.toString());
    return buffer.toString();
    private String read2() throws IOException{
    String in = "";
    StringBuffer buffer = new StringBuffer();
    while(!(in = this.reader2.readLine()).trim().equals("")){
    buffer.append(in + "\n");
    System.out.println(buffer.toString());
    return buffer.toString();
    Edited by: Tareq85 on Jun 20, 2008 5:22 PM

  • I am having difficulties with distributing a PDF Form.

    I am having difficulties with distributing a PDF Form. When I click the distribute button I choose the "Manually collect responses in my email inbox option" then press next, I select the "Save a local copy and manually send it later and then I specify it's location, then press next. I then press finish. Then little black box pups up that says creating response file and nothing is happening. Can anyone help me?

    [discussion moved to PDF Forms forum]

  • Help needed with operating java on other programs

    I have a fairly difficult (I think) question.
    I am trying to create a program to enact itself on other programs.
    It needs to perform 4 functions.
    1) Open an exe (such as notepad)
    2) Use the exe to open another file (such as a .txt)
    3) Find the color of a specific pixel on the screen (ie, (300,800)) and
    4) Pull a number from a field in the program
    I would apprieciate any help on this, whether in the form of an answer, or a url that could help me with it.
    thanks

    you could try shell commands to the dos prompt like:
    try {
         Properties systemProps = System.getProperties();
         String osVersion = systemProps.getProperty("os.name");
         if (osVersion.equals("Windows 98"))     {               
              Runtime.getRuntime().exec("start \"notepad"");
         else if (osVersion.equals("Windows 95"))     {               
              Runtime.getRuntime().exec("start \"notepad"");
         else {  // win nt (2000 or xp)
              Runtime.getRuntime().exec("cmd.exe /c notepad");
         }catch(IOException err) {}Or locate the notepad.exe and use the runtime class to launch it, to open a txt file is exactly the same but substitute the txt file name instead of notepad, that should launch notepad and open the txt in it, if you mean open notepad and then control it and open a file, that java can?t do, need another language to do it or work with another language and java together. Not sure about the rest,

  • Hi I am have difficulties with my I tunes and Sync ...

    Hi I am have difficulties with my I tunes and Sync ... Firstly i when starting up Itunes in windows 7 .. it tells me it is incompatible when trouble shoouting it does the same ... also when hooking up I pod classic .. it will not sync .. even when i do diagnostic... Help tried many thinks no good

    Quit the game and restart the iPad.
    To quit the game - Go to the home screen first by tapping the home button. Quit/close open apps by double tapping the home button and the task bar will appear with all of you recent/open apps displayed at the bottom. Tap and hold down on any app icon until it begins to wiggle. Tap the minus sign in the upper left corner to close the apps. Restart the iPad. Restart the iPad by holding down on the sleep button until the red slider appears and then slide to shut off. To power up hold the sleep button until the Apple logo appears and let go of the button.
    If that doesn't work try this.
    Reset the iPad by holding down on the sleep and home buttons at the same time for about 10-15 seconds until the Apple Logo appears - ignore the red slider - let go of the buttons.

  • Can anyone help me with process of moving only my pics and music (purchased and imported cds) from a old G5 to a new iMac. Thanks Dan

    Can anyone help me with process of moving only my pics and music (purchased and imported cds) from a old G5 to a new iMac. Thanks Dan

    The easiest way is to connect the G5 and your new iMac together via Firewire.  Then you can use what is called "Target Disk Mode" which basically makes the G5 look like an external hard drive to your iMac.  The potential gotcha is if your new iMac does not have a Firewire port.  In that case, you need to get the Apple Thunderbolt-Firewire adapter in order to connect the two machines (as far as I know, all G5's had one or more Firewire ports).  I have done this many times, it's easy and works perfectly.
    Alternatively, you could connect both Macs to the same network and log into the G5 from your iMac.  This involves going into System Preferences > Sharing on the G5 and turning on File Sharing and then logging in from your iMac to the G5 as if it were a server.   (Logging in through the Finder or via Go > Connect to Server).  This also works fine but it's a little more involved than using Target Disk Mode.  I do this all the time and it too works fine.
    Either way, once the two Macs are connected, you will use the Finder on your iMac to copy files/folders from your G5 the same as you would from any external hard drive.  Regarding iTunes, you could just copy your entire iTunes library over to your iMac being careful to put it in the same relative folder location:   /users/yourusername/Music/iTunes   This method will preserve your playlists and album art.  Alternatively you could go into iTunes and do Add to Library but I'm not completely sure doing it that way will bring over your album art and it certainly won't bring over your playlists.
    I see no reason to use a separate external hard drive.  It will just double the time it takes to transfer your files because you would first have to copy everything to the hard drive, then in a second step copy everything from the hard drive to your iMac.
    Note:  In all cases there is the possibility that you may need to change file & folder permissions on the things you copy over so you can access (read & write) to these folders & files once copied to your new iMac.  This is not a difficult process.

  • I am having difficulties with iPhoto slideshow.  The slide show stops in the middle of a presentation and the system crashes.  I must power off to exit the app and restart my MacBook pro.

    I am having difficulties with iPhoto slideshow. It crashes in the middle of the presentation and I have to power off and restart my computer to get it running again.

    Wow. Okay...
    I'll let the real veterans in this forum tackle your issues one after the other. But, I can tell you, all will be well.
    My only comment would be re: your computer specs:
    BJReis wrote:
    .  This may be due to somewhat older equipment:
    GHz Intel Core Duo MacBook Pro with a 4GB memory computer with Ddr3 running OSX 10.8.4
    To be completely honest, FCPX is a RAM hog. It just is. But, RAM is relatively cheap, and the pay-off is good.
    4GB is right on the edge, IMHO. 16G is ideal.
    I wish you luck, hang in there, and standby for more help.

  • Help please with Setting up Fonts

    Hello, thanks in advance.
    By day I work at a studio on an Apple Mac, using InDesign.
    By evening I work at home on my Windows 8 PC, using InDesign with the Creative Cloud.
    Therefore I'm having difficulties with the transferring of fonts.
    Specifically, I have two problems and hoping someone may be able to kindly help on here...
    Taking one example, font Gotham.
    - I have been able to transfer this font to my Window 8 PC. I have installed all Gotham styles (16 of them - eg Bold, Bold Italic, Regular, Book etc) onto my PC, using the inbuilt Windows 'Font' window in the Control Panel.
    - Early indications are good - when I load up InDesign, I can see all 16 of these fonts and can select and use them.
    - But I have two subsequent issues
    1) The 16 fonts show up as roughly 8 separate Fonts, each with only 1 or 2 styles. At the Studio, in InDesign, I just select 'Gotham', and then there are 16 sub-fonts (styles?) to choose from. On my PC, there are 8 separate fonts, despite all being grouped together as one 'Family' in the Font window on my Control Panel. Is there a way that these fonts can be grouped together on InDesign? Otherwise it's a real pain to use!
    2) More importantly, I package my work on the Apple computer, save and take home. When I reload at home it says that it cannot find the 'Gotham' fonts, despite the fact that InDesign shows them! Therefore all fonts convert to the default.
    Is anyone aware of these issues and able to help?
    Many thanks in advance, greatly appreciated.
    Thanks, Simon

    When you see fonts on PC with 0 bytes it usually indicates that they are Mac format Type1 or TrueType fonts, and they are not usable on the PC.   I've been doing some reading, and you might want to as well, at http://www.typography.com/ask/faq.php (particularly item 32), which explains at least partially why you are seeing different names and groupings across platforms. You may see this even with an OpenType version of the font.  You should also read the EULA (http://www.typography.com/home/eula.php). Based on the EULA I would not choose Gotham for any work that was going to be distributed electronically.

Maybe you are looking for