Change NSStatusItem's title (statusitem app)

You’re right, it doesn’t work. AppleScript and StatusMenuItem is a weird thing.

I wrote a few Menulets, but all in ObjC :wink:

Yeah I’m discovering that now…
All i want is to be able to update my menulet’s title (and maybe a few menu item’s) on command from applescript… Looks like i’m going to have to find a way to do it from ObjC.
I wanted to avoid that because ObjC is way new to me, but it looks like I have no other choice. Thanks for your help!

It took half a year reading a book and Apple’s documentation until I understood the basics of ObjC. :wink:

Your project doesn’t sound very difficult. Can you explain a bit more in detail what you’re going to accomplish?

Well i’m a freelance artist and this app would help me keep track of what project I am working on and what stage I am at in the project.
Basically it allows me to set my project, client and stage and have some useful links displayed in the menu that will be relevant to the current set Project.
I would like to be able to update the menulet’s title to relfect the current project and then be able to change the first three menu items title to reflect the current Client,Job and Stage.
It’s a pretty simple app and i can’t understand why apple would choose to not make the setTitle command available to applescript… =(

OK, then AppleScript is no go, because even you could refer to the menu, AppleScript can’t access any menu item of NSStatusMenu

Yeah, that’s why I was hoping i could use “call method” and then just write the appropriate Objc code, but it seems a little harder than that… =)
Maybe if I set the "click"action of the StatusItem to an “updateMenu” method, that way the menu gets updated every time I click on it, and we keep it in ObjC… Not sure.