注册为登录项目与Cocoa? [英] Register as Login Item with Cocoa?

查看:77
本文介绍了注册为登录项目与Cocoa?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Google给了我: http://developer.apple.com/samplecode/LoginItemsAE /index.html

Google gave me: http://developer.apple.com/samplecode/LoginItemsAE/index.html

我想,必须有比使用AppleScript事件更好的方法。

And I figured there must be a better way than using AppleScript Events.

所以我下载了Growl源码。他们使用苹果开发者文章中的确切来源。

So I downloaded the Growl sources. They use the exact sources from that Apple developer article.

有更好的方法吗?

推荐答案

在系统偏好设置中有帐户中的登录项在Leopard中新增的API称为LSSharedFileList。它允许你做的事情之一是查看和编辑登录项目列表(在该API中称为会话登录项目)。

There's an API that's new in Leopard called LSSharedFileList. One of the things it lets you do is view and edit the Login Items list (called Session Login Items in that API).

BTW,我是主要开发者咆哮。我们还没有切换到AE,因为我们仍然需要Tiger,但我正在考虑把它删除1.2(还没有和其他开发人员讨论过)。当我们删除Tiger时,我们也将删除LoginItemsAE,并切换到共享文件列表API。

BTW, I'm the lead developer of Growl. We haven't switched away from AE yet because we still require Tiger, but I'm thinking of dropping that for 1.2 (haven't talked it over with the other developers yet). When we do drop Tiger, we'll drop LoginItemsAE as well, and switch to the Shared File List API.

strong> EDIT :自从2009年,当我最初写这个答案,Growl已经切换到LSSharedFileList,我已离开项目。

EDIT from the year 2012: Since 2009, when I originally wrote this answer, Growl has switched to LSSharedFileList and I've left the project.

这篇关于注册为登录项目与Cocoa?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆