Processing Ajax...

Title
Close Dialog

Message

Confirm
Close Dialog

Confirm
Close Dialog

Confirm
Close Dialog

User Image
Alex Culea95236
5 discussion posts
Hi,
is there a way to set the shortcut keys to turn off a monitor and then with the same shortcut key to turn it back on?

For example i have 3 monitors, the main is already on, other 3 are off and I want only one of the other two that are off to be turned on. And if i decide to turn off only one of them (even if it's the main monitor) to turn it off.
By off i mean disable or to put it in stand by.
Jan 13, 2020  • #1
Keith Lammers (BFS)'s profile on WallpaperFusion.com
It's not possible to put individual monitors in sleep mode, but you could disable them by creating Monitor Profiles for each setup and then assigning key combinations to each one.

Hope that helps!
Jan 13, 2020  • #2
User Image
Alex Culea95236
5 discussion posts
Quote:
It's not possible to put individual monitors in sleep mode, but you could disable them by creating Monitor Profiles for each setup and then assigning key combinations to each one.

Hope that helps!


Disable them is good and I already know how to do that. What i want is if I press ctrl+1 to disable monitor 1, when I press again ctrl+1 enables it.
Jan 13, 2020 (modified Jan 13, 2020)  • #3
Keith Lammers (BFS)'s profile on WallpaperFusion.com
Right, there isn't currently a way to do that directly, but you can with Monitor Profiles. For example, if you setup these profiles:

  • All 4 enabled
  • 1 disabled, 2, 3, 4 enabled
  • 1 enabled, 2 disabled, 3, 4 enabled
  • 1, 2 enabled, 3 disabled, 4 enabled
  • 1, 2, 3 enabled, 4 disabled

That should cover the scenarios for each monitor being disabled. Then you can assign a key combination to each of those profiles and load whichever one you want disabled.
Jan 14, 2020  • #4
User Image
Alex Culea95236
5 discussion posts
Quote:
Right, there isn't currently a way to do that directly, but you can with Monitor Profiles. For example, if you setup these profiles:

  • All 4 enabled
  • 1 disabled, 2, 3, 4 enabled
  • 1 enabled, 2 disabled, 3, 4 enabled
  • 1, 2 enabled, 3 disabled, 4 enabled
  • 1, 2, 3 enabled, 4 disabled

That should cover the scenarios for each monitor being disabled. Then you can assign a key combination to each of those profiles and load whichever one you want disabled.


That works. It looks like a mess and I don't think I will remember all the shortcuts but I found a way to assign/bind keys to those shortcuts to use as a button. So..it's close to what I wanted, maybe I will find it more useful in the future, meanwile I will search for a script to do that. Oh, by the way, I have script in cmd that does just that and it worked in windows 8.1 prefectly but it creates a mess in win 10, maybe I will find a script in C# (CSharp).

So thank you, you've done a great job with this software, that's why I payed for it. I really hope you will change what we discussed but if I will find a script I will post it if it's ok.
• Attachment [protected]: Annotation 2020-01-15 003016.png [65,761 bytes]
Jan 14, 2020 (modified Jan 14, 2020)  • #5
Keith Lammers (BFS)'s profile on WallpaperFusion.com
No worries, thanks for the kind words! I've added a feature request to our list for adding DF scripting functions that can enable/disable monitors.

Thanks!
Jan 15, 2020  • #6
User Image
Alex Culea95236
5 discussion posts
Quote:
No worries, thanks for the kind words! I've added a feature request to our list for adding DF scripting functions that can enable/disable monitors.

Thanks!

Thank you so much have great day or night.
Jan 15, 2020  • #7
User Image
Alex Culea95236
5 discussion posts
Hi.
I am back after a year with a great, not just idea but a proof that is possible to TURN ON AND OFF MONITORS INDIVIDUALLY!!!.
I use a setup of 4 monitors. First you need to setup your profiles:
Monitor profile name Shortcut key (you need only for the 5 below)
"Philips" Ctrl+`
"1&2" Shift+Ctrl+2
"1&3" Shift+Ctrl+3
"1&4" Shift+Ctrl+4
"1,2&3"
"1,2&4"
"1,3&4"
"All Monitors" Shift+Alt+Ctrl+4

Now you need 3 files in path: %USERPROFILE%\AppData\Roaming\displayfusionscripts
Monitor1&2.txt, Monitor1&3.txt and Monitor1&4.txt

Why is that? Because you need to "tell" DisplayFusion when the monitor is on or off by writing it in a separate file.

Now the little problem is that even though The script can create the file, can't make it work to write data :(. It actually can but then the script doesn't work.

Strategy/idea:
Each combo of monitors are in the profile. DisplayFusion can't turn on and off monitors individually by just setting up a profile for each monitor or combo but with a strategy in mind you can.
DisplayFusion is like an open source file because of the possibility to add code to do whatever.
Creating a file to tell DF whether the monitor is on or of is necessary.
You can bind your shortcut keys to a separate programmable keyboard to use it as a one key switch.
I made like this (I use Redragon K585 for this):
F1 1st monitor is the main which I want it to be always on
F2 turns on or off monitor 2
F3 turns on or off monitor 3
F4 turns on or off monitor 4
The next button (doesn't have a name, it shows a globe): turns on all monitors, but only turns them on not off, because if I want to turn them off I press F1.

So, again what you need to do:
1. Setup profiles
2. create shortcut keys for the 8 profiles ("1","2","3","4","1,2&3","1,2&4","1,3&4" and "All Monitors")
3. copy files for 3 monitors (ignore the 1st monitor as the main)
To help you do that I wrote a code in CMD (file in attach. as Create files.bat)
4. Add the 4 scripts in DF from the attachment.

If for some reason you can't access the attachment, here is the script for monitor 1&2:

//Monitor 1&2
using System;
using System.Drawing;
using System.IO;

public static class DisplayFusionFunction
{
public static void Run()
{
//Read/Write file Variables, used to determine current monitor states
string appdata = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData); //Appdata Roaming folder
string folder = @"\displayfusionscripts\"; //scripts folder
string folderPath = appdata + folder;
string path = appdata + folder + "Monitor1&2.txt"; //full file path

//First time setup, create directory and data.txt in appdata
if(!File.Exists(path)){
createFile(folderPath, path);
}

//Read file
StreamReader sr = new StreamReader(path);
string data = sr.ReadLine();
sr.Close();

string a = "Philips";
string b = "1&2";
string c = "1&3";
string d = "1&4";
string e = "1,2&3";
string f = "1,2&4";
string g = "1,3&4";
string h = "All Monitors";

// With 1st and second monitor and if others are opened let them be.
if(data == "MonOff") {
if (BFS.DisplayFusion.GetCurrentMonitorProfile()==a)
BFS.DisplayFusion.LoadMonitorProfile(b);
if (BFS.DisplayFusion.GetCurrentMonitorProfile()==c)
BFS.DisplayFusion.LoadMonitorProfile(e);
if (BFS.DisplayFusion.GetCurrentMonitorProfile()==d)
BFS.DisplayFusion.LoadMonitorProfile(f);
if (BFS.DisplayFusion.GetCurrentMonitorProfile()==g)
BFS.DisplayFusion.LoadMonitorProfile(h);
writeToFile(path, "MonOn");
} else
// Without second monitor and if others are opened let them be.
if(data == "MonOn") {
if (BFS.DisplayFusion.GetCurrentMonitorProfile()==b)
BFS.DisplayFusion.LoadMonitorProfile(a);
if (BFS.DisplayFusion.GetCurrentMonitorProfile()==e)
BFS.DisplayFusion.LoadMonitorProfile(c);
if (BFS.DisplayFusion.GetCurrentMonitorProfile()==f)
BFS.DisplayFusion.LoadMonitorProfile(d);
if (BFS.DisplayFusion.GetCurrentMonitorProfile()==h)
BFS.DisplayFusion.LoadMonitorProfile(g);
writeToFile(path, "MonOff");}
}

//Creates directory and file if they don't exist
static void createFile(string folderPath, string path){
Directory.CreateDirectory(folderPath);
File.Create(path);
}


//Writes data to file
static void writeToFile(string path, string data) {
try{
StreamWriter sw = new StreamWriter(path);
sw.WriteLine(data);
sw.Close();
}
catch(Exception e){
Console.WriteLine(e.Message);
}
}
}
• Attachment: DisplayFusion.zip [5,655 bytes]
Sep 9, 2021 (modified Sep 11, 2021)  • #8
Subscribe to this discussion topic using RSS
Was this helpful?  Login to Vote(-)  Login to Vote(-)