开发者

Mac OS : creating a background periodic simple script

开发者 https://www.devze.com 2023-01-01 08:50 出处:网络
I have a friend who wants something quite easy : he has a mac, and he would like a very simple script/app that runs in the background. The goal is to replace a file every 5 minutes with one downloaded

I have a friend who wants something quite easy : he has a mac, and he would like a very simple script/app that runs in the background. The goal is to replace a file every 5 minutes with one downloaded from the internet. I would also like a menu on the top bar (like the clock on Mac O开发者_StackOverflow中文版s, the wifi, the sound, Dropbox,...) What would be the easiest way to do that ? Objective C ? AppleScript ? Do you guys have any inspiration for that ?

Thanks a lot

Julien


Would be easy with Cocoa, just create an "background" app with the NSMenuExtra (without Dock icon too).

I encourage you to google up some references on how to do this (e.g. Cocoa Dev Central).

Sounds like a fun project, best of luck!


You should be able to do this with a Script application, but I don't know if you can get a menubar item that way. Actually, you can do everything except the menubar item in Automator, if you were so inclined.


As far as running in the background goes, I use Lingon to set up the repeating scripts

http://sourceforge.net/projects/lingon/files/

Super easy, super reliable.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号