How to Automate Changing the Default Open-With Application for Specific Files


Macro to Extract the OpenWith x-Attribute from the file selected in the Finder.


  • Manually adjust the desired default app of a file in the Finder.
  • Select the file.
  • Run the macro.
  • Use the captured Hex in this macros's companion macro.

image


Download: Read OpenWith X-Attribute of Selected File as Hex v1.00.kmmacros (6.7 KB)

Macro-Image

Keyboard Maestro Export

Macro-Notes
  • Macros are always disabled when imported into the Keyboard Maestro Editor.
    • The user must ensure the macro is enabled.
    • The user must also ensure the macro's parent macro-group is enabled.

System Information
  • macOS 10.14.6
  • Keyboard Maestro v10.2




Companion Macro to Write an Extracted x-Attribute to Selected Files in the Finder – i.e. Change the File's Associated Open-With app.


  • The current OpenWith configuration is Drafts.app.
    • Users can employ the companion macro to change the designated app.
  • Select the files you want to adjust in the Finder.
  • Run the macro.

Download: Write OpenWith X-Attribute of Selected File v1.00.kmmacros (8.1 KB)

Macro-Image

Keyboard Maestro Export

Macro-Notes
  • Macros are always disabled when imported into the Keyboard Maestro Editor.
    • The user must ensure the macro is enabled.
    • The user must also ensure the macro's parent macro-group is enabled.

System Information
  • macOS 10.14.6
  • Keyboard Maestro v10.2

1 Like