Get file path and save as variable

Hello all,

I've looked around the forum for the question I'm about to ask, but being a noob with KM I can't seem to find an answer.

I'm looking to create a macro that, when triggered, will grab the file path of the document I have open at the front and then and save the file path as a variable to be used with other macros.

Any help would greatly be appreciated.

Thank you!

Depends a bit on the app in which you have it open.

See, for example:

Finding the File Path for the Front Document in the Front Application - Macro Library - Keyboard Maestro Discourse