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?

Confirm

Are you sure?

User Image
merloofy
10 discussion posts
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 :)
Jul 16, 2022  • #1
User Image
merloofy
10 discussion posts
bump :)
Jul 18, 2022  • #2
User Image
JLJTGR
104 discussion posts
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.
Jul 19, 2022 (modified Jul 19, 2022)  • #3
Subscribe to this discussion topic using RSS
Was this helpful?  Login to Vote(-)  Login to Vote(-)