Can Livecode Create Menubar Apps?
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
- VIP Livecode Opensource Backer
- Posts: 92
- Joined: Wed May 29, 2013 1:54 am
- Location: Sydney, Australia
Can Livecode Create Menubar Apps?
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.).
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.).
-
- Livecode Opensource Backer
- Posts: 9443
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: Can Livecode Create Menubar Apps?
I do know that LiveCode apps cannot send low-level signals to the operating system . . .
Re: Can Livecode Create Menubar Apps?
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.
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.
-
- VIP Livecode Opensource Backer
- Posts: 7255
- Joined: Sat Apr 08, 2006 8:31 pm
- Location: Minneapolis MN
- Contact:
Re: Can Livecode Create Menubar Apps?
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
viewtopic.php?t=30983
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
Re: Can Livecode Create Menubar Apps?
Nowadays LC supports a Mac Status Menu, maybe that helps?
Look under "Mac Status Menu" in the dictionary.
Look under "Mac Status Menu" in the dictionary.
-
- Livecode Opensource Backer
- Posts: 9443
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: Can Livecode Create Menubar Apps?
Presumably all the creation routines have to subsist in a stack that is invisible, and is running in the
background.
-
- VIP Livecode Opensource Backer
- Posts: 7255
- Joined: Sat Apr 08, 2006 8:31 pm
- Location: Minneapolis MN
- Contact:
Re: Can Livecode Create Menubar Apps?
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."
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
-
- Livecode Opensource Backer
- Posts: 9443
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: Can Livecode Create Menubar Apps?
But the "funny" thing is that when I went:So the answer is "yes you can do that."
Code: Select all
on openStack
macStatusMenuCreate "Richmond"
macStatusMenuSetCustomIcon "R", the long id of img "RR"
end openStack
been created: but there was NO sign of it anywhere.
-
Re: Can Livecode Create Menubar Apps?
-
- VIP Livecode Opensource Backer
- Posts: 7255
- Joined: Sat Apr 08, 2006 8:31 pm
- Location: Minneapolis MN
- Contact:
Re: Can Livecode Create Menubar Apps?
I am not the least bit surprised. If I ever need LCB stuff I know who to call.BTW: Trevor De Vore made it!
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
-
- VIP Livecode Opensource Backer
- Posts: 129
- Joined: Sun Feb 20, 2011 4:26 pm
- Location: Vancouver Island, BC, Canada. ex.UK
- Contact:
Re: Can Livecode Create Menubar Apps?
Could it be because you didn't populate the menu? I'm not too sure!richmond62 wrote: ↑Mon Sep 23, 2019 8:14 pmI was told, subsequently that a menu 'thing' had
been created: but there was NO sign of it anywhere.
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.
- Attachments
-
- Mac Menu Sampler.livecode.zip
- (3.28 KiB) Downloaded 366 times
Last edited by PBH on Wed Sep 25, 2019 11:22 pm, edited 1 time in total.
-
- VIP Livecode Opensource Backer
- Posts: 9709
- Joined: Wed May 06, 2009 2:28 pm
- Location: New York, NY
Re: Can Livecode Create Menubar Apps?
PBH
Hi.
Your stack throws an error. There is no function "macStatusMenuNames()" in the mouseUp script. Or anywhere else, it seems.
Craig
Hi.
Your stack throws an error. There is no function "macStatusMenuNames()" in the mouseUp script. Or anywhere else, it seems.
Craig
-
- VIP Livecode Opensource Backer
- Posts: 129
- Joined: Sun Feb 20, 2011 4:26 pm
- Location: Vancouver Island, BC, Canada. ex.UK
- Contact:
Re: Can Livecode Create Menubar Apps?
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
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?
@ 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?
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?
Hi Igor(?),
So the correct answer to your question will be no.
Best
Klaus
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