Making a GUI for a command line interface

Discussion in 'Mac Programming' started by Ben Kei, May 16, 2010.

  1. Ben Kei macrumors regular

    Joined:
    Oct 30, 2002
    Location:
    London UK
    #1
    Hello all,

    I have a command line app that I use sometimes (or attempt to use might be closer to the truth)

    I have little to no coding background but was wondering if there was a nice easy way to build a GUI for something that is functionally complete to begin with.

    Any good (free) resources I should check or anyone who fancies the challenge? ;)

    Thanks in advance,
    Ben
     
  2. lee1210 macrumors 68040

    lee1210

    Joined:
    Jan 10, 2005
    Location:
    Dallas, TX
    #2
    It depends on the program, but in C or Objective-C there are commands Luke popen and NSTask that you could use to run the command line program and get its output. If the program is interactive (that is, you can't just run it with command line switches, but must enter input while it is running) you might need to generate input files and feed them to the command with < or pre-build or dynamically generate expect scripts.

    Again, this is all going to depend on the program in question. You can use XCode to build an Ovjective-C program, or if it's simple enough you may be able to use Applescript for this. Post more details and we can point you in the right direction.

    -Lee
     
  3. Ben Kei thread starter macrumors regular

    Joined:
    Oct 30, 2002
    Location:
    London UK
    #3
    Thanks for the reply.

    It's an emulation of a time stretching algorithm from a late 80's sampler which gives a classic sound used in lots of early dance music.

    There are some input variables for amount etc.. so it would need more control than just open and run.

    Here's a link to the CLI app, there is a Windows version with a GUI so the screen shot should give an idea of what controls it has.

    Main link: http://akaizer.blogspot.com

    Mac version: http://akaizer.blogspot.com/search/label/Mac OS X

    Thanks again!
    Ben
     

Share This Page