We are trying to use KM9 to automate an automated build system.
We use Perl as the main function to create an Ionic project. This works well, it initiates the Ionic project, pulls al the Cordova plugins in, creates the right files. However what it doesn't (and can't do), is setup Xcode correctly.
We need to use Xcode to add a Notification Service Extension for our Ionic client. There does not appear to be any way to use Xcode and any command line options to do this.
We have tried using AppleScript and Xcode is not a good citizen (and AppleScript is poor).
So we fired up KM9 and we can do just about everything quite easily. We can create the Service Notification Extension in Xcode with about 10 mins of work which is wonderful.
That's great, however we need to
- Execute the KM9 macro from Perl (or Shell or anything else we can use)
- Pass variables into the KM9 Macro as this is an automated job and it will be used for other projects. Hard coding two variables in is a no-no
https://metacpan.org/pod/Mac::KeyboardMaestro simply doesn't work with KM9 and it seven years old.
https://metacpan.org/pod/Mac::AppleScript::Glue looks complex and we aren't sure if it will even do what we want it to do.
So, we asking for the advice of the forum. We know Perl and we know Bash very well, we are not experts in AppleScript or KM9. Searching the forum shows lots of code to execute shell scripts from KM but not so much the other way around.
Is there any easy way to do what we are after please? We need to execute a KM9 macro from the command line (or from Perl or Bash) and pass two parameters in.
Thanks in advance.