Processing Ajax...

Title

Message

Confirm

Confirm

Confirm

Confirm

Are you sure you want to delete this item?

Confirm

Are you sure you want to delete this item?

User Image
madseason
5 discussion posts
I'm using the below script created by Keith Lammers and was wondering if the script can be adjusted to make the 2 websites that display on monitor 2 to be split screen? I would like both to be visible without manually having to resize them?

using System;
using System.Drawing;

public static class DisplayFusionFunction
{
public static void Run(IntPtr windowHandle)
{
// Set the websites and their target monitor IDs here
string[,] websites = {
{ "https://www.google.com", "1" },
{ "https://elite.finviz.com", "2" },
{ "https://www.stocktitan.net", "2" },
{ "https://www.tradingview.com", "3" },
{ "https://www.tradingview.com", "4" },
{ "https://www.tradingview.com", "5" },
{ "https://www.tradingview.com", "6" },
{ "https://www.tradingview.com/chart", "7" },
{ "https://www.tradingview.com/chart", "8" },
{ "https://www.tradingview.com/chart", "9" }
};

// Open the websites and move them to their target monitors
for (int i = 0; i < websites.GetLength(0); i++)
{
IntPtr window = BFS.Web.OpenUrlNewWindow(websites[i,0]);
uint monitorID = Convert.ToUInt32(websites[i,1]);
BFS.Window.MoveToMonitorMaximized(monitorID, window);
}
}
}
10 days ago  • #1
Keith Lammers (BFS)'s profile on WallpaperFusion.com
Try this out, it takes the websites for monitor 2 out of the original array and loop, and just has functions at the end for the two windows you want on monitor 2:

Code

using System;
using System.Drawing;

public static class DisplayFusionFunction
{
    public static void Run(IntPtr windowHandle)
    {
        // Set the websites and their target monitor IDs here
        string[, ] websites =
        {
            {
                "https://www.google.com", "1"
            },
            {
                "https://www.tradingview.com", "3"
            },
            {
                "https://www.tradingview.com", "4"
            },
            {
                "https://www.tradingview.com", "5"
            },
            {
                "https://www.tradingview.com", "6"
            },
            {
                "https://www.tradingview.com/chart", "7"
            },
            {
                "https://www.tradingview.com/chart", "8"
            },
            {
                "https://www.tradingview.com/chart", "9"
            }
        };

        // Open the websites and move them to their target monitors
        for (int i = 0; i < websites.GetLength(0); i++)
        {
            IntPtr window = BFS.Web.OpenUrlNewWindow(websites[i, 0]);
            uint monitorID = Convert.ToUInt32(websites[i, 1]);
            BFS.Window.MoveToMonitorMaximized(monitorID, window);
        }
        
        // Open the websites for monitor 2
        IntPtr window2 = BFS.Web.OpenUrlNewWindow("https://elite.finviz.com");
        BFS.Window.MoveToMonitorMaximized(2, window2);
        BFS.DisplayFusion.RunFunctionWithWindowHandle("Size and Move Window to Left Side of Monitor", window2);
        
        window2 = BFS.Web.OpenUrlNewWindow("https://www.stocktitan.net");
        BFS.Window.MoveToMonitorMaximized(2, window2);
        BFS.DisplayFusion.RunFunctionWithWindowHandle("Size and Move Window to Right Side of Monitor", window2);
    }
}
10 days ago  • #2
User Image
madseason
5 discussion posts
That is fantastic! Now is it possible to make it so all of the browser windows hide the tool bar (address bar/favorites bar) within the script? It would be the equivalent of hitting the F11 key after clicking on a browser window.
9 days ago  • #3
Keith Lammers (BFS)'s profile on WallpaperFusion.com
That wouldn't be possible, as F11 also makes the browser full screen. It doesn't only hide the toolbars.

If you want to open sites and have them without toolbars, but still be able to resize them, you could try out CloudShow. You can use the Custom URL app in CloudShow to display sites in custom sized frames.
9 days ago  • #4
User Image
madseason
5 discussion posts
Ok, to clarify there would be no way within displayfusion to run an f11 command across all monitors at once? I would have to click on each of the windows within 9 montiors and apply it seperately?
9 days ago  • #5
Keith Lammers (BFS)'s profile on WallpaperFusion.com
If you add this line after line 42, it will send F11 to the window. Not guaranteed to work as expected, but might as well try it out:
BFS.Input.SendKeys("{VK_122}");
9 days ago  • #6
User Image
madseason
5 discussion posts
It worked on all of the monitors except for the monitor where the 2 browser windows are in split screen. Would that be an exception where there is no way to have the same thing happen with those?
9 days ago  • #7
Keith Lammers (BFS)'s profile on WallpaperFusion.com
That's correct, if you send F11 to those windows, they will no longer be sized to half the screen, they'll be full screen.
4 days ago  • #8
Subscribe to this discussion topic using RSS
Was this helpful?  Login to Vote(1)  Login to Vote(-)