Automating the command process

Discussion in 'Mac Programming' started by milessthomas, Oct 5, 2007.

  1. milessthomas macrumors newbie

    Oct 2, 2007
    obx, nc
    If any of you could provide me with a site or personal instructions of how to do this, your help would be greatly appreciated.

    What I want to do is, create an icon on the desktop that when clicked will open terminal and automatically send the command "telnet"

    Can anyone walk me through the steps on how to do this?

    ::Sidenote::I'm doing this for an employee that doesn't understand this process. He understands once he gets past the telnet prompt. The telnet command telnets to our SunOS server that holds our Parts Store Database on a database I believe is called GPC TAMS.
  2. kainjow Moderator emeritus


    Jun 15, 2000
    The easiest is to use AppleScript:
    tell application "Terminal" to do script "telnet"
    In Script Editor, you can save as "application bundle".
  3. MongoTheGeek macrumors 68040


    Sep 13, 2003
    Its not so much where you are as when you are.
    Easiest solution.

    Open terminal
    File Menu->connect to server
    pick telnet
    click the plus sign (on the right)
    enter the IP address when prompted
    pick the newly entered server in the right hand pane
    click connect
    When the window pops up click save as
    have it save only the main window (don't need to enter a command)
    Pick a location to save it.

    Easy enough?

    I have a bunch of these setup with different servers and different settings. Custom back grounds, a different size for machines that want a 132 column output, different colors so I can tell them apart at a glance.
  4. milessthomas thread starter macrumors newbie

    Oct 2, 2007
    obx, nc
    Thanks you both very much for your help!

  5. HiRez macrumors 603


    Jan 6, 2004
    Western US
    You can also just type in any command directly ("Execute this command") in the save dialog box which will execute in the Terminal window when double-clicked from the desktop.
  6. milessthomas thread starter macrumors newbie

    Oct 2, 2007
    obx, nc
    kainjow's response worked the best for me. Seeing as once I used that I figured out how to add additional lines to the applescript to automate the process even further

Share This Page