making a simple menu bar item

I hope I am posting this in the right place… if not, please point me in the right direction!

I would like to be able to display the value of a variable as menu bar item - basically just a little marquee that is always on. Unfortunately my knowledge is limited to applescript, and I haven’t found a way to do this in AS so I thought I’d just ask here, which seems to be more advanced stuff, if nothing else someone might have an idea of what I would have to know to be able to modify a menubar item.

I’m hoping it’s something so basic that I could just modify the “Menu Bar 101 lesson one - creating a menu bar item with such and such icon or text” code and I really don’t need any functionality beyond that, other than the ability to change that text or icon based on the status of a variable.

Any suggestions?

Again, I apologize for my ignorance on this, I hope I am asking in the right place.

Thanks,

nathan

Hi,

here is a tutorial to write a simple
menulet in Objective-C, which provides both icon and text appearance

Try this:

property menuitem : missing value -- this being connected to a menu bar item

on run_(sender)
	set numb to 1 + 1
	menuitem's setStringValue_("The number is " & numb)
end run_