Page 1 of 1
Can Livecode Create Menubar Apps?
Posted: Mon Sep 23, 2019 9:47 am
by icouto
Hi all,
I was wondering whether LiveCode is able to create menubar utility apps for MacOS - you know, apps that add a menu item to the LEFT side of the global menubar (like Dash, SkyFonts, 1Password, etc.).
Re: Can Livecode Create Menubar Apps?
Posted: Mon Sep 23, 2019 10:09 am
by richmond62
I do know that LiveCode apps cannot send low-level signals to the operating system . . .
Re: Can Livecode Create Menubar Apps?
Posted: Mon Sep 23, 2019 11:34 am
by bogs
Thankfully, doing what your looking to do shouldn't require that
I don't have a Mac, so I can't answer your question definitively. I believe Lc on Windows *can* make system tray programs. I don't believe this is possible on 'nix (not sure why), I don't know if it is possible on the Mac menubar area.
Re: Can Livecode Create Menubar Apps?
Posted: Mon Sep 23, 2019 5:26 pm
by jacque
Using native LC scripting, system menus aren't supported on Macs but it could be done with LC Builder. Trevor Devore took a shot at it but I'm not sure how far he got. You might ask him:
viewtopic.php?t=30983
Re: Can Livecode Create Menubar Apps?
Posted: Mon Sep 23, 2019 6:19 pm
by Klaus
Nowadays LC supports a Mac Status Menu, maybe that helps?
Look under "Mac Status Menu" in the dictionary.
Re: Can Livecode Create Menubar Apps?
Posted: Mon Sep 23, 2019 7:12 pm
by richmond62
-
Presumably all the creation routines have to subsist in a stack that is invisible, and is running in the
background.
Re: Can Livecode Create Menubar Apps?
Posted: Mon Sep 23, 2019 8:06 pm
by jacque
Klaus wrote: ↑Mon Sep 23, 2019 6:19 pm
Nowadays LC supports a Mac Status Menu, maybe that helps?
Look under "Mac Status Menu" in the dictionary.
Well cool, I completely missed that. I wonder when that was added, there's no date in the dictionary entries. So the answer is "yes you can do that."
Re: Can Livecode Create Menubar Apps?
Posted: Mon Sep 23, 2019 8:14 pm
by richmond62
So the answer is "yes you can do that."
But the "funny" thing is that when I went:
Code: Select all
on openStack
macStatusMenuCreate "Richmond"
macStatusMenuSetCustomIcon "R", the long id of img "RR"
end openStack
I was told, subsequently that a menu 'thing' had
been created: but there was NO sign of it anywhere.
-
Re: Can Livecode Create Menubar Apps?
Posted: Mon Sep 23, 2019 8:22 pm
by Klaus
jacque wrote: ↑Mon Sep 23, 2019 8:06 pm
Klaus wrote: ↑Mon Sep 23, 2019 6:19 pm
Nowadays LC supports a Mac Status Menu, maybe that helps?
Look under "Mac Status Menu" in the dictionary.
Well cool, I completely missed that. I wonder when that was added, there's no date in the dictionary entries. So the answer is "yes you can do that."
I think it came with 9.5.
BTW: Trevor De Vore made it!
Re: Can Livecode Create Menubar Apps?
Posted: Tue Sep 24, 2019 4:23 pm
by jacque
BTW: Trevor De Vore made it!
I am not the least bit surprised. If I ever need LCB stuff I know who to call.
Re: Can Livecode Create Menubar Apps?
Posted: Tue Sep 24, 2019 7:01 pm
by PBH
richmond62 wrote: ↑Mon Sep 23, 2019 8:14 pm
I was told, subsequently that a menu 'thing' had
been created: but there was NO sign of it anywhere.
Could it be because you didn't populate the menu? I'm not too sure!
Anyway, I had a play and it seems to work fine, so I've added a sample stack for the benefit of everyone here.
Requires minimum LC9.5.x - Build 15503 or later, on Mac.
Have fun.

Re: Can Livecode Create Menubar Apps?
Posted: Wed Sep 25, 2019 3:02 pm
by dunbarx
PBH
Hi.
Your stack throws an error. There is no function "macStatusMenuNames()" in the mouseUp script. Or anywhere else, it seems.
Craig
Re: Can Livecode Create Menubar Apps?
Posted: Wed Sep 25, 2019 4:40 pm
by PBH
Hi Craig,
macStatusMenuNames() is in the Mac Status Menu Library supplied in the latest LC9.5.0. The version I have is Build 15503 which appears to be the most up-to-date "stable" version of LC.
HTH
Paul
Re: Can Livecode Create Menubar Apps?
Posted: Fri Oct 22, 2021 12:37 am
by smelly
@ dunbarx
I ran the Mac Menu Sampler.livecode and it worked well for me. I'm using LC 9.6.3. I think the current version is 9.6.4 or 5. I have an LC Mac app I'm developing in which I was looking for a way my users can give commands to my app while busy using some other app, such as a text editor, browser, or whatever.
My LC app plays music in the background and I want the user to be able to control the music (play, stop, et. al.) without changing the foreground app to my music player and then back again to what they were working on. I think this Mac Status Menu utility is just what I need. Alternatively, I have implemented this background command capability in utilities such as Applescript and Keyboard Maestro with associated keyboard shortcuts, but these add excessive complications for the less sophisticated users. Optimally, I'd like to see if I can figure out a way to add keyboard shortcuts to the LC Mac Status Menu so my users can have some universal keyboard shortcuts to control the music player, whatever other program they might be using. Anybody know how I can do that?
Re: Can Livecode Create Menubar Apps?
Posted: Fri Oct 22, 2021 9:46 am
by Klaus
Hi Igor(?),
icouto wrote: ↑Mon Sep 23, 2019 9:47 am
Hi all,
I was wondering whether LiveCode is able to create menubar utility apps for MacOS - you know, apps that add a menu item to the LEFT side of the global menubar (like Dash, SkyFonts, 1Password, etc.).
LC can only create a menubar utility in and for its own standalone, not for other applications or the macOS in general!
So the correct answer to your question will be no.
Best
Klaus