That seems like a sensible logic flow.
Presumably QAP will do a 'copy' command when the Add Active command is used. That way it can determine if there is text on the clipboard. I don't know if this is possible, but have QAP assess whether the contents of the clipboard is
text, file, or folder.
Then the logic flow might be:
If the clipoard contains a folder -and- the current window is NOT Windows Explorer, add selected folder.
else If clipboard conains folder -and-
the current window is Windows Explorer-> ask user if we add currently open folder, or selected subfolder.
else If the clipoard contains a file-and- the current window is NOT Windows Explorer, add selected file
else If clipboard conains file -and- the current window is Windows Explorer -> ask user if we add currently open folder, or selected file.
;Note that if a file or folder were currently selected, you'd usually be in Windows Explorer, (or the Desktop?)
else If clipboard contains text, -and- the current window is a browser -> ask user if we add a web Link or a snippet.
else If clipboard does not contain text -and- the current window is a browser -> add a web Link
else If clipboard contains text, -and- the current window is not a browser -> ask if we should add the running Application or a text Snippet (new)
else -> add the running Application using the current window's *.exe path (new)
....I'm not sure if that logic is sound... I hurt my brain a little typing it. LOL
*Note that when checking for "Windows Explorer" QAP should also check for the currently assigned 'Preferred file manager.' In my case that's XYplorer via QAPconnect.
Just some ideas....