No, you have to paste the text into ScriptEditor and compile it.
Here's a zip archive with a complied version (ExportPDFByLabel.scpt). Just copy the script into your scripts folder (Applications/Adobe InDesign CC/Scripts/Scripts Panel). You run a script by double-clicking it from the scripts panel.
I've included the ID file I used to test, if you select the text field on the master page you'll see the label in the Scripts Label panel. When you run the script it asks for a destination folder for the PDFs