Using Scrivener, I created a utility which allows me to take notes on the fly when I am in other apps. The utility is basically a custom make Scrivener file which is a floating window.
My last step is to use Keyboard Maestro to open / close the utility using a bring to the front and hide window actions and a global keyboard shortcut.
The macro is incomplete. As soon as I get the bring window to front action to work, I will add an if then else action to toggle show hide,
My problem is that when I bring the floating window to the front, the window does come to the front which is great, but also the Scrivener app with all its open tabs.
How can I bring only the floating window with the name Scratchpad based on AmberV to the front without showing the Scrivener app itself?
I tried adding the hide Scrivener action but it hide all Scrivener windows including the floating window
I did some testing and found a simple solution which works for individual apps, and which I would like to generalize to all apps, and thus create a macro and shortcut in the global macro group.
At the present time:
if I am in DevonThink → open my floating Scrivener scratchpad (open file + floating window menu action) → I simply add an action to show DevonThink , and presto it works perfeclty and I have what I want, ie access to my sophisticated scratchpad while working in DevonThink
if I am in Chrome → open my floating Scrivener scratchpad (open file + floating window menu action) → I simply add an action to show Chrome , and presto it works perfeclty and I have what I want, ie access to my sophisticated scratchpad while working in Chrome
and so on and so forth, using Numbers, Safari etc etc etc
The only remaining problem is that I have to write a different macro for each app I am working in.
Is it conceivable to create a macro which would
start by identifying which app (or window) I am in, let's call it “AppX” (put the name of the app in a variable?)
open my scratchpad with floating window (I can do this)
Show AppX (simply the show application action below or a show window action)
You could also use a Switch, and use a ‘Application%1’ for defining more than one app, so it activates each app accordingly.
Sounds confusing but is miles better than a ton of nested Ifs.
thank you. Switch is a good idea when using variables.
There are 3 issues:
although there are many apps, they have in common that they are all the last app activated. Hence, they are all covered by the simple last Activate Last App action.
the different methods may see identical in terms of outcome, but they are not. There is a question of placing the cursor in the correct place at the end
By the way, I always very much enjoy your comments and original thinking