Converting from JDK 1.0 to JDK 1.1    -deprecated classes.

as the above topic explains.
this is my code, i still get the -deprecated error even after i replace the classes. i need major help pls!
import java.awt.*;
import java.applet.*;
import java.awt.event.*;
public abstract class snake extends Applet implements Runnable,KeyListener,ActionListener
static int LEFT,RIGHT,UP,DOWN;     
Image dot[]=new Image[400];
Image back;
Image offI;
Graphics offG;
int x[]= new int[400];
int y[]= new int[400];
int rtemp=1;
int game=1;
int level;
int z;
int n;
int count=0;
int score=0;
int add=1;
Button b= new Button("Beginner");
Button i= new Button("Intermediate");
Button p= new Button("Professional");
Button X= new Button("Xtreamest");
String stemp;
String s;
String t;
boolean go[]=new boolean[400];
boolean left=false;
boolean right=false;
boolean up=false;
boolean down=false;
boolean started=false ;
boolean me=false;
Thread setTime;
public void init()
add(b);
add(i);
add(p);
add(X);
setBackground(Color.black);
back = getImage(getCodeBase(), "screan.gif");
for (z=0 ; z < 400 ; z++){dot[z] = getImage(getCodeBase(), "dot.gif"); }
public void update(Graphics g)
Dimension d = this.size();
if(offI == null)
offI = createImage(d.width, d.height);
offG = offI.getGraphics();
offG.clearRect(0, 0, d.width, d.height);
paint(offG);
g.drawImage(offI, 0, 0, null);
public void paint(Graphics g)
g.drawImage(back, 0, 0, this);
g.setColor(Color.white);
if(started)
g.setFont(new Font("Verdana", 1, 12));
t = "Score "+score+"";
g.drawString(t, 75, 220);
if(game==1)
g.setFont(new Font("Verdana", 1, 13));
s = "Select Mode";
g.drawString(s, 65, 30);
b.move(75, 50);
i.move(68, 90);
p.move(68, 130);
X.move(73, 170);
if((game==2)||(game==3))
if(!started)
g.setFont(new Font("Verdana", 1, 11));
t = "Use the key board arrows to move!";
g.drawString(t, 5, 215);
for (z=0 ; z <= n ; z++){  g.drawImage(dot[z],x[z],y[z],this); }
me=true;
if(!me)
g.setFont(new Font("Verdana", 1, 11));
t = "by Omar Wally, http://crash.to/PLAY";
g.drawString(t, 5, 215);
if(game==3)
g.setFont(new Font("Verdana", 1, 13));
s="Game Over";
g.drawString(s, 65, 60);
public void run()
for(z=4 ;z <400 ; z++) { go[z]=false;}
for(z=0 ; z<4 ; z++) { go[z]=true;x[z]=91;y[z]=91;}
n=3;
game=2;
score=0;
b.move(70, -100);
i.move(70, -100);
p.move(70, -100);
X.move(70, -100);
left=false;
right=false;
up=false;
down=false;
locateRandom(4);
while(true)
if (game==2)
if ((x[0]==x[n])&&(y[0]==y[n])){go[n]=true;locateRandom((n+1));score+=add; }
for(z = 399 ; z > 0 ; z--)
if (go[z])
x[z] = x[(z-1)]; y[z] = y[(z-1)];
if ((z>4)&&(x[0]==x[z])&&(y[0]==y[z])){ game=3; }
if(left){ x[0]-=10; }
if(right){ x[0]+=10; }
if(up){ y[0]-=10; }
if(down){ y[0]+=10; }
if(y[0]>191){y[0]=191;game=3;}
if(y[0]<1){y[0]=1;game=3;}
if(x[0]>191){x[0]=191;game=3;}
if(x[0]<1){x[0]=1;game=3;}
if (game==3)
if (count <(1500/level)) { count++; } else { count=0;game=1;repaint();setTime.stop(); }
repaint();
try{setTime.sleep(level);}
catch(InterruptedException e){}
public void locateRandom(int turn)
rtemp=(int)(Math.random()*20);
x[turn]=((rtemp*10)+1) ;
rtemp=(int)(Math.random()*20);
y[turn]=((rtemp*10)+1);
n++;
/*public boolean keyDown(Event e, int key)
if ((key == Event.LEFT) &&(!right)){left = true; up = false; down = false;if(!started)started=true;}
if ((key == Event.RIGHT) && (!left)){right = true; up = false; down = false;if(!started)started=true;}
if ((key == Event.UP) && (!down)){ up = true; right = false; left = false;if(!started)started=true;}
if ((key == Event.DOWN) && (!up)){down = true; right = false; left = false;if(!started)started=true;}
return true;
     public void keyReleased(KeyEvent e)
     public void keyTyped(KeyEvent e)
     public void keyPressed(KeyEvent e)
     if ((key == Event.LEFT) &&(!right)){left = true; up = false; down = false;if(!started)started=true;}
     if ((key == Event.RIGHT) && (!left)){right = true; up = false; down = false;if(!started)started=true;}
     if ((key == Event.UP) && (!down)){ up = true; right = false; left = false;if(!started)started=true;}
     if ((key == Event.DOWN) && (!up)){down = true; right = false; left = false;if(!started)started=true;}
     //return true;
public boolean actionPerformed(ActionEvent event, Object obj)
stemp = (String) obj;
if(stemp.equals("Beginner"))
add=2;
level=100;
setTime = new Thread(this);
setTime.start();
return true;
if(stemp.equals("Intermediate"))
add=5;
level=70;
setTime = new Thread(this);
setTime.start();
return true;
if(stemp.equals("Professional"))
add=10;
level=40;
setTime = new Thread(this);
setTime.start();
return true;
if(stemp.equals("Xtreamest"))
add=20;
level=20;
setTime = new Thread(this);
setTime.start();
return true;
return false;
}

i still get -deprecated after trying!!! ahh!!!

Similar Messages

  • XML Transformation - Migration from JDK 1.4 to JDK 1.6

    Hi all,
    I am switching from JDK 1.4 to JDK 1.6 but my XSLT transformations are outputting different XML (although structurally sound). JDK 1.6 outputs the namespaces for each element rather than placing them at the top level node.
    I've included the settings and the code below. I expect that there is a feature or a way to handle this but I have not been able to find it now for several days.
    Any recommendations would be greatly appreciated.
    Regards
    Paul
    JDK1.4
    JAXP: loaded from fallback value: org.apache.xalan.processor.TransformerFactoryImpl
    JAXP: loaded from fallback value: org.apache.crimson.jaxp.SAXParserFactoryImpl
    <?xml version="1.0" encoding="UTF-8"?>
    <ex1:IE518 xmlns:xdata="http://www.edifecs.com/xdata/100" xmlns:exe="http://test.com/schemas/ex1/elements/v1" xmlns:ext="http://test.com/schemas/ex1/extypes/v1" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:ex1="http://test.com/schemas/ex1/MSG/v1">
    <ext:Common>
    <exe:SyntaxID>UNOC</exe:SyntaxID>
    <exe:MessageID>00000000000000</exe:MessageID>
    <exe:IEMessageType>MsgType</exe:IEMessageType>
    </ext:Common>
    <ext:Header>
    <exe:SpecificCircumstanceIndicator>B</exe:SpecificCircumstanceIndicator>
    <exe:Transit>0</exe:Transit>
    <exe:CommercialReferenceNumber>DHL11-7-43</exe:CommercialReferenceNumber>
    </ext:Header>
    </ex1:IE518>
    JDK 1.6
    JAXP: loaded from fallback value: com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl
    JAXP: loaded from fallback value: com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl
    <?xml version="1.0" encoding="UTF-8"?>
    <ex1:IE518 xmlns:ex1="http://test.com/schemas/ex1/MSG/v1">
    <ecc:Common xmlns:ext="http://test.com/schemas/ex1/extypes/v1">
    <exe:SyntaxID xmlns:exe="http://test.com/schemas/ex1/elements/v1" >UNOC</ece:SyntaxID>
    <exe:MessageID xmlns:exe="http://test.com/schemas/ex1/elements/v1" >00000000000000</ece:MessageID>
    <exe:IEMessageType xmlns:exe="http://test.com/schemas/ex1/elements/v1" >MsgType</ece:IEMessageType>
    </ecc:Common>
    <ecc:Header xmlns:ext="http://test.com/schemas/ex1/extypes/v1">
    <exe:SpecificCircumstanceIndicator xmlns:exe="http://test.com/schemas/ex1/elements/v1" >B</ece:SpecificCircumstanceIndicator>
    <exe:CommercialReferenceNumber xmlns:exe="http://test.com/schemas/ex1/elements/v1" >DHL11-7-43</exe:CommercialReferenceNumber>
    </ecc:Header>
    </ex1:IE518>
    try {
         byte[] transformed;
         StreamSource inputData = new StreamSource( new ByteArrayInputStream( xml_ecs.getBytes( ) ) );
         FileInputStream xsltData = new FileInputStream( xsl_file_path );
         StreamSource transformationData = new StreamSource( xsltData );
         StreamResult streamResult = new StreamResult(new ByteArrayOutputStream( ));
         //create transformer factory
         TransformerFactory tFactory = TransformerFactory.newInstance( );
         Transformer transformer = tFactory.newTransformer( transformationData );
         //perform transformation
         transformer.transform( inputData, streamResult );
         transformed = ((ByteArrayOutputStream) (streamResult.getOutputStream( )))
              .toByteArray( );
         System.out.println ("TRANSFORMED OUTPUT [" + new String(transformed) + "]");
    catch (TransformerException texsc) {
         System.out.println( "TransformerException caught: "
                   + texsc.getMessage() );
         throw texsc;
    catch (Exception ex) {
         ex.printStackTrace();
         System.out.println(ex.getMessage());
    }

    Can you post relevant pieces of your input document and the xsl?

  • Upgrade from JDK 1.2.2 to JDK 1.4.2. Any code changes required?

    Hi,
    We are in the processes of upgrading the JDK versions on servers to JDK 1.4.2 to support other software upgrades.
    The JDK versions on each of the servers are at different versions. On one of the servers, the version of JDK is currently at JDK 1.2.2_10. Can somebody please advise me if there would be any code changes required to support this upgrade (such as some methods being depreciated)?
    We are also evaluating if we need to upgrade to JDK 1.4.5. In such a case, would there be any code changes required to upgrade from JDK 1.4.1_x to JDK 1.4.5. I assume there wouldn't be any changes for this minor upgrade but just want to confirm.
    I would really appreciate an early reply.
    Thanks in advance.
    Regards,
    Vamshi

    "1.4.5" - you meant "1.5" ? :)
    About deprecations -- you will be warned by the compiler. E.g. "assert", "enum" are keywords and cannot be used as method names.
    The rest depends on your application. The more complex it is, the more differences can be encountered. You certainly need to run a test cycle for it with the new platform.
    From my experience, I can list some issues that I have read about or have experienced myself:
    1) serialization: the algorithm used to calculate the serialVersionUID had some changes between Java versions, due to compiler-added extra methods.
    If you don't have serialized instances, or your serialVersionUID is specified explicitly, you are safe.
    2) class loading order can be different in different platforms
    Once ago I have seen a paper from BEA Systems highlighting some open topics that can arise when migrating between different vendor's JVMs. Probably, it is the one:
    http://edocs.bea.com/jrockit/geninfo/devapps/codeprac.html
    In my friend's case, there was some class-initialization logic, that behaved differently when class loading order changed.
    3) Swing applications can sometimes behave slightly different.
    E.g., I observed some changes in focus handling, although minor ones. Fixed with several lines of code.
    4) Some libraries can depend on particular J2SE version. E.g. J2EE ones.
    E.g. I was not able to run J2EE 1.4 thick client application with JRE 1.5. The j2ee library used by the app either had some dependencies on sun.* classes, or on some protocols (not sure, I don't remember it well).
    5) Regression bugs are sometimes encountered. I.e. something that worked, does not work now.
    Summary: You need testing.

  • Migration problems from Jdk 1.3 to Jdk 1.4.2_05

    ?Hi,
    We have migrated our code from Jdk 1.3 to Jdk 1.4.2_05 and we are facing the following issue:
    We have a table which displays results retrieved from DB,
    When we migrated the table headers were not displayed properly due to some width parameters, so when we hardcoded the width to increase by 10, the headers are seen properly. But there is a gap between each header names.It is not set to the whole column width.
    We are getting the width of the comp as follows:
    Component comp = renderer.getTableCellRendererComponent(table,
    col.getHeaderValue(),false,
    false, 0, 0);
    return comp.getPreferredSize().width + 10;
    And we are setting the column width as below:
    We are checking whether the cellcontent width or the header width is greater and we are passing the max width.
    col.setPreferredWidth(width);
    Kindly help me in this regard,
    Thanks in advance,
    Kala

    You may get a better response posting this question in a more appropriate forum such as the Java Swing forum or the AWT forum. See forums below:
    http://forum.java.sun.com/forum.jsp?forum=57
    http://forum.java.sun.com/forum.jsp?forum=5

  • Migrating application from jdk 1.4 to 1.5

    Hi,
    I am planing to migrate my application from JDK 1.4 TO 1.5 . I am also using AJAX4JSF in application.Did anyone encounter any issue after migrating or during the migration to JDK 1.5 ?
    Thanks in advance

    You should be calling wrap() to wrap your keys, not doFinal(), or alternatively initializing your cipher to be ENCRYPT'ing, not WRAP'ing.

  • Planning to upgrade my application from JDK 5 to JDK 6

    Hi All,
    We are planning to upgrade JDK from JDK 5 to JDK 6. I would like to the stable release or update in JDK 6.
    Our development environment is Windows and Production environment is Red Hat Linux 5.4 (64bit).
    Please suggest the stable release in JDK 6 to upgrade my application.
    Regards,
    Kiran

    Apple's USB drive won't work with your computer at all.

  • Configuring JDev to use javac from JDK

    Is there anyway to make JDevleoper use Javac from JDK. We are seeing some discrepancies in the code generated by ojc.
    Thanks.
    Suhas.

    Starting with JDeveloper 9.0.3 Preview Release, you can use ANT to build your project
    and with ANT you can use Javac.

  • Convert from String to boolean ??

    hi everyone..
    is there any way to convert from String (as a class) to boolean (as a primitive type) ?
    thunx

    I used : Boolean.valueOf(s).booleanValue(); ,I got the same error.What same error? Surely not this one:
    cannot resolve simple in parseBoolean method??
    equals is OK, but I think it is not convert method,
    the prev. solutions by equals don't convert the value of s (String).Yes it does, for any reasonable definition of "converts". In fact, that is essentially how parseBoolean() is implemented. From the JDK 5.0 source code, class java.lang.Boolean:
         return ((name != null) && name.equalsIgnoreCase("true"));

  • ABAP code needed to convert from 0calmonth2 & 0calyear to 0calmonth

    Hi SAP GURUS,
    Can anybody give me the ABAP code to convert from 0calmonth2 and 0calyear to 0calmonth.and please suggest me whether i have to write start routine or end routine in transformations.
    Thanks ALL.

    hi,
    in the transformation map 0calmonth2 and 0calyear to the 0calmonth field, and from drop down choose routine.
    there will be an area where it will be mentioned write your piece of code below this line.
    paste the below code:
    Concatenate source_fields-0calmonth2 source_fields-0calyear into result.
    also delete the line result = .
    save the routine and execute the package.
    regards,
    Arvind.

  • The bullet list, numbered list and the normal text is not converting when I am converting from RH 9 to MS Word 2010

    Hi all,
    Greetings for the day
    I am created a new CSS in Robohelp 9. I have also created a new template in Word 2010. The style sets for different information elements like (Heading, bullets, body text, ) are more or less same between the CSS and the new templates. I am also able to map the .css styles to Word template when I am converting from RH to Word as I am getting the necessary option in the drop-down list.
    However, when the output is generated, the bullet, the numbered list and the body text is not converting at all. The body text works sometimes. However, the numbered list and bullet list is coming out as images.
    If anybody knows the solution, I can share the .css and Word template.
    Thanks in advance.
    Regards,
    Parag Deb

    Create a new project with two or three topics containing lists of both types. Generate a printed output that shows the problem. Then zip it up and send it to me. See the Contact page on my site for instructions.
    See www.grainge.org for RoboHelp and Authoring tips
    @petergrainge

  • How do I convert from pdf to word? I see an option to do so, however, when I click on it, Ia box opens...

    when I try to convert from pdf to word, a box opens and suggests I am to click on (select) the file I want to convert. It sounds all well but it does not work. I really really just want my files back in word, all of them, no matter, because after having to reinstall windows 7 (done by techs) and me having to re-download all my HP drivers, and tools, and other software, which I imagine included adobe reader, now I see some pdf files won't open. It says, "access denied" and boy that really makes me wantt o scream. I am the ONLY user, it is my notebook, I am the administrator so I can't figure out why some files open and some don't. I can't ascertain any difference.
    I would be grateful for any help. This has become just too exhausting. After reinstalling sooooooooo much, then to have to go through this with what is a free application? I say I think not.
    This should NEVER happen with any free application and boy there is NO help to be found. They blow you off the phone fast telling you it's a free application. Then why are you putting in this kind of  stuff that it won't open? This is NOT a shared notebook, it's mine. I am the only user, personal use.
    HP probook, if anyone needs that info.
    Please, will someone help?
    I would be so grateful.
    thanks,
    Gina

    Gee, Pat, this is a  real big help.
    Nobody could possibly think anyone would ask for help without first trying to fix the issue oneself. Or maybe you do. I have opened the file and looked under security. I have changed it to owner-notebook (which is what the techs called me) and clicked accept but geepers it didn't work.
    Maybe someone else has an idea.
    Take Ownership of a File or Folder
    The above should be a link. At least I copied and pasted the link. I did what was stated in there. It isn't like brain surgery. But it is not working. I ended up being able to open some pdf files after transferring them from one partition category to another. I wish it was that easy as you seem to think.
    Thanks for the help. Have a great year.

  • How do you stop DNG Converter from embedding Adobe's ACR default settings instead of custom settings?

    I notice that the new version of Adobe DNG Converter (8.6, and maybe earlier) appears to place Adobe's ACR defaults in the converted file.  Thus, the converted files open up in Bridge with an indication that they already have settings made, and, hence, ACR does not apply the custom camera settings.  One has to Clear Settings first in Bridge, then open in ACR.
    This behavior is new, perhaps to 8.6.  But it's presence defeats the purpose of having custom Camera Defaults.
    Is there any way to prevent DNG Converter from installing settings?

    ssprengel wrote:
    What do you mean by “custom camera settings”?  Do you mean you’ve changed the Camera Raw defaults for a particular camera and those aren’t being seen until you do a Reset?  Or do you mean some sort of Nikon-settings that Adobe never looks at?
    Also at what point in the workflow are you converting these files, just after copying them to your hard-disk and before touching them with any other Adobe software, or after they’ve been adjusted in Nikon software, or after they’ve been adjusted in Bridge/ACR, initially as NEFs?
    I mean my custom camera defaults that are set by the Save New Camera Defaults for a given camera.
    My workflow is to take my original raw files first into Adobe DNG Converter.  I then open the folder in Bridge.  At this point I notice that my original raw files remain unaltered (there is no "settings" icon in the top right corner – circle with two lines and up-arrows – in the image's thumbnail), but the converted dng's (otherwise untouched and unopened in ACR) have a "settings" icon.  When I open the original raw file in ACR, it opens using my custom camera defaults.  When I open the otherwise virgin dng in ACR, it opens using the Adobe defaults (the same defaults that would be employed if no custom camera default had been set).
    This behavior is new.  DNGs formed by earlier versions of the DNG Converter did not apply any settings to the converted file, and when they opened in Bridge, they were given the custom camera settings.
    In order to retain the old (and proper) behavior, I now have to take the just-converted documents into Bridge, select them, and immediately apply Develop Settings/Clear Settings.  That gets rid of the settings that have been installed by the DNG Converter (as well as the "settings" icon on the thumbnail).
    I notice there is a new feature in Adobe DNG Converter 8.6, namely, a panel-specific toggle between the settings and the default settings. This indicates to me the likelihood that Adobe has been making some alterations with the settings that is having unintended consequences.  It clearly is not proper for DNG Converter to be adding (installing) settings, because that prevents the custom camera default settings from being applied, and hence defeats the purpose of the custom camera default settings.

  • Applescript to convert from AW6 spreadsheets to Excel

    I have an iMac (iMac12,2) running OS 10.9.1 with applications of Pages’09 (4.3), Pages (5.0.1), Numbers’09 (2.3) and Numbers (3.0.1) available.
    One of my laptops is a MBA (MacBookAir1,1) that I have kept at 10.6.8 with applications Appleworks (6.2.2) and Appleworks (6.6.9) available.
    Recently, I converted many CWWP documents from AW6 into Pages.  This was done on the iMac with an Applescript that copied a file (AnyDocumentCWWP) to the desktop as a file named AWV6, opened AWV6 with Pages’09, saved the result as AWV6.Pages, applied the creation date and modify dates of the original to AWV6.Pages, moved the new AWV6.Pages to the original directory and moved the original file to the trash, renamed AWV6.Pages to the original filename (excluding extension).  The Pages version of the original document does not preserve the formatting of the CWWP, but the content was now discoverable with Spotlight.  Since I was primarily concerned with the content, I would consider the conversion effort successful enough.
    I performed the same sort of process on the iMac with CWSS documents converting from AW6 into Numbers.  Here the results were less successful.  I discovered that many of the converted spreadsheets had cells where the cell contained the last calculated value in substitute for the formula originally present -or- Numbers was unable to open the CWSS spreadsheet due to size limitations.  Neither problem occurs when the file is converted on the MBA by Appleworks into an Excel format.  For those CWSS files that did not properly convert to Numbers, I would like to perform a conversion to Excel.
    When a given spreadsheet is manually opened on the MBA with either version of Appleworks, one can “Save as” using several formats of Excel.  That operation will preserve the formula which cannot be recognized in Numbers’09. An example of this issue is when a spreadsheet has a cell that contains a formula with the function “ISNUMBER”.  When I manually open a CWSS in Appleworks (either 6.2 version), I can Save As Excel Win 97 … or Excel Mac 98 … creating an XLS file that preserves the formula.
    I have attempted two techniques with Applescript to be able to convert my CWSS documents into XLS format.  Neither seem to work.
    The first technique is very similar to a few lines extracted from a canned script found on http://macscripter.net/viewtopic.php?id=8296 the relevant code is:
    set theSprTranslator to "Excel Win 97, 2000, XP 2002 spr"
    tell application "System Events" to set mfpath to get path of disk item ("~/desktop/" as string)
    set newfile to (mfpath & "AWV6" as string)
    set NewFilename to AWV6XLS
    tell application "AppleWorks 6"
        activate
        open newFile -- alias reference is ok
        save using translator theSprTranslator with NewFilename and replace
        close front document without saving
    end tell
    When this did not work, I attempted a scripted GUI solution as a second option.  The GUI code I had found at http://stackoverflow.com/questions/17348326/applescript-to-save-an-appleworks-do cument-wont-compile-end-tell-vs-end-easy is:
    tell application "System Events"
             tell process "AppleWorks"
                     click menu item "Save As…" of menu "File" of menu bar 1
                     click menu button "File Format" of window "Save : AppleWorks 6"
                     click menu item "Excel Mac 5 spreadsheet" of menu 1 of menu button  "File Format" of window "Save : AppleWorks 6"
                     keystroke return
             end tell
    end tell
    Unfortunately there is no “File Format” menu button, after a bit of further research, I discovered UI Browser and wrote my own Applescript equivalent:
    set mytempwork1 to AWV6
    set theSprTranslator to “Excel Win 97, 2000, XP 2002 spr”
    tell application "Finder" to open file (mytempwork1 as string) of the desktop
    tell application "System Events"
        tell process "AppleWorks"
            click menu item "Save As…" of menu "File" of menu bar 1
            tell text field 1 of window "Save : AppleWorks 6"
                set value to "XX" & mytempwork1
            end tell
            click pop up button 1 of group 1 of window "Save : AppleWorks 6"
            click menu item theSprTranslator
            —click radio button 2 of group 1 of window "Save : AppleWorks 6"
            —delay 3
            —click radio button 1 of group 1 of window "Save : AppleWorks 6"
        end tell
    end tell
    tell application "System Events"
        tell process "AppleWorks"
            delay 10 — <<<<<IF YOU CLICK ON THE BUTTON WHILE IN THIS DELAY, THE SCRIPT WILL BEHAVE PROPERLY
            click button "Save" of window "Save : AppleWorks 6"
            delay 1
        end tell
    end tell
    This GUI script behaves almost as I would like.  It seems to ignore the setting of the “pop up button 1” unless I actually intervene while the script is running and I click on the button.  When I do so, the script runs as intended.
    Is there a way to force Appleworks to recognize the Applescripted value of the “clicked” menu item?

    Hello
    As far as I know, there's no need to resort to GUI scripting. The problem in exporting in AppleScript is that AppleWorks 6 only accepts typeChar (TEXT) data as translator name while AppleScript string has become always being represented as typeUnicodeText (utxt) since OS X 10.5. This makes passing translator name to save command difficult but there's a workaround method as shown in the sample code below. The |TEXT|() handler does the job. Tested with AppleWorks 6.2.4 under 10.6.8.
    main()
    on main()
        set export_translator to "Excel Mac 98, 2001 spreadsheet"
            "Excel Mac 5 spreadsheet"
            "Excel Mac 98, 2001 spreadsheet"
            "Excel Win 5 spreadsheet"
            "Excel Win 97, 2000, XP 2002 spr"
        set export_translator_TEXT to my |TEXT|(export_translator)
        set src to (path to desktop)'s POSIX path & "in.cwk"
        set dst to (path to desktop)'s POSIX path & "out.xls"
        set srca to src as POSIX file as alias
        set dsta to touch(dst) as POSIX file as alias
        tell application "AppleWorks 6"
            --return export translators
            open srca
            tell document 1
                if document kind = spreadsheet document then
                    save in dsta using translator export_translator_TEXT
                end if
                close saving no
            end tell
        end tell
    end main
    on touch(f)
        do shell script "touch " & f's quoted form
        return f
    end touch
    on |TEXT|(u)
            string u : source text
            return data : «data TEXT...» representing u converted to MACROMAN encoding
        do shell script "u=" & u's quoted form & "; printf '%s' \"$u\" | iconv -f UTF-8 -t MACROMAN | xxd -p"
        run (run script "
    script
        «data TEXT" & result & "»
    end script")
    end |TEXT|
    Hope this helps,
    H

  • How do I convert from PAL to NTSC in compressor?

    I have a project I converted from mp4 file to Apple Pro Res to edit it in FCP.  I exported using Compressor and tried to import the files to DVD Studio Pro.  It said it can't put PAL files into an NTSC project.  I didn't even realize it was filmed in PAL (yes, I have the rights to use the footage).  How do I convert the files from PAL to put it into FCP...in Compressor?  If so, how?  Thanks for any help!

    To  convert the 25fps PAL file to a 29.97fps file staying within the ProRes codec:
    • Open up compressor. In the Settings window select: Apple>Formats>Quicktime>ProRes 422
    • Select the "Duplicate Selected Setting" icon in the upper left of the Settings window
    • This creates duplicate of the preset that you can edit
    • Select the preset copy and, in Inspector, give it a new name (something like ProRes PAL>NTSC)
    • In Encoder>Video Settings>Frame rate - and change the frame rate to 29.97
    • In Frame Controls> turn them on and set Resize Filter and Rate Conversion to BETTER.  (If so set them to BEST, be prepared for a long wait)
    • In the Geometry tab, set the Frame Size to 720x480 (you don't say if the file is 16:9 or 4:3)
    • Submit the file and go have dinner. Depending on the length of the file, it may take hours.
    Have fun.
    x

  • Converting from a Business View connection to a non-Business View Error

    I have CR 2008 report with SP1. The report has a sub report. The main report is based off of a BV but the sub report is using an ODBC connection. When I try to update the ODBC connection I recieve an error message telling me that:
    Quote:
    "Converting from a Business View connection to a non-Business View connection is not supported."
    I am do not want to update the BusinessView just the ODBC connection for the subreport.

    Hi Michael,
    When you try to update both the Business views and ODBC connection you will be  prompted for  those errors.
    You need to break the link  in the report and update the connections individually.
    Thanks,
    Naveen.

Maybe you are looking for

  • Commit in a loop of records for the cursor

    Hello my procedure has the following structure procedure proc2 BEGIN begin insert into table A exception when others log the error return end begin insert into table B exception when others log the error return end END--end of proc2 --main procedure

  • How to view pdf files inside firefox?

    I spent hours on this. pdf.js sucks ass. Neither foxit nor adobe reader works. I have been using firefox since 2.0.0.20. I will have to quit if I can't view the pdf files inside my browser! The worst thing that has ever happened to firefox is the pdf

  • Queue / Support package issue

    Hi everyone! Can someone give me direction on resolving the following issue? Ssytem: SAP ECC 6.0 I first updated the Kernel from level 58 to 83. eveything went fine from what I can see. Then I have been importing a queue to implement some Support Pac

  • Why not use Redo log for consistent read

    Oracle 11.1.0.7: This might be a stupid question. As I understand if a select was issued at 7:00 AM and the data that select is going to read has changed at 7:10 AM even then Oracle will return the data that existed at 7:00 AM. And for this Oracle ne

  • Problems aligning the second toolbar in one page

    Hi, I've got 2 Toolbar Regions with Lists and Buttons in it. These should be displayed with the breadcrumbs in the Page Template Region Position 1. When I just have the Breadcrumbs and then 1 Toolbar, the Breadcrumbs are displayed left, the Toolbar o