Help with a VERY simple Automator script

i spent a few minuted trying to figure this out, but concluded it might be easier to simply ask in the forum how to do this.
I want to
1) open a terminal window
2) execute the following commands:
cd /Users/lenny/ventrilo/
lenny$ /Users/lenny/ventrilo/ventrilo_srv
thats it...
please help using very small works
ideally i would like this to be execute when i start up my computer. (i.e. a login script)

If you need the Terminal window to stay open, then you're looking at scripting Terminal. You can do this with Automator's run applescript action, or you can just use Script Editor (in Applications > AppleScript). Either way you will need to save the workflow/script as an application and drag it to your Login Items (in System Preferences > Accounts).
click here to open this script in your editor<pre style="font-family: 'Monaco', 'Courier New', Courier, monospace; overflow:auto; color: #222; background: #DDD; padding: 0.2em; font-size: 10px; width:400px">tell application "Terminal"
activate
set commands to "cd /Users/lenny/ventrilo/ 
/Users/lenny/ventrilo/ventrilo_srv"
do script commands in front window
end tell</pre>
PowerMac G5 (June 2004) 2x1.8GHz 1.25GB, PowerBook G4 (12-inch DVI) 1x1GHz 768MB   Mac OS X (10.4.3)  

Similar Messages

  • Help with a very simple horizontal Spry menu

    Hi,
    I’ve always received great help here and I’m sure that if I explain the issue I’m having properly I’ll get some good input.
    This is to do with a very simple horizontal Spry menu, there’s no dropdown involved, only a color change on the rollover.  The menu items are in a shade of blue, then on the rollover each menu item changes to a shade of red, the font color remains white for both.
    What’s mentioned above works flawlessly, the problem I’m having is this … On the rollover when the menu block items turn red, I’m attempting to add a 1px border around the entire block, but when I do the block item seems to want to change its width and height slightly when it’s rolled-over.  As I said, without the border it works perfect.
    Any suggestions will be appreciated.

    steve0308 wrote:
    Hi,
    I’ve always received great help here and I’m sure that if I explain the issue I’m having properly I’ll get some good input.
    This is to do with a very simple horizontal Spry menu, there’s no dropdown involved, only a color change on the rollover.  The menu items are in a shade of blue, then on the rollover each menu item changes to a shade of red, the font color remains white for both.
    What’s mentioned above works flawlessly, the problem I’m having is this … On the rollover when the menu block items turn red, I’m attempting to add a 1px border around the entire block, but when I do the block item seems to want to change its width and height slightly when it’s rolled-over.  As I said, without the border it works perfect.
    Any suggestions will be appreciated.
    You also have to apply the border to the 'a' css selector. If you just apply it to the 'a:hover' css selector then the tab will grow slightly bigger because its adding more width and height to the overall structure.

  • Need help with something VERY SIMPLE

    I'm brand new to Motion - as if today - but I'm only trying to do some VERY simple motions with photos - a simultaneous zoom in and reposition. What I've been doing is setting the starting key frame at one position (adjusting the x, y) and setting the scale. Then I create a second key frame and adjust the postion and scale. It will do the zoom, but then it re adjusts the starting position. If I readjust the starting key frame, it automatically readjusts the second key frame. I don't get it! Applying the various 'behaviors' doesn't seen to help. Certainly there's something obvious here that I'm missing - as I was able to do this in FCP. For some reason the key frames are not fixed when it comes to position.

    hi,
    a couple of thoughts?
    did you actually set a keyframe for position at the first frame?
    Also unless you are parked right on a keyframe or have the record button on, if you adjust a value, all the values for all keyframes adjust accordingly. I often mess something up because I wasnt parked on a keyframe.
    hth
    adam

  • Need help with a very simple example.  Trying to reference a value

    Im very new to Sql Load and have created this very simple example of what I need to do.
    I just want to reference the ID column from one table to be inserted into another table as DEV_ID.
    Below are my: 1) Control File, 2) Datafile, 3) Table Description, 4) Table Description
    1) CONTROL FILE:
    LOAD DATA
    INFILE 'test.dat'
    APPEND
    INTO TABLE p_ports
    FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'
    DEV_id REF(CONSTANT 'P_DEVICES',NAME),
    NAME FILLER ,
    PORT_NO
    2) DATAFILE:
    COMM881-0326ES09,6
    3) TABLE DESCRIPTION:
    SQL> describe p_ports
    Name Null? Type
    ID NOT NULL NUMBER(10)
    DEV_ID NOT NULL NUMBER(10)
    PORT_NO     NUMBER(3)

    hi,
    i managed to do this for my app. (think i referred to viewTransitions sample code and modified quite a bit)
    i can't remember this well cos i did this quite a while back, but i will try to help as much as possible
    1) from the appdelegate i initialize a root controller (view controller class)
    2) this root controller actually contains two other view controllers, let's call it viewAController and viewBController, for the screens which u are going to toggle in between. and there's also a function, let's call it toggleMenu, which will set the menus to and fro. i copied this whole chunk from the sample code. it actually defines the code on what to do, i.e. if current view is A switch to B and vice versa.
    3) inside the controller files, you need to implement the toggleMenu function too, which basically calls the rootController's toggleMenu
    4) we also need viewA and viewB files(view class)
    5) need to add the .xib files for the respective views and link them up to the controller class. i did not use the .xib files for ui layout though, because of my app's needs. however, it will not work properly without the .xib files.
    5) inside the view class of both views, i.e. viewA.m and viewB.m, you need to create a button, that will call the toggleMenu function inside the respective controller class.
    it will look something like this:
    [Button addTarget:ViewAController action:@selector(toggleMenu:) forControlEvents:UIControlEventTouchUpInside];
    so the flow is really button (in view)-> toggleMenu(viewController) -> toggleMenu(rootController)
    i'm sorry it sounds pretty hazy, i did this part weeks before and can't really remember. i hope it helps.

  • [New] Help with a VERY simple asterisk program.

    Alright...I feel like a complete idiot asking this question..but I'm having such trouble writing this program. The program description is here:
    Write a Java application using two for loops to produce the following pattern of asterisks.
    I guess I'm really bad at algorithms yeah? Haha...well, any help would be very much appreciated.

    Hi,
    I don't think you don't need to look through any C programming books.
    When you have a problem like this, do some thinking about what methods you need to use and what the general structure of the program will be.
    You need to print asterisks out to the screen... so you'll need:
    System.out.println
    System.out.printAnd you already know that you need two loops.
    Now you can ask yourself how you might use the print statements with two loops in order to design a basic structure for the program.
    You have 8 lines, so you might want a loop that runs through 8 times, one of the lines printed each time.
    Within this loop, you need another loop that prints out *'s. This loop could run once for each asterisk, but because there is a different number of asterisks on each line, the number of times this loop runs would be variable.
    So a basic structure:
    //loop1 that runs 8 times
        //loop2 that runs once for each *
            print one star
        //end loop2
    //end loop1The key now is to recognise the difference between print and println. I don't know if you alread know, but System.out.print will print a string without creating a new line at the end, and println will create a new line at the end of the printed string.
    Hope that helps. If you have any other problems, post specific questions along with the code you've written and are having trouble with.

  • Need Help with a very simple view transition scenario

    Hello All,
    I am trying to learn how view transitions work and I am having a very hard time with the sample apps (like transition view app etc)...I need something much more simple at first. Can you please provide me a little guidelines on how to set up this following scenario:
    App loads up and shows a title screen with a button that says go. When you click on the go button the title screen fades out and a new view fades in (or slides in, or anything at all).
    Right now I have 3 nib files. There is the main one that is called on application start (tied with MainViewController, a subclass of IUViewcontroller just like in the hello world app. After the app loads the app delegate object tells the MainViewController object to load in another view controller object (via addSubview) which is tied with the second nib file; my title screen with the button. When I press the button I was thinking in the IBAction function to tell the MainViewController object to remove (or transition out somehow) the title screen view controller object then add the other view (third nib file in). This is the part I can't get working. Am I on the right track or have a gone hideously astray? Thank you!

    hi,
    i managed to do this for my app. (think i referred to viewTransitions sample code and modified quite a bit)
    i can't remember this well cos i did this quite a while back, but i will try to help as much as possible
    1) from the appdelegate i initialize a root controller (view controller class)
    2) this root controller actually contains two other view controllers, let's call it viewAController and viewBController, for the screens which u are going to toggle in between. and there's also a function, let's call it toggleMenu, which will set the menus to and fro. i copied this whole chunk from the sample code. it actually defines the code on what to do, i.e. if current view is A switch to B and vice versa.
    3) inside the controller files, you need to implement the toggleMenu function too, which basically calls the rootController's toggleMenu
    4) we also need viewA and viewB files(view class)
    5) need to add the .xib files for the respective views and link them up to the controller class. i did not use the .xib files for ui layout though, because of my app's needs. however, it will not work properly without the .xib files.
    5) inside the view class of both views, i.e. viewA.m and viewB.m, you need to create a button, that will call the toggleMenu function inside the respective controller class.
    it will look something like this:
    [Button addTarget:ViewAController action:@selector(toggleMenu:) forControlEvents:UIControlEventTouchUpInside];
    so the flow is really button (in view)-> toggleMenu(viewController) -> toggleMenu(rootController)
    i'm sorry it sounds pretty hazy, i did this part weeks before and can't really remember. i hope it helps.

  • Help with Forte: very simple question, please help!

    I recently downloaded the community version of Forte (Sun One) but can't seem to get any new empty class programs to execute properly. I know something is probably not set up right, which is why I really need a little help to get started. Regardless of the code I try to execute, the output error is always:
    "java.lang.NoClassDefFoundError: (name of program)
    Exception in thread "main" "
    Please let me know what I'm not doing right. I would really appreciate anybody's thoughts on this problem because I would love to get Forte working so I can start learning Java. Thanks for your input!

    I would tell you that Forte is not a tool for the beginner. you should look at something simpler. Forte is a fully integrated development environment. I would look at a simple editor like emacs, available at gnu.org. The commands of this editor are quite difficult to get use to.
    As for setting the class varialbe. It depends on the O/s that you are using. win98/me is different than NT/xp. Need to know one or the other before explaining.
    email me if you have question. email address is in my profile.

  • Help with a very simple password field

    The following question can be observed, and manipulated with
    the following:
    Source:
    http://www.ucsdkya.com/kyaonly.fla
    SWF:
    http://www.ucsdkya.com/kyaonly.swf
    I am using embedded fonts for this flash file, and it seems
    that no matter what, it converts my text field to an HTML one. The
    trace feature made it quite obvious! What can I do to remedy this,
    while keeping it the same looking the same. Is there a cheap
    workaround? Thanks!

    Well, it hit me almost a few seconds after (go figure) that I
    could just copy and past the entire trace message as the required
    string for entry. Easy solution.

  • Help with simple Automator script

    I have a simple Automator script for updating a specified folder with files from another folder. It consists of only two actions:
    1. Get Folder Contents (from the folder I drop on the Automator executable).
    2. Copy Finder Items.
    I left the option "replace existing files" unchecked because there's no point in replacing a bunch of files that already exist (we're talking about 4000-5000 files in the source folder).  I assumed that meant to ignore any existing files but, on the contrary, I found out that the script is copying duplicates of all the existing files -- making my target folder about 9000 files strong!
    How do I get a command into the middle of this script to restrict the Copy Finder Items command to files that do not already exist in the target folder? (It would be even nicer if it could check for files that are older than the files being copied and actually replace (only) those as well.)
    Any ideas?

    If you need the Terminal window to stay open, then you're looking at scripting Terminal. You can do this with Automator's run applescript action, or you can just use Script Editor (in Applications > AppleScript). Either way you will need to save the workflow/script as an application and drag it to your Login Items (in System Preferences > Accounts).
    click here to open this script in your editor<pre style="font-family: 'Monaco', 'Courier New', Courier, monospace; overflow:auto; color: #222; background: #DDD; padding: 0.2em; font-size: 10px; width:400px">tell application "Terminal"
    activate
    set commands to "cd /Users/lenny/ventrilo/ 
    /Users/lenny/ventrilo/ventrilo_srv"
    do script commands in front window
    end tell</pre>
    PowerMac G5 (June 2004) 2x1.8GHz 1.25GB, PowerBook G4 (12-inch DVI) 1x1GHz 768MB   Mac OS X (10.4.3)  

  • Hoping for some help with a very frustrating issue!   I have been syncing my iPhone 5s and Outlook 2007 calendar and contacts with iCloud on my PC running Vista. All was well until the events I entered on the phone were showing up in Outlook, but not

    Hoping for some help with a very frustrating issue!
    I have been syncing calendar and contacts on my iPhone 5 and Outlook 2007 using iCloud  2.1.3 (my PC is running Vista). All was well until the events I entered on the phone were showing up in Outlook, but not the other way around. I’ve tried the usual recommended steps: deselecting calendar and contacts in the iCloud control panel and then re-selecting, signing out of the panel and back in, and repairing the Outlook installation in control panel.  I even uninstalled iCloud on the PC and downloaded it again (same version). 
    The furthest I’ve gotten is step 2 (and once, step 3) of 7 while performing “Outlook Setup For iCloud.” At that point I get, “Your setup couldn’t be started because of an unexpected error.”  After the first attempt at all this, all my calendar events disappeared from Outlook, although they are still in iCloud calendar and on my phone.
    Sound familiar?  Any ideas on how to solve this iCloud/Outlook issue?  Thanks much in advance!

    Hoping for some help with a very frustrating issue!
    I have been syncing calendar and contacts on my iPhone 5 and Outlook 2007 using iCloud  2.1.3 (my PC is running Vista). All was well until the events I entered on the phone were showing up in Outlook, but not the other way around. I’ve tried the usual recommended steps: deselecting calendar and contacts in the iCloud control panel and then re-selecting, signing out of the panel and back in, and repairing the Outlook installation in control panel.  I even uninstalled iCloud on the PC and downloaded it again (same version). 
    The furthest I’ve gotten is step 2 (and once, step 3) of 7 while performing “Outlook Setup For iCloud.” At that point I get, “Your setup couldn’t be started because of an unexpected error.”  After the first attempt at all this, all my calendar events disappeared from Outlook, although they are still in iCloud calendar and on my phone.
    Sound familiar?  Any ideas on how to solve this iCloud/Outlook issue?  Thanks much in advance!

  • TS2446 Hello, I'm Bethany and I'm having trouble with my apple ID I tried to buy something from he app store and they assed me some questions and anyway i have locked my account and don't know how to unlock any help with be very helpful thanks.

    Hello, I'm Bethany and I'm having trouble with my apple ID I tried to buy something from he app store and they assed me some questions and anyway i have locked my account and don't know how to unlock any help with be very helpful thanks.

    Contact iTunes Customer Service and request assistance
    Use this Link  >  Apple  Support  iTunes Store  Contact

  • XSL for a Pie chart with a very simple XML data file

    Hi All
    Using BI Pub Desktop 10.1.3.2.1 with Oracle Apps R12.1.3.
    I am trying to do a pie chart for the below data in an xml file. Normally this is pretty straight forward but with the below simple data structure I am a bit stuck, maybe thinking about it too much. Appreciate any help on what the xsl should like.
    xml file contains only the below. There is no other data in the file.
    <G2>
    <ITEM>ALL</ITEM>
    <AA>10</AA>
    <BB>20</BB>
    <CC>50</CC>
    <DD>30</DD>
    </G2>
    I want to be able to have a pie chart that shows the labels: AA, BB, CC and DD with the corresponding data values of 10,20,50 and 30.
    Thanks for viewing the question.
    Cheers Cel

    Please disregard. i went back to the original blog code and started over, and figured this out.

  • How can I make a DVD with a VERY simple menu

    I want to create a DVD that autostarts with an opening menu containing a title, a picture and a play button - nothing else. The DVD will contain only one video (created in i-Movie). I want to press "Play" from the opening menu and the video will play. I don't seem to be able to create anything less than a 2-level menu.

    Hi
    From iMovie - do not use Share to iDVD - but - Share to Media Browser and as Large (not HD or other res. as result will lose quality)
    In iDVD - I select a very simple Menu - Old themes -> Brushed Metal
    Then in iDVD click on Media button and on Movie and here select Your Movie and drop it into iDVD Menu window.
    Now You get a Play movie title/button - If You also get Play Scenes - then select this title and erase it if You don't want it.
    Yours Bengt W

  • Help with a very basic GUI

    Hi guys, i have a project to do and Ive chosen hangman. Ive already made the main program , but i need help with the GUI. I havent been taught about GUI in school, so all i know is what i could understand from a book and what ive read on the internet..
    First , heres the code of my basic Hangman class:
    import java.io.*;
    import java.util.Random;
    public class Hangman
        public void maingame()throws IOException
            InputStreamReader isr = new InputStreamReader(System.in);
            BufferedReader br = new BufferedReader(isr);
            String movies[]={"THE BOURNE ULTIMATUM","TRANSFORMERS","RUSH HOUR 3","THE INSIDE MAN","THE SIMPSONS MOVIE","THE LORD OF THE RINGS","DIE HARD 4.0"};
            Random rand = new Random();
            char current[]=(movies[rand.nextInt(movies.length)]).toCharArray();  //Convert a random string from movies array into a char array
            char actual[]=new char[current.length]; //Store current state of guessed movie
            for (int i=0;i<actual.length;i++)
                if (isVowel(Character.toUpperCase(current))==true)
    actual[i]=current[i];
    else if (isSpecialChar(Character.toUpperCase(current[i]))==true)
    actual[i]=current[i];
    else if (current[i]==' ')
    actual[i]='/';
    else
    actual[i]='_';
    String hangman = "HANGMAN";
    int turnsleft=7;
    StringBuffer guessed=new StringBuffer();
    while (turnsleft!=0)
    System.out.println("\n\t\t\t\t"+hangman.substring(0,turnsleft)+"\n");
    print(actual);
    System.out.println("\nEnter your guess");
    String inp = br.readLine();
    if (inp.length()>1)
    System.out.println("You may only enter one character");
    else
    char guess = inp.charAt(0); //Convert the entered string to char
    if ( (hasBeenGuessed(guess,guessed)) == true )
    System.out.println("You have already guessed that\nYou have "+turnsleft+" turns left");
    else if (guess >= '0' && guess <= '9')
    System.out.println("You cannot guess digits.All digits in a movie will will be filled in automatically");
    else
    guessed.append(guess);
    if (isVowel(guess)!=true)
    if (isCorrect(guess,turnsleft,current,actual)==true)
    if (hasWon(actual,current)==true)
    System.out.println();
    print(actual);
    System.out.println("\nCongratulations!You won!");
    System.exit(0);
    else
    System.out.println("\nCorrect Guess!\nYou have "+turnsleft+" turns left\n");
    else
    turnsleft--;
    System.out.println("Wrong Guess!\nYou have "+turnsleft+" turns left\n");
    else if (isVowel(guess)==true)
    System.out.println("You cannot guess vowels\nYou have "+turnsleft+" turns left\n");
    else
    System.out.println("You have already guessed that\nYou have "+turnsleft+" turns left\n");
    print(actual);
    if (turnsleft==0)
    System.out.println("\nYou lose!\nThe movie was: ");
    print(current);
    System.exit(0);
    private boolean isCorrect(char guess,int turnsleft,char current[],char actual[])
    int flag=0;
    for (int i=0;i<current.length;i++)
    if ( Character.toUpperCase(current[i])==Character.toUpperCase(guess) && actual[i]!=guess ) //Check if guess is correct, and make sure it has not already been entered
    actual[i]=guess;
    flag=1;
    else if (Character.toUpperCase(current[i])!=Character.toUpperCase(guess) && i==current.length-1 && flag==0)
    return false;
    if (flag!=0)
    return true;
    else
    return false;
    private boolean hasWon(char actual[],char current[])
    char actualspc[]=new char[actual.length];
    for (int i=0;i<actual.length;i++)
    if (actual[i]=='/')
    actualspc[i]=' ';
    else
    actualspc[i]=actual[i];
    for (int i=0;i<actual.length;i++)
    if ((Character.toUpperCase(current[i]))==(Character.toUpperCase(actualspc[i])) && i==actual.length-1)
    return true;
    else if ((Character.toUpperCase(current[i]))==(Character.toUpperCase(actualspc[i])) && i!=actual.length-1)
    continue;
    else
    return false;
    return false;
    private void print(char arr[])
    for (int i=0;i<arr.length;i++)
    System.out.print(Character.toUpperCase(arr[i])+" ");
    private boolean isVowel(char a)
    if (a=='a' || a=='A' || a=='e' || a=='E' || a=='i' || a=='I' || a=='o' || a=='O' || a=='u' || a=='U')
    return true;
    else
    return false;
    private boolean isSpecialChar(char a)
    //if (a>='a' && a<='z')
    //return false;
    //else if (a>='A' && a<='z')
    //return false;
    //else if (a==' ')
    //return false;
    //else if (a>='0' && a<='9')
    //return true;
    if (isLetter(a)==true)
    return false;
    else if (isWhiteSpace(a)==true)
    return false;
    else if (isDigit(a)==true)
    return true;
    else
    return true;
    private boolean hasBeenGuessed(char a,StringBuffer guessed)
    for (int i=0;i<guessed.length();i++)
    if ( Character.toUpperCase(guessed.charAt(i)) == Character.toUpperCase(a))
    return true;
    return false;
    My first 2 questions are here:
    a - Why does isLetter not work, it says cannot resolve symbol - method isLetter(char)... Im guessing even isDigit and isWhiteSpace wont work, so why? If i cant use them ill have to use the commented code, its kind of unprofessional..
    b- Isnt there any way i can compare chars ignoring cases besides converting both to one case, like im doing now?
    Heres the new HangmanGUI class i made, it doesnt necessarily have to be a different class in the final outcome, but i would prefer it if it can.. Ive made what i can figure out.. Ive commented about what i need to do.
    Keep in mind i cant use Applets, only Frame/JFrame
    import java.awt.*;
    import javax.swing.*;
    public class HangmanGUI extends JFrame implements ActionListener
        Button newGame = new Button("New Game");
        Button entGuess = new Button("Submit Guess");
        Button giveUp = new Button("Give Up");
        TextField input = new TextField("",1);
        Label hangman = new Label("HANGMAN");
        JPanel play = new JPanel();
        JPanel hang = new Jpanel();
        GridLayout playLayout = new GridLayout(2,4);
        public HangmanGUI()
            play.setLayout(playLayout);
            play.add(hangman+"\n");
            play.add(newGame);
            play.add(giveUp);
            play.add(input);
            play.add(entGuess);
            hang.add(hangman);
            getContentPane().add(play);
            getContentPane().add(hang);
        public void ActionPerformed(ActionEvent act)
            Object src = act.getSource();
            if (src==newGame)
            main(); //Calling main to restart program - will that work?
            //if (src==entGuess)
            //Need to submit the guess, while input is not empty to Hangman class
            //if (src==giveUp)
            //Need to go into the losing part of Hangman class
    }As you can see i need help with:
    a - How to complete the other ifs
    b - How to really use the data of my Hangman class in this class and combine the GUI and backend to make a nice GUI Hangman app
    c - btw, right now if i try to compile HangmanGUI it highlights the implements ActionListener line and says cannot resolve symbol - class ActionListener..
    Any help would be greatly appreciated

    Thanks for the explanation pete...
    Anyways, i started implementing my code within abillconsl's code, and im trying to assign a label to a char array using .toString(); but instead of whats in the char array i get [C@<numbers and digits> ..
    Whats wrong?
    [code]
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import java.util.Random;
    public class HangEmHighGUI extends JFrame implements ActionListener
    private Button newGame,
    entGuess,
    giveUp;
    private TextField input;
    private Label hangman,
    movie;
    private JPanel play,
    hang;
    private GridLayout playLayout;
    private FlowLayout labelLayout;
    private Container container; // To avoid extra meth calls
    String movies[]={"THE/BOURNE/ULTIMATUM","TRANSFORMERS","RUSH HOUR 3","THE INSIDE MAN","THE SIMPSONS MOVIE","THE LORD OF THE RINGS","DIE HARD 4.0"};
    Random rand = new Random();
    char current[]=(movies[rand.nextInt(movies.length)]).toCharArray(); //Convert a random string from movies array into a char array
    char actual[]=new char[current.length]; //Store current state of guessed movie
    public HangEmHighGUI()
    setUp();
    container = this.getContentPane();
    play = new JPanel();
    hang = new JPanel();
    playLayout = new GridLayout(1, 3, 5, 5); // rows, cols, space, space
    labelLayout = new FlowLayout(FlowLayout.CENTER);
    newGame = new Button("New Game");
    entGuess = new Button("Submit Guess");
    giveUp = new Button("Give Up");
    input = new TextField("",1);
    hangman = new Label("HANGMAN");
    movie = new Label(actual.toString());
    hang.setLayout(labelLayout);
    play.setLayout(playLayout);
    play.add(newGame);
    play.add(giveUp);
    play.add(entGuess);
    hang.add(hangman);
    hang.add(movie);
    container.add(hang,BorderLayout.NORTH);
    container.add(input,BorderLayout.CENTER);
    container.add(play,BorderLayout.SOUTH);
    pack();
    setVisible(true);
    setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    public void actionPerformed(ActionEvent act)
    Object src = act.getSource();
    if (src==newGame)
    main(new String[] {""}); //Calling main to restart program, this does not work without parameters, is there some other way to restart?
    if (src==entGuess)
    if (input.getText()=="")
    setUp();
    //if (src==giveUp)
    //Need to go into the losing part of Hangman class
    public static void main(String args[])
    javax.swing.SwingUtilities.invokeLater(new Runnable() {
    public void run() {
    new HangEmHighGUI();
    private void setUp()
    for (int i=0;i<actual.length;i++)
    if (isVowel(Character.toUpperCase(current)))
    actual[i]=current[i];
    else if (isSpecialChar(Character.toUpperCase(current[i])))
    actual[i]=current[i];
    else if (Character.isWhitespace(current[i]))
    actual[i]='/';
    else
    actual[i]='_';
    private boolean isVowel(char a)
    if (Character.toUpperCase(a)=='A' || Character.toUpperCase(a)=='E' || Character.toUpperCase(a)=='I' || Character.toUpperCase(a)=='O' || Character.toUpperCase(a)=='U')
    return true;
    else
    return false;
    private boolean isSpecialChar(char a)
    if (Character.isLetter(a))
    return false;
    else if (Character.isDigit(a))
    return true;
    else if (Character.isWhitespace(a))
    return false;
    else
    return true;
    private boolean isCorrect(char guess,int turnsleft,char current[],char actual[])
    int flag=0;
    for (int i=0;i<current.length;i++)
    if ( Character.toUpperCase(current[i])==Character.toUpperCase(guess) && actual[i]!=guess ) //Check if guess is correct, and make sure it has not already been entered
    actual[i]=guess;
    flag=1;
    else if (Character.toUpperCase(current[i])!=Character.toUpperCase(guess) && i==current.length-1 && flag==0)
    return false;
    if (flag!=0)
    return true;
    else
    return false;
    private boolean hasWon(char actual[],char current[])
    char actualspc[]=new char[actual.length];
    for (int i=0;i<actual.length;i++)
    if (actual[i]=='/')
    actualspc[i]=' ';
    else
    actualspc[i]=actual[i];
    for (int i=0;i<actual.length;i++)
    if ((Character.toUpperCase(current[i]))==(Character.toUpperCase(actualspc[i])) && i==actual.length-1)
    return true;
    else if ((Character.toUpperCase(current[i]))==(Character.toUpperCase(actualspc[i])) && i!=actual.length-1)
    continue;
    else
    return false;
    return false;
    private void print(char arr[])
    for (int i=0;i<arr.length;i++)
    System.out.print(Character.toUpperCase(arr[i])+" ");
    private boolean hasBeenGuessed(char a,StringBuffer guessed)
    for (int i=0;i<guessed.length();i++)
    if ( Character.toUpperCase(guessed.charAt(i)) == Character.toUpperCase(a))
    return true;
    return false;
    Note that the majority of the code has been taken from my old hangman class, i havent adapted it to the GUI yet, so ignore all of that stuff.

  • PLEASE HELP THIS SIMPLE MAN WITH A VERY SIMPLE QUESTION

    Hi and thank you for looking.
    I am not musically inclined, challenged in fact. However I am making an iDVD and putting music to my slideshows but the program only lets me put 1 song for an entire group of pictures resulting in hearing the same song OVER AND OVER.
    My question for all you experienced garage band people is, is it possible to put a few songs together in garage band and then save them all as 1 song and then export it out to itunes so that I can put it into iDVD?
    Remember I have very little knowledge in using garage band so you may have to dumb it down for me but I am quite experienced with iDVD and iTunes now.
    Thanks for ANY and all help
    Mac

    Well, I won't explain all of GB in one post (look at the introductory videos on Apple's GB website), but yes, it's very easy to do that:
    • Create a new project and put your slide show video in the video track.
    • drag all the songs you want to use into the timeline, they will all get their own music track (note that you can't use DRM protected songs from the iTunes store that way).
    • Cut them wherever you want (using the Apple-T command) and move them around as you like.
    • If you want the songs to fade into each other, you'll have to use volume curves (look for "curves" in the Help menu).
    • When you like the result, share your project to iTunes (either the whole video, or just the audio which you later add in iPhoto or iDVD or iMovie).

Maybe you are looking for