Hello, I have some funcion in my displayfusion to open five programs at startup windows. Is there any possibility to add funcion to open it only on working days (monday to friday)? If is possible, could you please help me with that please? Thank you
I don't know what your current script looks like, but this will only run the programs during a weekday...
using System;
using System.Collections.Generic;
using System.Windows.Forms;
public static class DisplayFusionFunction
{
public static void Run(IntPtr windowHandle)
{
List<DayOfWeek> workdays = new List<DayOfWeek>() { DayOfWeek.Monday, DayOfWeek.Tuesday, DayOfWeek.Wednesday, DayOfWeek.Thursday, DayOfWeek.Friday };
if(workdays.Contains(DateTime.Now.DayOfWeek))
{
// Run some programs?
BFS.Application.Start("C:\\Windows\\notepad.exe", "");
}
}
}
Sorry for the formatting, but the forum software apparently hates code blocks.