
HTHawks
9 discussion posts
Since this is practically my first post, the first thing I wish to do is thank the developers and staff, and community for this delightful project and product ...thank you.
I am trying out DisplayFusion with the following limitations...
- Win7 64-bit, DF version 9.9 -
...so I have been tweaking around with some of the function scripts to see how I may be able to tame it enough for serving me in my environment.
Problem/Challenge: I would like to save the Z-Order of Windows (specified Window Groups) when saving window positions ...which I understand is not directly possible.
I have messed around a bit (green-horn style) with scripts from Keith Lammers, diceblue96915, Thomas Malloch (and perhaps some others -thank you folks!) ...for Swapping Windows in various states between monitors ...KEEPING THE Z-ORDER ...and finally got that licked in spite of limitations in the depracated BFS framework available on my platform (or whatever the limitation actually may be - it may be the older DF App, I do not know enough to really know).
WHAT I WANT TO KNOW IS....
...how might it be possible, using a script (some script code snippet and method), after looping through the targetted windows and parsing out their info for the Monitor Swap of a selection of windows, which parses the z-order along with postions ...to SAVE THAT for REUSE LATER?
Envisioned Procedure: I would call the script for iterating a targetted group of windows (I know how to do that), SAVING the Z-Order with their positions (don't know how to save that). THEN LATER, when the positions get all screwed up (inevitable/inescapable reality), I would like to call a Script employing that data, for Restoring those Windows along with that Z-Order.
If anyone has any ideas how to approach this problem, I am eager to hear your ideas.
Thank you very much.
R Twohawks
Thanks for the kind words!
We'll see if we can come up with something here and let you know.
I've attached two scripts below that should do this. You can import them via the DisplayFusion Settings > Functions > Scripted Function > Import Scripted Function.
These scripts save and restore the window positions and z order by their handles, so the scripts won't work between restarts, or if the window gets destroyed and recreated (ie closing and reopening a program).
Nov 15, 2024 (modified Nov 15, 2024)
•
#3

HTHawks
9 discussion posts
Hey Thomas, I never was notifed of, or saw, your kind reply.
Thank you so much for the offered code!!
I will try it out in the coming week and post back how it worked.
R Twohawks
Sorry, I missed the part where you said you were on DisplayFusion 9.9. Here's the two scripts again but modified to work with that version of DisplayFusion. You can import them the same way via the DisplayFusion Settings > Functions > Scripted Function > Import Scripted Function.

HTHawks
9 discussion posts
Finally circling back to this. Thanks Thomas.
I tried these out but while they verify they kind of bomb out. At least now I think I have enough for effectively playing with the code and troubleshooting.
Thank you very much.
{Sure wish I could get notifications from this forum -have not been able to figure that one out since I joined up here.}