Trigger macro from scpt file after inserting a blank disc

I'm writing a macro that will back up a disc after inserting a second blank disc.

I didn't see a KM trigger for inserting a blank disc (only for mounting Volumes - for which blank discs are not) - so I'm using the Mac's 'When you insert a blank Blu-ray Disc' -> Run Script... function to trigger a macro.

This old gem:

...but the macro referenced in my .scpt script is not getting called.

I'm probably not writing the .scpt script right so I could use a second set of eyes.

My current process for creating a .scpt executable:

  1. Grab the "Or By Apple Script" trigger text in the KM macro
  2. Paste it in a text file and save with a .applescript extension
  3. Open the file in Script Editor
  4. Export... > File Format: Script

Then I plug it into the 'When you insert a blank Blu-ray Disc' -> Run Script... function as seen above. Unfortunately nothing happens when inserting a blank disc :frowning:

I would post the macro, but at this point it's only a single 'Display Text Briefly' action I'm using as a placeholder to be sure the macro gets called.

Here's the .applescript before compiling to .scpt:

tell application "Keyboard Maestro Engine"
	do script "BF064EDC-282A-4D9F-87D7-0F32D3F1E25C"
	-- or: do script "Copy Disc"
	-- or: do script "BF064EDC-282A-4D9F-87D7-0F32D3F1E25C" with parameter "Whatever"
end tell

Am I talking to whatever interprets .scpt files wrong? Is there a place where I can see runtime errors?

OK I tried going a different route by making an application instead.

Basically I took the .scpt file I made as shown above and exported it as an Application:

NOTE 1: I changed the 'do script' to use the macro name in case the macro's identifier changes when I move it to the other computer
NOTE 2: Used the 'Don't Code Sign' option for the same reason as #1

...and it's working great!

Got the idea from here:

It's been 10 years since that post. Not too many people "disc" anymore, although I'm sure this forum isn't a good sample size of the rest of the population :smiley: