Either you or me is making a basic error. And it might be me. But in each case below you are assuming that the Select Menu action saves data into a variable.
I'm going to give you the benefit of the doubt that you have some program called Path Finder (that I've never heard of) which uses its menu system to save path information into a KM variable whose name shows up in its menu system. If that's possible, then I would say your bug is that you are copying the same string into both of your two variables.
You aren't telling us what's happening here. You said it isn't working. Why isn't it working? What is the false result? Are you getting empty variables? Is nothing being inserted at all? Is the macro aborting? Does your computer catch fire? (That last one was a joke.)
Okay, understood. In that case I have to google what this "Path Finder" app is that you have and what its menu system does. I'm doubtful that it populates KM variables, but I could be wrong. My guess at this point is that you are under the wrong assumption that the Path Finder app populates KM variables.
Thank you for your suggestion which I implemented.
Let's go to the core of the problem. Why does the following not display the name ? (note that I changed to set variable to text as you suggested).
the literal text %Variable%Name% is displayed instead of the actual name
The likely reason is that your clipboard probably already contained "%Variable%Name%" due to the PREVIOUS bug which we now fixed.
Put this action directly after your first action. If you are not seeing the file name here, then that's your problem. I can't prove what Path Finder does to the clipboard because I don't have it, but I'm not sure it does what you think it does.
When I take PathFinder out of the macro (which I have to, since I don't have PathFinder) the remaining code works perfectly for me.
So I have a clue what might be causing it. Some apps put some hidden things into clipboards. To be honest I have no idea what that means. It's been discussed in several threads on this board in the last few days. An update to KM is coming up very soon that addresses this issue.
So I admit defeat here, unless I'm right about this clipboard bug which is being addressed right now by Peter.
Ok, and my thought is that the bug is in the Green #1 action which is bugged for the reason of hidden information in the System Clipboard placed there by Path Finder that is a known issue and is about to be fixed. but if I'm wrong, I'm wrong.
Thank you for finding the problem, ie clipboard change issue.
I would greatly appreciate your critique of my approach which does not involve the CLIPBOARDSEED() variable. It works, but I would like to know if my unsophisticated approach has pitfalls or limitations.
the macro navigates from Scrivener to pathfinder back to Scrivener
Is there any way to avoid having pathfinder flash on the screen ? could I remain in Scrivener and have the pathfinder related actions happen in the background.
The reason for my question is to better understand KBM, not yet another caprice
No. Not as long as you are using the KM "Reveal in Finder" Action.
Frankly, I would never use your basic approach.
In your other topics, @ccstone, @tom, and I have all shared with you much better ways to get the POSIX path of the current open file in an app.