From jan at angermueller.com Fri Nov 11 13:04:09 2022 From: jan at angermueller.com (=?UTF-8?Q?Jan_Angerm=c3=bcller?=) Date: Fri, 11 Nov 2022 13:04:09 +0100 Subject: [JW Lua] macOS: Starting plug-ins with the ExecuteOSMenuCommand/MenuPositionCommand doesn't work In-Reply-To: <97ba76e9-4500-0854-09ea-3d6c039b53c5@angermueller.com> References: <0AD369A9-C39A-4B1E-8590-9A28359519C8@prodsl.ca> <97ba76e9-4500-0854-09ea-3d6c039b53c5@angermueller.com> Message-ID: <45837c25-aad1-e225-333b-7df5235d3cb5@angermueller.com> Robert, is there any trick for starting plug-ins from within a lua script with the finenv.UI():ExecuteOSMenuCommand***on macOS*? On macOS I haven't succeeded neither with ExecuteOSMenuCommand nor with MenuPositionCommand. On Windows both functions works fine. finenv.UI():GetOSMenuCommandFromItemText seems to work fine on macOS. Or it least it returns a value that seems to be valid (2033201231). In the documentation it says that on macOS the Finale *document window must be in focus*. Is this the problem? Can I force the document to be in focus? I have tried finenv.UI():ActivateDocumentWindow ()? or finenv.UI():MenuCommand(finale.MENUCMD_SELECTIONTOOL) directly before finenv.UI():ExecuteOSMenuCommand. It doesn't work. Do you have a working example lua script to start any plug-in from the Finale Plug-ins menu on macOS? This topic has already been twice on the mailing list for MenuPositionCommand() (see below). But with no answers yet. I had an interesting request for which I developed a working Windows script. But it doesn't work on macOS yet. The request was for a script that starts another plug-in, but applies the plug-in only to all parts, not to the score. Jan Am 02.03.2020 um 15:47 schrieb Jan Angerm?ller: > Hi Simon, > > did you find a solution for this? > I encountered the same issue. > It works fine on Windows, but on MacOS I can't access the Plug-ins > menu via MenuPositionCommand() either. > > Best, > Jan > > Am 28.01.2017 um 18:09 schrieb Simon Leclerc: >> Hi everyone, >> >> I?m trying to access the menu ?Plug-ins? (as in ?File?, ?Edit?, >> ?Utilities?, etc?) using the?ui:MenuPositionCommand(), but to no avail. >> >> I have access to all the other menus and sub-menus, but the ?Plug-in? >> one, which should be #7 on a Mac system, seems not possible to be >> invoked. >> >> I tried many combinations, the zero-based concept not being true all >> the time, but could not find the right one. >> >> Any clue? >> >> Thanks to all. >> >> >> >> >> >> >> Simon Leclerc >> 60, Mirabelle >> Ste-Agathe-des-Monts, Qu?bec >> J8C 0W9 >> simon at prodsl.ca >> >> >> >> >> >> _______________________________________________ >> JWLua mailing list >> JWLua at jwmusic.nu >> http://jwmusic.nu/mailman/listinfo/jwlua_jwmusic.nu > > -- > Dipl.-Ing.(FH) Dipl.-Jur. Jan Angerm?ller > Orchideenstieg 13 > 22297 Hamburg > Tel. 040 - 28 94 84 82 > Mobil 0173 - 99 33 904 > www.elbsound.studio > > _______________________________________________ > JWLua mailing list > JWLua at jwmusic.nu > http://jwmusic.nu/mailman/listinfo/jwlua_jwmusic.nu -- Jan Angerm?ller Orchideenstieg 13 22297 Hamburg Tel. 040 - 28 94 84 82 Mobil 0173 - 99 33 904 www.elbsound.studio -------------- next part -------------- An HTML attachment was scrubbed... URL: From robert at robertgpatterson.com Fri Nov 11 14:30:06 2022 From: robert at robertgpatterson.com (Robert Patterson) Date: Fri, 11 Nov 2022 07:30:06 -0600 Subject: [JW Lua] macOS: Starting plug-ins with the ExecuteOSMenuCommand/MenuPositionCommand doesn't work In-Reply-To: <45837c25-aad1-e225-333b-7df5235d3cb5@angermueller.com> References: <0AD369A9-C39A-4B1E-8590-9A28359519C8@prodsl.ca> <97ba76e9-4500-0854-09ea-3d6c039b53c5@angermueller.com> <45837c25-aad1-e225-333b-7df5235d3cb5@angermueller.com> Message-ID: Most likely it is the focus issue, especially if you are using a dialog box, and I don't know of a way to resolve it. I've never tried to use execute menu item for plugins. If you are trying to activate another Lua script, you could use FCLuaScriptItem(s) instead. On Fri, Nov 11, 2022 at 6:05 AM Jan Angerm?ller wrote: > Robert, > > is there any trick for starting plug-ins from within a lua script with the > finenv.UI():ExecuteOSMenuCommand *on macOS*? > > On macOS I haven't succeeded neither with ExecuteOSMenuCommand nor with > MenuPositionCommand. > On Windows both functions works fine. > > finenv.UI():GetOSMenuCommandFromItemText seems to work fine on macOS. > Or it least it returns a value that seems to be valid (2033201231). > > In the documentation it says that on macOS the Finale *document window > must be in focus*. > Is this the problem? Can I force the document to be in focus? > I have tried finenv.UI():ActivateDocumentWindow () or > finenv.UI():MenuCommand(finale.MENUCMD_SELECTIONTOOL) directly before > finenv.UI():ExecuteOSMenuCommand. > It doesn't work. > > Do you have a working example lua script to start any plug-in from the > Finale Plug-ins menu on macOS? > > This topic has already been twice on the mailing list for > MenuPositionCommand() (see below). > But with no answers yet. > > I had an interesting request for which I developed a working Windows > script. But it doesn't work on macOS yet. > The request was for a script that starts another plug-in, but applies the > plug-in only to all parts, not to the score. > > Jan > > > Am 02.03.2020 um 15:47 schrieb Jan Angerm?ller: > > Hi Simon, > > did you find a solution for this? > I encountered the same issue. > It works fine on Windows, but on MacOS I can't access the Plug-ins menu > via MenuPositionCommand() either. > > Best, > Jan > > Am 28.01.2017 um 18:09 schrieb Simon Leclerc: > > Hi everyone, > > I?m trying to access the menu ?Plug-ins? (as in ?File?, ?Edit?, > ?Utilities?, etc?) using the ui:MenuPositionCommand(), but to no avail. > > I have access to all the other menus and sub-menus, but the ?Plug-in? one, > which should be #7 on a Mac system, seems not possible to be invoked. > > I tried many combinations, the zero-based concept not being true all the > time, but could not find the right one. > > Any clue? > > Thanks to all. > > > > > > > Simon Leclerc > 60, Mirabelle > Ste-Agathe-des-Monts, Qu?bec > J8C 0W9 > simon at prodsl.ca > > > > > > _______________________________________________ > JWLua mailing listJWLua at jwmusic.nuhttp://jwmusic.nu/mailman/listinfo/jwlua_jwmusic.nu > > > -- > Dipl.-Ing.(FH) Dipl.-Jur. Jan Angerm?ller > Orchideenstieg 13 > 22297 Hamburg > Tel. 040 - 28 94 84 82 > Mobil 0173 - 99 33 904www.elbsound.studio > > > _______________________________________________ > JWLua mailing listJWLua at jwmusic.nuhttp://jwmusic.nu/mailman/listinfo/jwlua_jwmusic.nu > > > -- > Jan Angerm?ller > Orchideenstieg 13 > 22297 Hamburg > Tel. 040 - 28 94 84 82 > Mobil 0173 - 99 33 904www.elbsound.studio > > _______________________________________________ > JWLua mailing list > JWLua at jwmusic.nu > http://jwmusic.nu/mailman/listinfo/jwlua_jwmusic.nu > -------------- next part -------------- An HTML attachment was scrubbed... URL: