I am creating a macro for iTunes.
Is there a way to tell KM if one song is selected do this otherwise (more than one song selected) do that?
You could use KM to trigger an AppleScript which determines how many songs are selected, and based on that, triggers the KM macro of choice (or directly implements the desired actions in AppleScript).
Thanks RickO for your suggestion. Appreciate your help.
I’m still learning basic AppleScript, so for me it’s not an option yet. I was hoping there is a way I can do it only with KM.
No time like the present to start learning a little AppleScript. Try this:
try tell application "iTunes" set theSelection to selection set theCount to count of theSelection if theCount = 0 then display dialog "This Macro Requires at least one track to be selected." if theCount = 1 then tell application "Keyboard Maestro Engine" to do script "Macro Name #1" if theCount > 1 then tell application "Keyboard Maestro Engine" to do script "Macro Name #2" end tell end try
Insert the (unique) names of your KM macros for “Macro Name #n” above.
This won’t differentiate between music track selections and other selections, but it’s a start.
Thanks for “being stubborn” RickO.
I will try later and will tell you how it went.
Again, appreciate your help.
Works exactly as I wanted.
Thanks a lot for your time and patience!
Have a great evening.