Getting status bar text

I want to show a notification that a long operation is starting. The status bar text at the bottom of the screen looks like a good place for it. I can do that in Lua with info.setText. When the long operation has completed, I want to restore to the status bar whatever text was previously shown. But how can I get the existing status bar text so I can save it before showing the notification message? No info.getText function is mentioned in the Lua Extension manual.

As a workaround, I can save what I’m showing on the status bar to a variable every time I show something new. But I’m hoping there’s a better way.

There is no getter function on the info currently. So the approach of maintaining the value in a variable and shadowing its contents with info.setText() is the way to do that. I just added the getter on the Lua todo list. In general, the upcoming 4.1 will have quite some additions to the Lua.

1 Like

OK, thanks!