Open Finder Selection in Named Application :: Subroutine
A subroutine and an example of its use:
Open Finder Selection in Named Application Macros.kmmacros (4.3 KB)
See discussion at:
"The Application Can't Be Opened" - Questions & Suggestions - Keyboard Maestro Discourse
Expand disclosure triangle to view JS source
const
openingApp = Application(
kmvar.local_Application_name
);
return Application("Finder").selection()
.map(x => {
const fp = decodeURI(x.url()).slice(7);
return (
openingApp.open(
Path(fp)
),
fp
);
})
.join("\n");