APP: Panel Quick Show/Hide

Started by Jingo, November 24, 2019, 05:24:05 PM

Previous topic - Next topic

Jingo

Hi All - I wrote this quick app to use a shortcut for opening and closing various panels in IM... while the shortcuts are great when your hand is on the keyboard... I wanted something that I could keep opened for quick panel toggling.... figured I would share it with the community in case the code (or the APP) is useful to anyone.

The app basically just presents a group of buttons.  When you click a button, the panel is either opened or closed and the button color toggles to reflect the current state (red=closed/green=open). But - there is a major flaw... if you start with a panel already open, then click the button, it will turn green.. but it will close the panel!  Unfortunately, there is no endpoint or panel info available via script that would allow an app to know the starting state of the panel which I could use to avoid this problem.  While I can't do anything about that - it still opens or closes things appropriately.

To install - just unzip the folder to your user apps path:  C:\ProgramData\photools.com\imatch6\webroot\user - IMatch will automatically pick up the app and show it in the app manager. 

Hope it is useful! - Andy.


All Important App ICON!


App in action:

sinus

Hi Andy
Thanks for this!

Hm, that is interesting, good stuff.  :D
I have to "play" with this a bit more, if I have more time.

MAYBE this could be interesting, to unclutter my monitor, start IMatch with almost no panel open, and use simply your app.
At the moment I do not know, if I will use this, but it is intersting, for sure.

We have shortcuts in IMatch, but to see it green and red, what is open or not, looks cool.


Best wishes from Switzerland! :-)
Markus

Jingo

Thx Markus - I was thinking of "enhancing" this to include some sort of "panel sets"... ie: then you could close all the panels, and open a group of panels using the app... this will allow the green/red to at least work but only if you keep the app open all the time. 

I really wish there was an endpoint to determine which panels were open so then I could set the starting status... but Mario said there is none so it is an imperfect app.

Stay tuned for the update! - Andy.

ubacher

Tried it, like it. Studied the code.
BUT: it does not work for me for the Quickview panel.(And that's the one I am most interested it.)

Jingo

Hmm... works here (and on a 2nd computer).  Could it be your quickview panel is already open at the start of the app... and then you click the button and it closes the panel?


sinus

Hm. Here the quickview works perfect.
I have two panels, what works not really:

1) The ExifTool CP opens, but if I click a second time on the button (to close it), a piep comes and it closes not. I have to close this "by hand".
2) The viewer. I use the viewer in "Window Mode", but if I opens it, it opens in "Panel" mode and I cannot close it again with the button. Hence I must do it manually and reset to "Window mode".

Means for me, the viewer works not and the ecp halfway.
For me personally this is not that bad. The viewer I can open simply by hit Return, what is convenient.  And the ECP I do not use often.

But all other buttons/panels works perfect.
I think about, to place the panes clever and then have open only your app at beginning. Would declutter my monitor and I could clearly see, what panel is open and what not.
For me this seems to be a really useful app.

Now I start with almost all panels open, mostly of course hidden by other panels. Because I find it not convenient, to open them by different letters.
If I start now only with your app, means with no panels open, MAYBE (I do know know) the performance from IMatch is better.
At least for sure not slower.   ;D

Thanks for the cool app, Andy.
Best wishes from Switzerland! :-)
Markus

Jingo

Glad you like it Markus!  I'm thinking of building a feature into that would work similar to workspaces... but just with panels!  Workspaces are great and powerful - but since it also stores folder locations and a few other items, switching between them in a working session isn't 100% ideal at the moment.  Using my app, I can build a pseduo workspace function - so you can choose a "Panelspace" (my just made up feature name!) and multiple panels will that you setup will open after closing all the other panels!

In this way, you can start IMatch as you want, Launch the app, chose a Panelspace (I'm liking this name!) and poof... all open panels close, your chosen  panels open, and you can then close/open individual ones one at a time... or switch between Panelspaces.

The ECP and main viewer are not true panels I suppose in that they open in Modal mode.... and a panel toggle appears not to close them.  I'll need to investigate if there is a way to worse a modal window to close beyond manually clicking the X button... if there is, I can build that into the app as well for these panels.  If not, then I'll need to probably put a warning box up when you click it a 2nd time to tell folks to manually close the window.  Not ideal... but I'm limited to what endpoints and functions are built into IM... if only I had access to the IM source code....  8)     DROOOOOOLLLLLLLL!!!!

Mario

You can also write apps in C++, C#, Python, Koitlin, ... anything that runs on Windows and can interface with a web service.
Using C# or Python gives you access to system-level functions which are (for good reasons) not accessible in browsers / IMatch apps.

I can sell you the IMatch source code, but I doubt you'll have enough money.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

Jingo

Quote from: Mario on November 26, 2019, 01:54:51 PM
You can also write apps in C++, C#, Python, Koitlin, ... anything that runs on Windows and can interface with a web service.
Using C# or Python gives you access to system-level functions which are (for good reasons) not accessible in browsers / IMatch apps.

I can sell you the IMatch source code, but I doubt you'll have enough money.

So, are you saying I can write an app in c# that can access the IMatch modal panel functions (open/close/start position/etc) directly via an APP?  If so, how would I know what functions to call since we don't have access to the DLL functions.. or do we and I just never investigated?  I'm intrigued!!

Mario

No. You can only use features provided by IMWS (endpoints). You cannot call IMatch functions from the outside.

But you could do other things like enumerating the IMatch process for window titles to figure out the names of child windows to find if and which panels are open. If you really need such a functionality.
May not always work, though, when I think this over.  Panels currently hidden in their group and not opened before are created dynamically by the panel manager in the 3rd party user interface toolkit, so they won't show up in the child window list anyway. This is all optimized to not waste cycles on panels not created yet (although open in their group) or panels invisible because tucked under another panel.

Still, I have written several IMatch "apps" (actually programs) in Python which use the IMatch endpoints but also access backoffice databases, Windows API and more. Very powerful.

Your app is nice, but I prefer a simple <Alt>+<V>, <P> to see a list of all panels. The menu also shows which panels are open and the hotkey to open/close the panel.  Not much to optimize there.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

ubacher

QuoteI'm thinking of building a feature into that would work similar to workspaces

Since each panel has its position/size  associated with it it won't be very flexible.