Processing Ajax...

Title
Close Dialog

Message

Confirm
Close Dialog

Confirm
Close Dialog

Close Epic Games Launcher

Description
This script will find the Epic Games Launcher window and close it.
Language
C#.net
Minimum Version
Created By
Nate41
Contributors
-
Date Created
Aug 20, 2021
Date Last Modified
Aug 20, 2021

Scripted Function (Macro) Code

using System;
using System.Drawing;
//Description
  //if your running a epic game under steam the will be useful
  //just add to a trigger when the game windows you have selected is destroyed.
  // this has a 10 sec internal delay for for triggering to sync cloud save before termination.
  // add longer delay if needed
public static class DisplayFusionFunction{

	public static void Run(IntPtr windowHandle){
	
        //Internal Deley
        BFS.General.ThreadWait (10000);
        
	//change this variable with your EpicGamesLauncher.exe path is not default or your on Windows x32
	string epicDirectory = @"C:\Program Files (x86)\Epic Games\Launcher\Portal\Binaries\Win64\EpicGamesLauncher.exe";
		
        //Gets EpicGamesLauncher.exe Prosses ID
        uint epicID = BFS.Application.GetAppIDByFile (epicDirectory);
        
	//Kills Epic Luncher
	if(BFS.Application.IsAppRunningByFile (epicDirectory))
		BFS.Application.Kill (epicID);
	}
}