Converting from integers to roman numerals

i'm new to the whole programming scene, so I've been working with a few practice programs. I've got this one extremely close to working, but the compiler still gives me one error, and it completely baffles me. here's the code:
package practiceprograms;
import java.io.*;
public class RomanNumerals {
     //ButtonCreator c = new ButtonCreator(); //uncomment at start of line to implement GUI and all other full line comments too.
     public static void main(String[] args) {
          //console.run(new ButtonCreator(), 200, 100);
          Numerals.removeNumbers(String number, int i);
class Numerals {
     static void removeNumbers(String s, int x) {
          GetNumber b = new GetNumber();
          while (x != 0){
               b.getInput(x);
               if (x < 0) {
                    x = -x;
                    s += "Negative ";
               for(; x>=1000; x -= 1000) {
                    s += "M";
               for(; x>=100; x -= 100) {
                    s += "C";
               for(; x>=50; x -= 50) {
                    s += "L";
               for(; x>=10; x -= 10) {
                    s += "X";
               for(; x>=5; x -= 5) {
                    s += "V";
               for(; x>=1; x--) {
                    s += "I";
          //if (i = null)
          //     c.actionPerformed();
          System.out.println(s);
               //txt.setText(s);
class GetNumber {
     int getInput(int x) throws IOException {
          System.out.println("Please enter a non-zero number between -10000 and 10000. If you enter zero, the program will quit.");
          System.out.println("Return a blank line or zero to quit the program.");
          BufferedReader in = new BufferedReader(
               new InputStreamReader(System.in));
          x = in.readline();
          GetNumber.getInput(x);
        return x;
     int checkI(int t) {
          if (t > 10000 | t < -10000) {
               System.out.println("Err: Please enter a non-zero number between -10000 and 10000.");
               GetNumber n = new GetNumber();
               n.getInput();
               n.checkI(i);
               return i;
          else
               return t;
} and the error it gives me:
C:\Documents and Settings\Aishu\Desktop\java class and source files\RomanNumerals.java:8: ')' expected
Numerals.removeNumbers(String number, int i);
^
1 error
its irritating, because its almost saying that the method removeNumbers shouldn't take any arguments... or atleast thats what it seems like to me... any ideas as to what the problem is?

hmm... well i recompiled, and reran the program (i'm using JCreator LE to write, compile, and run the programs.) and it gave me a new error... a more descriptive one, but i'm not too sure what it means. I can't copy and paste, but i'll type it into here:
"Exception in thread "main" java.lang.ExceptionInInitializerError
Caused by: java.lang.NullPointerException
at comararjun.RomanNumerals.<init>(RomanNumerals.java: 106)
at comararjun.GetNumber.<clinit>(RomanNumerals.java:9)
Press any key to continue..."
here's the code:
package comararjun;
import java.io.*;
import javax.swing.*;
import javax.swing.event.*;
import javax.swing.text.*;
import java.awt.*;
import java.awt.event.*;
class GetNumber {
          static RomanNumerals r = new RomanNumerals();     
/*line 9*/ static int getInput(int x) throws IOException {
          P.rintln("Please enter a non-zero number between -10000 and 10000.");
          P.rintln("Enter a zero to exit.");
          P.rintln();
          BufferedReader in = new BufferedReader(
               new InputStreamReader(System.in));
          x = Integer.parseInt(in.readLine());
          //System.out.println(x);
          //checkI(x);
          //System.out.println(x);
return x;
//     static int checkI(int t) {
//          if (t > 10000 || t < -10000) {
//               RomanNumerals.r.setText("Err: Please enter a non-zero number between -10000 and 10000.");
//               RomanNumerals.i = Integer.parseInteger(romanNumber.getText());
//               //P.rintln("Err: Please enter a non-zero number between -10000 and 10000.");
//               //GetNumber n = new GetNumber();
//               //try{
//               //     n.getInput(t);
//               //} catch(IOException p) {
//               //     System.out.println("Error: Wrong input type. Please enter another number.");
//               //     Numerals.removeNumbers(RomanNumerals.number,RomanNumerals.i);
//          //     System.out.println(t);
//               checkI(RomanNumerals.i);
//               return RomanNumerals.i;
//          else
//          //     System.out.println(t);
//               return t;
class Numerals {
     public static String removeNumbers(String s, int x) {
               if (x < 0) {
                    x = -x;
                    s += "Negative ";
               for(; x >= 1000; x -= 1000) {
                    s += "M";
               for(; x >= 900; x -= 900) {
                    s += "CM";
               for(; x >= 500; x -= 500) {
                    s += "D";
               for(; x >= 400; x -= 400) {
                    s += "CD";
               for(; x >= 100; x -= 100) {
                    s += "C";
               for (; x >= 90; x -= 90) {
                    s += "XC";
               for(; x >= 50; x -= 50) {
                    s += "L";
               for (; x >= 40; x -= 40) {
                    s += "XL";
               for(; x >= 10; x -= 10) {
                    s += "X";
               for (; x >= 9; x -= 9) {
                    s += "IX";
               for(; x >= 5; x -= 5) {
                    s += "V";
               for(; x >= 4; x -= 4) {
                    s += "IV";
               for(; x >= 1; x--) {
                    s += "I";
          //if (i == 0)
          //     c.actionPerformed();
               return s;
               //txt.setText(s);
public class RomanNumerals extends JApplet implements ActionListener {
     static String number = "";
     static int i;
     JFrame converterFrame;
     JPanel converterPanel;
     JTextField romanNumber;
     JLabel intLabel, romanLabel;
     JButton convertNumber;
     public RomanNumerals() {
          /*line 106*/converterFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
          converterFrame.setSize(new Dimension(120, 40));
          converterPanel = new JPanel(new GridLayout(2, 2));
          addWidgets();
          converterFrame.getContentPane().add(converterPanel, BorderLayout.CENTER);
          converterFrame.pack();
          converterFrame.setVisible(true);
     private void addWidgets() {
          romanNumber = new JTextField(2);
          intLabel = new JLabel("Integer", SwingConstants.LEFT);
          convertNumber = new JButton("Convert");
          romanLabel = new JLabel("Roman Numeral value.");
          convertNumber.addActionListener(this);
          converterPanel.add(romanNumber);
          converterPanel.add(intLabel);
          converterPanel.add(convertNumber);
          converterPanel.add(romanLabel);
          intLabel.setBorder(BorderFactory.createEmptyBorder(5,5,5,5));
          romanLabel.setBorder(BorderFactory.createEmptyBorder(5,5,5,5));
     GetNumber k = new GetNumber();
     Numerals l = new Numerals();
     private static void createGUI() {
          JFrame.setDefaultLookAndFeelDecorated(true);
          RomanNumerals converter = new RomanNumerals();
     public void actionPerformed(ActionEvent event) {
          i = (int)(Double.parseDouble(romanNumber.getText()));
     //     i = GetNumber.checkI(i);
          romanNumber.setText(Numerals.removeNumbers(number, i));
     static void numberIs() {
          do {
               try {
                    i = GetNumber.getInput(i);
                    //System.out.println(i);
                    Numerals.removeNumbers(number, i);
               } catch(IOException p) {
                    System.out.println("Error: Wrong input type. Please enter another number.");
                    numberIs();
               } catch(NumberFormatException t) {
                    System.out.println("Error: Wrong input type. Please enter another number.");
                    numberIs();
          } while(i != 0);
     public static void main(String[] args) {
          javax.swing.SwingUtilities.invokeLater(new Runnable() {
               public void run() {
                    createGUI();
}

Similar Messages

  • How can I print entire Roman numerals from pdf of my book?

    I just got Acrobat Pro software.
    I'm ready to send a pristine pdf version of the book to Amazon's CreateSpace for publication. I used Amazon's 6x9 template.
    Pages 2 thru 7 have Roman numerals. They look fine in pdf on-screen, but when pages iv thru vii are printed, they don't show up.  Instead, there's a small rectangular box (or part of one) without all the letters.
    What gives?
    Spike1

    This is the Reader forum; the Acrobat one is here:
    http://forums.adobe.com/community/acrobat

  • Roman numerals not importing from Word

    The last page of my document uses roman numerals in the footnotes. The Roman numerals show up in the word document, but turn into regular numbers when imported or copied inot Indesign. Does anyone have a suggestion as to how to get the roman numerals into Indesign?

    Type>document footnote options:

  • Re-write numerical page numbers to roman numerals for an introduction?

    Hi there everybody,
    I've been attempting (for some considerable time!) to typeset and format a book. The book needs to have roman numerals running from the first title page (which is in reality left blank through using a secondary master page without page numbers). However, I didn't realise I would need to use roman numerals in the introduction, and instead started the page numbers from the first title page of the introduction. Therefore, my pages that are numbered by roman numerals (copyright page etc) stop at this point and in the introduction become numbers.
    I need to change it so it is roman numerals up until the first page of the actual book, all through the introduction,  but when I try to change it in the Numbers and Sections tab, it tells me that i've already used the numbers i've typed in.
    Basically I would like to know how to take off the first set of roman numeral page numbers and start again??
    I'm very confused!! Help would be MUCH appreciated.
    Lucy

    Is this any help?
    Working with Page Numbers and Sections | Managing Pages and Books with Adobe InDesign CS6 | Que

  • Is there a way to add roman numerals to the footer? (eg. page i of n)

    Is there a way to add roman numerals to the footer? (eg. page i of n)

    Hi Emily ,
    You may face challenges doing this task in Acrobat .
    If you have created the PDF from word ,I would recommend doing the page numbering in Word, not Acrobat, since you have more flexibility with that program.
    Or the second option is ,if you know how to play around with java script.Here is the code for the same.
    Yeah, it's possible. Create a unique text field on each page with this code as the custom calculation code:
    event.value = romanize(event.target.page+1);
    Then place this function at the doc-level (I didn't write that one):
    function romanize(num) {
        if (!+num)
            return false;
        var digits = String(+num).split(""),
            key = ["","C","CC","CCC","CD","D","DC","DCC","DCCC","CM",
                   "","X","XX","XXX","XL","L","LX","LXX","LXXX","XC",
                   "","I","II","III","IV","V","VI","VII","VIII","IX"],
            roman = "",
            i = 3;
        while (i--)
            roman = (key[+digits.pop() + (i * 10)] || "") + roman;
        return Array(+digits.join("") + 1).join("M") + roman;
    Regards
    Sukrit Dhingra

  • UIX dateField, Roman numerals in Czech

    Hi,
    I am using the following code to retrieve a date value from a UIX page. I am using Jdeveloper 10.1.2, ADF UIX 2.2.20
    <dateField name="dateNonProd"
    value="${uix.data.getWorkSlotDateTimes.NONPRODSTARTDATE}">
    <onSubmitValidater>
    <date
    pattern="dd-MMM-yyyy"/>
    </onSubmitValidater>
    Unfortunately if a date is selected by a Customer in the Czech Republic the month is appearing as Roman Numerals 01-II-06.
    Has any one else experienced this problem
    Thanks
    Colette

    Hi Colette,
    Translation for formatted date text is based on page language.
    In UIX 2.2, we can't specify translation language for date formatting (this feature is supported in ADF Faces).
    I have 2 ideas to solve your problem
    1) Override locale context to Englis. (All message will be in English).
    2) Specify locale independent formatting pattern (for example, dd-MM-yyyy).
    Regards,
    Jun

  • How to convert from value to word ?

    Hi all,
    I intend to convert from value into words such as 234.50 will be two hundred and thirty four and cents fifty. How should I code or any function will able to produce this ?
    Please advise.
    Rgds
    Lim

    Lim
    The SP format modifier spells out part of a date - so does YEAR:
    SQL> select to_char(sysdate,'YEAR') from dual
      2  /
    TO_CHAR(SYSDATE,'YEAR')
    TWO THOUSAND EIGHT
    SQL> To spell out a money amount, you have to take a decimal number and break it into dollars and cents (both integers):
    SQL> r
      1  declare
      2    amount number(10,2) := 12345.67;
      3    dollars integer;
      4    cents integer;
      5  begin
      6    dollars := floor(amount);
      7    cents := (amount - dollars) * 100;
      8    dbms_output.put_line(to_char(to_date(dollars,'J'), 'JSP') ||  ' dollars a
    nd ' ||
      9        to_char(to_date(cents,'J'),'JSP') || ' cents');
    10* end;
    TWELVE THOUSAND THREE HUNDRED FORTY-FIVE dollars and SIXTY-SEVEN cents
    PL/SQL procedure successfully completed.
    SQL>Note that the spelling out is rather american (in UK we wouldn't add the hyphen and we would say twelve thousand three hundred AND forty five).
    Using JSP means we are spelling out a Julian date (ie a number of days, which is allowed to get pretty large. But watch out - there is a limit (somwhere between 1 and 10 million) - ie the number of days between minimum date (4172 BC) and max date (around 31/12/9999).
    HTH
    Regards Nigel

  • Setting up where Roman Numerals stop and page 1 Begins

    I did set this up, once, but have sence forgotten how to make an adgustment. Actually I currently have it set to count roman numerals to VIIII, then start "normal" numbering afterwards, which begins at page 10. Ideally I'd like the "normal" numbering to begin with 1 after the end of the roman numerals.
    Any help?
    Thanks All.

    Daniel Flavin wrote:
    From the pages Panel, right click on a page icon or use the Fly Out > Page & Section options. Start a new section; it can be defined as desired. (Also select document page 1 and set the option for i, 1, a, or A there as well.)
    I will give it a try in the morning. Thanks for your suggestion.

  • 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