Hi Andreas,
I was foreseen this request

And actually was surprised that I have not yet answered why it is not done like that by default.
As I have already wrote, standard behaviour of the "open" commands already consumes toggle behaviour:
- If you execute the command within text editor area (better to say: in any place except of the pane itself), the command will lead to opening of the pane, or activating (setting focus to it) it if it is already open.
- If you execute command within the pane, it will bring you back to active text editor.
The use case: you activated tool pane, did some task there and jump back to document to continue editing.
But I have nothing against of creating user script (tool or service) for achieving this. IMHO it is a way to go.
1. It seems to be impossible to determine in a script whether the Find Results pane is currently open or closed.
You are right. I will extend IPane API to report, by new method reporting pane state. Will be available next build.
2. It seems to be impossible to assign a keyboard shortcut to a script (so that the script will be executed when the key is pressed).
It is impossible to achieve this automatically by calling some API from script. But it is possible by end user (this is how it is designed). So:
- if you create
tool script, you can call it as any tool for syntax (Tools->Manage Tools). There is an option to assign a shortcut for tool.
- if you create a
service script (plugin), you shall create/register a command object, and than you can assign shortcut to it as for any other command in Tools->Keyboard Settings.
You can use
Scripting Tools plugin to simplify script creation.
BR, Alex.