I tried finding an answer in the forums - apologies if I missed it.
I have a macro where I copy a bible reference from my current application (e.g. MultiMarkdown composer) and then invokes PocketBible to get the full text of the verse, put it on the clipboard and return me to the original application.
I do the application switching by saving the %CurrentApplication% token to a variable and then invoke the Use Variable - set front application by name. It works great unless the first (current) application is in Full Screen mode. Then it takes me the last used application that is not full screen. What am I doing wrong? Or is this not possible currently and I should avoid full screen mode?
I stripped down my macro to a representative case. It isn't specific to PocketBible. To see the problem, open a TextEdit document, type a few lines of text into it. Now go into any other editor (I used BBEDIT), open a document, and invoke the macro. It will activate the textedit window and select all, and copy. It should then return to the other editor (BBEDIT in my case). If I paste, I will get the text that was in the Textedit window. So far so good.
Now make the editor where you originate the macro full screen (again, BBEDIT in my case). Invoke the macro. With this one I get an error message of Action Failed, Use Variable to Set Window by Name failed......
Is there another way to get this to work so that if I am in Full Screen from the invoking application, it will work? It's not a show stopper if I can't, I was just wondering if I was missing something.
The key might be in using an "activate application" action instead of a "set front window" one. In a use case like this, you don't need to set a variable to get back to the original app; the "Activate Last Action" action takes care of that handily. Maybe try something like this and see if it makes any difference for you?