Since AppleScriptObjC is part of macOS it is possible to use its "Foundation" framework (incl. NSMenu's methods) to achieve what was probably not possible in 2012.
I found an interesting script to create custom menus from within AppleScript; from this I extracted suitable code to place text in macOS's menu bar. In fact it uses just a menu's "title" for inserting some content.
In order to demonstrate this I implemented a very basic dialog script that asks users for text input (waiting 6 sec.) which is then displayed in the menu bar temporarily (5 sec.).
Here it is:
use framework "Foundation"
use framework "AppKit"
use scripting additions
property StatusItem : missing value
property newMenu : class "NSMenu"
display dialog "Write something:" default answer "" giving up after 6
set myText to text returned of the result
if myText is "" then set myText to "TOOOOO slow … try again !"
set myText to ">> " & myText & " <<"
set bar to current application's NSStatusBar's systemStatusBar
set StatusItem to bar's statusItemWithLength:-1.0
StatusItem's setTitle:myText
set newMenu to current application's NSMenu's alloc()'s initWithTitle:"Custom"
StatusItem's setMenu:newMenu
delay 5
current application's NSStatusBar's systemStatusBar()'s ¬
removeStatusItem:StatusItem
This AppleScript code can be used in any script of yours. (Its "dialog" part is optional…)
user3439894 helped with closing my "menu", see last line of the script. Thanks a lot!