Making an app invisible?

Anything beyond the basics in using the LiveCode language. Share your handlers, functions and magic here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
thatkeith
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 346
Joined: Mon Mar 01, 2010 7:13 pm
Location: London, UK
Contact:

Making an app invisible?

Post by thatkeith » Fri Jan 03, 2014 6:10 pm

I'd like to make an app that runs on my Mac but doesn't add its icon to the Dock. I did this years ago using ResEdit in Mac OS 9 (told you it was years ago!), and I've found a couple of prompts for doing this in Mac OS X by editing an app's info.plist file and adding a couple of lines, but when I try either of these the app just bounces in the Dock and never launches. Both claimed plist methods are shown below - not that they helped me.

<key>LSBackgroundOnly</key>
<true/>

<key>LSUIElement</key>
<string>1</string>

Any ideas?

Keith
Technical Writer, Meta
University Lecturer
Technical Editor, MacUser (1996-2015)
360 VR media specialist

thatkeith
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 346
Joined: Mon Mar 01, 2010 7:13 pm
Location: London, UK
Contact:

Re: Making an app invisible?

Post by thatkeith » Sun Jan 05, 2014 6:19 pm

Ah. Um.
It's rather embarrassing to have to admit it, but I had screwed up editing the .plist file. :oops: I'd put the new data between a key and its associated string, which broke it, making the app never finish launching.

It turns out that both those .plist additions work, although it's worth noting that the LSBackgroundOnly property blocks any user interaction whatsoever; the app won't go into the foreground even when clicked. Interesting. I think LSUIElement is more useful for my experiment.

k
Technical Writer, Meta
University Lecturer
Technical Editor, MacUser (1996-2015)
360 VR media specialist

Klaus
Posts: 13878
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: Making an app invisible?

Post by Klaus » Sun Jan 05, 2014 6:24 pm

Glad we could help! :D

Post Reply

Return to “Talking LiveCode”