Hi! I try to do the thing this way (screenshots). But nothing happen on hot key pressing. The thing does work with Automator (that is selection goes "from Finder", while ForkLift is in use).
Is Forklift the front most application when you click the trigger?
Available in these applications is different from Available when these applications are running. The former works when Forklift is in front. The later works whenever Forklift is running.
Change the Forklift Group to **Available when these applications are running and try it.
Otherwise, you may have to clarify exactly what you are a trying to do.
Ah, I was trying to select the same file in ForkLift. Yes, point 3 dosen't work, just Finder selection is opened in editor even when Finder window is not active.
So we returned to the starting point on finding the way to open a file selected in ForkLift.
You discuss three applications in your example... Sublime text is in your example screenshot, Finder and Forklift. Does Sublime Text have any reason to be in this discussion?
The way your macro shows is that when using ForkLift, if you press option-1, it will open the selected file (which in Finder) using Sublime Text. I can clearly see that.
If that's not what you want, you should explain exactly what you want.
Do you want your selection within ForkLift to open in Sublime Text??? If so, please state that.
Yes, you are tight, Sublime Text can be replaced with any other app in our context.
As for using Finder selection... Well, this trick does work for Automator (screen shot is attached). I don't know internal mechanics, but guess ForkLift translate some kind of information to system regarding it's selected items.
Got it. Try the below and let me know if it works for you.
I don't have Sublime Text but the below works for Preview. Just change the Open with area where Preview is and change it to the application Sublime Text or whatever you need.
The trick is to copy the path somewhere (in this test the clipboard). If you don't need to store the variable longer, I'd suggest you Set the variable as Local_filepath and open the variable in %Variable%Local_filepath%. I didn't want to confuse you though.
Had to Modify the macro to add a delay and to clear the variable.
Great new way, thanks! Unfortunately, it works rather magically: it opens previous selection, and after closing an editor and reactivating hot key it opens current selection. As if some "flush" command is expected somewhere in the chain.
Also multiselection demands some clipboard buffer processing to replace EOLs with spaces, I guess.
So the only issue remaining is to replace EOLs with spaces (I have tried to paste clipboard content resulting from multiselection into text file, and every item is placed on it's own row). Has KM got some kind of such transformation possibilities?