Results 1 to 4 of 4
  1. #1


    Member Since
    Mar 24, 2008
    Posts
    6
    Launching an application via script
    Hi there,

    I'm a member of the popular "virtual world" Second Life which I like for building and chatting to my friends in, however, as a builder I have multiple accounts for it, and would like to create shortcuts that let me launch Second Life with appropriate command-line arguments to log me in directly.

    The Second Life application itself has a simple set of command-line arguments for just such a case.

    Now, I've managed to create a solution using Apple Script, but it isn't quite ideal yet. Here's the apple-script I'm using:

    Code:
    tell application "Terminal"
    	do script "\"/Applications/Second Life.app/Contents/MacOS/Second Life\" -multiple -login <first-name> <second-name> <password>"
    end tell
    Nothing too complicated. However, the problem with this is that when it executes, it causes Terminal to open and display a window, which I don't really want. What I'm looking to do is execute the exact same instruction in a way that will invisibly execute my command, so all that happens in the end is that Second Life opens up.

    I've also tried the same thing using Automator, but I end up with the automator "Run shell script" item appearing in my menu-bar which isn't ideal either (and which I can't figure out how to hide, bah!).

    Is there a way to have my apple-script prevent the terminal opening in this way, or executing the script some other way? Or alternatively, is there something else I can use to do this, such as a simple program I could compile?

    Thanks for any help!

  2. #2

    xstep's Avatar
    Member Since
    Jun 25, 2005
    Location
    On the road
    Posts
    3,231
    Specs:
    2011 MBP, i7, 16GB RAM, MBP 2.16Ghz Core Duo, 2GB ram, Dual 867Mhz MDD, 1.75GB ram, ATI 9800 Pro vid
    See my response here.

    Searching the forum before asking is a great idea because you may answer your question quickly and get on with your task. Plus you wouldn't be using other peoples time.

  3. #3


    Member Since
    Mar 24, 2008
    Posts
    6
    Quote Originally Posted by xstep View Post
    Searching the forum before asking is a great idea because you may answer your question quickly and get on with your task. Plus you wouldn't be using other peoples time.
    Thank you for the link, it solved my problem.

    However, please do not be so quick to assume someone didn't search for an answer just because one does exist in the forum. I tried Google, and I tried this forum's search engine; nothing I searched for came up with anything that helped, which is why I posted this thread.

    I may be new here but I'm not new to forums, I've moderated several for the better part of eight years in my spare time.

    Your intention may not have been to be rude, but it's much more helpful just to say "Here's a topic that should help, I found it in a search for X, Y, and Z". This has the added benefit of letting the user know a bit more about the problem, since I, while tech savvy (a Java programmer), do not know what the best thing to search for would be. Heck, I wouldn't have expected an answer in the thread you linked to; to me the title suggests "how to just run a terminal script", it suggests nothing about hiding it etc.
    Also, this way the keywords in your reply, combined with the keywords in the user's post, make it much more likely people will find relevant results more quickly in future

  4. #4

    xstep's Avatar
    Member Since
    Jun 25, 2005
    Location
    On the road
    Posts
    3,231
    Specs:
    2011 MBP, i7, 16GB RAM, MBP 2.16Ghz Core Duo, 2GB ram, Dual 867Mhz MDD, 1.75GB ram, ATI 9800 Pro vid
    Glad to here the link solved your problem.

    I'm trying to get people to be more proactive on their own. Since I didn't know what your action was before posting, the search was a good suggestion. So many people don't bother as I'm sure you are aware, based on your experience with forums. I've been accused of being too direct at times, so I'm sure I could be more tactful at times.

    Your constructive domain language lesson for the day; AppleScript is one word and the S is capitalized. As a technical person you understand the value of being this exact, so don't think I'm trying to talk down to you.

    Quote Originally Posted by Haravikk View Post
    ...it's much more helpful just to say "Here's a topic that should help, I found it in a search for X, Y, and Z".
    So if I had said "Please see this thread titled 'Basic Terminal Automation' that can be found with the search words 'AppleScript Terminal script' within this forum.", that would have been more to your liking. I actually like that. It doesn't assume one didn't do a search, it places key words in the response, and gives a subtle hint to others how to do a search.
    CameraTime - Time lapse photography for novice and advanced users.

    When asking questions, post the version of your software. You'll receive better answers.

    Please post your results to the thread as it is good feedback.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Applescript application won't run it's script
    By nightfury2986 in forum OS X - Development and Darwin
    Replies: 4
    Last Post: 01-18-2015, 05:07 PM
  2. Launching an application while executing an applescript?
    By Commander_FarkU in forum OS X - Development and Darwin
    Replies: 0
    Last Post: 06-13-2010, 09:32 PM
  3. Safari - message on launching application
    By wadiman in forum OS X - Apps and Games
    Replies: 3
    Last Post: 05-03-2008, 10:23 AM
  4. Launching an application more than once in Spaces
    By bpaskin in forum OS X - Apps and Games
    Replies: 1
    Last Post: 03-25-2008, 05:49 PM
  5. Application Shutdown Script with message notification
    By lirrincity in forum OS X - Apps and Games
    Replies: 0
    Last Post: 10-19-2007, 12:34 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •