MacOS: Get number of parts as a System Variable

General notation questions, including advanced notation, formatting, etc., go here.

Moderators: Peter Thomsen, miker

User avatar
apkyburz
Posts: 179
Joined: Thu Jul 06, 2017 9:50 am
Finale Version: 26 (+TG, Pattsn, JW)
Operating System: Mac

Post by apkyburz » Fri Mar 13, 2020 1:13 am

Hi Forum,

This is a tech-savvy question. On MacOS, is there any way, by Finale Script, or other, to get the number of parts of a file translated into a MacOS System Variable so I can use it in AppleScript?

Thank you,
Best,


User avatar
apkyburz
Posts: 179
Joined: Thu Jul 06, 2017 9:50 am
Finale Version: 26 (+TG, Pattsn, JW)
Operating System: Mac

Post by apkyburz » Fri Mar 13, 2020 1:21 am

Actually,

Just to get the number to appear in a window or field would already be more than enough.

BuonTempi
Posts: 1297
Joined: Fri Aug 20, 2010 8:59 am
Finale Version: Finale 27
Operating System: Mac

Post by BuonTempi » Fri Mar 13, 2020 12:52 pm

Finale provides significant metadata to Spotlight, including a list of the Parts in the document. See "Get Info > More Info" in the Finder.

You can access this information in AppleScript. Possibly using the shell command mdls in a 'do command' call.

Code: Select all

mdls /Users/Ben/Documents/Music/Palestrina/Palestrina\ Magnificat\ 3rd\ tone\ COMPLETE.musx 
com_makemusic_defaultMusicFont     = "Maestro"
com_makemusic_instruments          = (
    Tenor,
    Alto,
    Bass
)
com_makemusic_parts                = (
    Score,
    Alto,
    Tenor,
    Tenor,
    Bass
)
com_makemusic_staffcount           = 4
.... continues...

User avatar
apkyburz
Posts: 179
Joined: Thu Jul 06, 2017 9:50 am
Finale Version: 26 (+TG, Pattsn, JW)
Operating System: Mac

Post by apkyburz » Fri Mar 13, 2020 6:35 pm

BuonTempi wrote:
Fri Mar 13, 2020 12:52 pm
Finale provides significant metadata to Spotlight, including a list of the Parts in the document. See "Get Info > More Info" in the Finder.

You can access this information in AppleScript. Possibly using the shell command mdls in a 'do command' call.
Hi BuonTempi,

That's a good start. Unfortunately the metadata doesn't calculate a number at "com_makemusic_parts". Maybe I can get around it somehow, I'll tinker with it.

Thank you!

BuonTempi
Posts: 1297
Joined: Fri Aug 20, 2010 8:59 am
Finale Version: Finale 27
Operating System: Mac

Post by BuonTempi » Sun Mar 15, 2020 11:26 am

No, there's no number: you'd have to count the array items.

Post Reply