<< DiscussionsReply
Manage two windows with one hotkey
Sylvain Simoneau
Hi everyone,

I googled this for some time but couldn't find anything relevant.

I have one portrait monitor, one in landscape mode. What I'm trying to do is :
* when I press a given hotkey, DisplayFusion moves one app, fullscreen, to one monitor and the second app to the other monitor
* have a second hotkey that would swap this, each app would then be on their other monitor.

One advantage of this is to be able to check a web page in portrait and landscape mode, while having my coding app still visible, on the other monitor.

Is there anyway to have one hotkey handle the two apps at the same time?

Thanks a lot for your support :)
Jan 2, 2017  • #1
Keith Lammers (BFS)'s profile on WallpaperFusion.com
Binary Fortress Administrator
 Binary Fortress Administrator
You could do this with a Scripted Function. Which web browser do you use, and what's the EXE name for the coding app? I'll do up a sample function for you
Jan 4, 2017  • #2
Sylvain Simoneau
A scripted function, that's what I feared :) I'm somehow comfortable with C# but the samples looked very overwhelming to me...

<< I'll do up a sample function for you >>
Oh, this is so kind, thanks!

The first app is "C:\Program Files (x86)\JetBrains\PhpStorm\bin\phpstorm64.exe" (the class is "SunAwtFrame")
The second one is Chrome : "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" ("Chrome_WidgetWin_1").

Thanks again :)
Jan 4, 2017  • #3
Keith Lammers (BFS)'s profile on WallpaperFusion.com
Binary Fortress Administrator
 Binary Fortress Administrator
Ok, thanks! Two follow-up questions:
  • Do you have more than one Chrome window open? If so, what's the page title of the one you want to move?
  • Do the apps need to be full screen, or just maximized after they move to the other monitor?
Jan 5, 2017  • #4
Sylvain Simoneau
I usually have up to two Chrome windows open, but the title can vary, based on which project I work on, including future ones. Let's use "example" as a placeholder and I'll change the title everytime it's needed, which won't be too often.

One very acceptable prerequisite could also be that I must have only one instance open before hitting the hotkey, if it's simpler to set up.

Regarding the dimensions, you were correct to suspect that I in fact meant "maximized", not fullscreen (F11) :)
Jan 5, 2017  • #5
Keith Lammers (BFS)'s profile on WallpaperFusion.com
Binary Fortress Administrator
 Binary Fortress Administrator
Actually, it looks like we may already have a script in the repository that would work for you. Does this sound like it would work for your scenario? It would swap the two visible windows on each monitor: https://www.displayfusion.com/ScriptedFunctions/View/?ID=cf30a43a-60a7-43a7-b68f-e35526cbadfe
Jan 10, 2017  • #6
Sylvain Simoneau
Woot, awesome ! :P It's working great and I've been able to tweak it further by myself.

It may not seem like much, but this simple key press will be an important part of my daily routine.

Many thanks to you for the time spent to help me, and thanks to the person who wrote and shared the script in the first place, that's very much appreciated!
Jan 10, 2017  • #7
Keith Lammers (BFS)'s profile on WallpaperFusion.com
Binary Fortress Administrator
 Binary Fortress Administrator
Excellent, glad to hear it!
Jan 12, 2017  • #8
Was this helpful?  Login to Vote  Login to Vote
<< DiscussionsReply
Visit DisplayFusion on FacebookVisit DisplayFusion on TwitterVisit DisplayFusion on Google+Visit DisplayFusion on LinkedInSearch for DisplayFusion on RedditFollow DisplayFusion on RSSVisit DisplayFusion on Instagram
©2017 Binary Fortress  •  News  •  Discussions  •  FAQ  •  Support  •  Privacy  •  ToS