Re: Hiding/Launching Applications Question
Re: Hiding/Launching Applications Question
- Subject: Re: Hiding/Launching Applications Question
- From: Lee Noble <email@hidden>
- Date: Mon, 7 Feb 2005 21:41:44 +0000
On Feb 7, 2005, at 12:48, Steve Suranie wrote:
Hi folks:
Is there a way to launch an application but not have it's GUI appear on the
desktop? I'm building an application which uses Terminal to pull in some RSS
feeds and I was wondering if there is a way to do it without having to have
Terminal visible (other than hiding it).
Thanks
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
I may get shot down in flames for this suggestion but I just tried the following. Your mileage may vary.
Drag Terminal.app from the Utilities folder to your desktop AS A COPY so option drag if you are admin, drag if you are not admin.
Rename the new application "MyTerminal.app"
Open the package and edit the file MyTerminal.app/Contents/info.plist
At the end of the file before the last </dict></plist> tags add the following two lines:
<key>LSUIElement</key>
<string>1</string>
This stops the icon showing up in the dock.
Open Script Editor and type this:
tell application (((path to desktop from user domain) as string) & "MyTerminal.app")
activate
set visible of window 1 to false
-- By the way, according to the Terminal dictionary the visible attribute is read only but regardless setting it seemed to work.
end tell
You now have an invisible Terminal though I', not sure why you'd want one.
In order to quit the app you need to run the script:
tell application (((path to desktop from user domain) as string) & "MyTerminal.app")
quit
end tell
I'm not certain how stable this setup is since the Activity Monitor still shows the process as Terminal so I don't know what would happen if you launched the proper Terminal at the same time. I leave that as an exercise for the reader.
Lee
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden