• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Hiding terminal on app launch
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Hiding terminal on app launch


  • Subject: Re: Hiding terminal on app launch
  • From: Mayank Agarwal <email@hidden>
  • Date: Thu, 07 Jun 2012 23:56:03 +0530

Hi Deivy,

Thanks.

But if you see the previous posts, then i have mentioned that i have already tried using that command.
It is hiding the window(no issues), actually it is Minimizing, 
Minimizing -> icon is visible in dock
by Hiding i mean-> not visible in dock also.

Would really appreciate, if you could suggest me some way to do that.



Mayank 


On Thu, Jun 7, 2012 at 11:48 PM, Deivy Petrescu <email@hidden> wrote:

On Jun 7, 2012, at 10:28 , Mayank Agarwal wrote:

> Hi Marion,
>
> Thanks a lot.
> Now I can say 2 people understood my problem :)
>
> As I quoted earlier, I have posted the same issue in other list too, but i guess
> nobody over there, is able to decode my problem yet ;)
>
>
> Mayank
>
> On Thu, Jun 7, 2012 at 7:13 PM, marion dickten <email@hidden> wrote:
> hello,
>
>>> Hello List,
>>>
>>> I guess there's a misunderstanding: As far as I understand the problem is
>>> not that Mayank uses the Terminal to start his scripts.
>>>
>>> The problem seems to be that the Application is launched in a way that
>>> involves the Terminal. AppleScript here only comes into play when the
>>> application is already up and running!
>>>
>>> Marwal, Do I understand that right, so far?
>
> I don't have anything to contribute to the problem, but I'd like to point out that Helmut has got it right. Everybody has been suggesting solutions to something that wasn't the problem. The reason seems to be that many people don't really read the posts through.
>
> I apologize if I'm rude, but I had the same problem just a few days ago: everybody kept pointing out to me that I should try error catching (exception handling) and I kept saying the same thing: There is no exception. It is just a standard dialog that is popping up. At one point I just gave up.
>
> So, just to repeat, Mayank is in no position to use Do shell script. His application is launched using the terminal and is is why the terminal window is showing. At this point AppleScript is not (yet) involved. To quote Mayank's original post:
>
> "
> 3. Now, using this installer I install the application.
> 4. Icon is created on Desktop.
> 5. When i click this Icon to open my application a Terminal window
> launches, and then my application.
> So, *I want to hide this terminal window*.
> I read somewhere that this terminal window is shown because "Mac binaries
> are set to be opened with the 'Terminal' program".
> "
>
> This is clear enough, isn't it?
> As far as I can understand, Mayank's question is actually about how to configure the Package Creator (or the application itself) to allow starting the application without using Terminal as a "starter". (Shouldn't be necessary, should it?)
> Since this hasn't anything to do with AppleScript, maybe someone experienced with providing installers for their apps can point Mayank into the right direction...?
>
> Marion
>

Marion and Mayank

Sorry if I disagree with both.
The first email is not clear and the suggestion of using a shell script seems reasonable to me.

Nobody saw the code so that initial suggestion sounds very reasonable.


However, if your desire is to hide the window created then I can suggest the following.

It the terminal window is created by your script then you can target that specific window and hide it.
Something like

Tell app Terminal
set nuwndw to make new window at front with properties {visible: false}
blah blah
end

Now, if you are not creating the window, then,  I'd check the count of windows and if it is only one, it means that the Terminal was launched before your installer and the user could probably be using it.
In this case I'd hope that this new window is window -1 and issue the following command in applescript

tell application "Terminal" to set the visible of window -1 to false

You should in this case not tamper with the app just with the window you know it has just been created

HTH






Deivy Petrescu
email@hidden
http://www.dicas.com
Automation for MacOS




 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

  • Follow-Ups:
    • Re: Hiding terminal on app launch
      • From: Michelle Steiner <email@hidden>
    • Re: Hiding terminal on app launch
      • From: Deivy Petrescu <email@hidden>
References: 
 >Hiding terminal on app launch (From: marion dickten <email@hidden>)
 >Re: Hiding terminal on app launch (From: Mayank Agarwal <email@hidden>)
 >Re: Hiding terminal on app launch (From: Deivy Petrescu <email@hidden>)

  • Prev by Date: Re: Hiding terminal on app launch
  • Next by Date: Re: Hiding terminal on app launch
  • Previous by thread: Re: Hiding terminal on app launch
  • Next by thread: Re: Hiding terminal on app launch
  • Index(es):
    • Date
    • Thread