Launch file with string replace?

So after reading some more I see you and other members of community have already addressed some of my issues. I am referring to this thread.here There is talk around the idea that Pathfinder does not have good support for AppleScript in other posts. I understand that what I want to do is working with Pathfinder’s menu system so I am thinking the answer is no. But here it goes. Is there a way to turn a Macro like this into a Variable instead of a Clipboard entry? This way I won’t have an entry in the Clipboard (good for not cluttering the history). But if not I can live with it. I need to tweak it so Firefox can open and paste the URL better. It is working 9 out of 10 times. In Safari it is working 3 our 10 times. Thanks