Processing Ajax...

Title
Close Dialog

Message

Confirm
Close Dialog

Confirm
Close Dialog

Confirm
Close Dialog

User Image
Sorrylol
42 discussion posts
I was just wondering if it was possible to create a script that would open one file specifically (either .lnk or .exe) and then to open a completely different file approx 2 minutes after and then to minimize the second file either immediately or a few seconds after, and would it then to be possible to make this script into a windows shortcut that can then be activated by double clicking. If so, how might I go about doing this, appreciate all responses!
Nov 7, 2019 (modified Nov 7, 2019)  • #1
Keith Lammers (BFS)'s profile on WallpaperFusion.com
It should be possible! Are you wanting it to launch two programs? Or open two specific files?
Nov 8, 2019  • #2
User Image
Sorrylol
42 discussion posts
Hello! Thank you for your response. Wanting it to launch two programs, basically using Helios Display Management (a shortcut to it, that automatically brings me to surround mode), as the first program, which roughly takes about a minute or two. The second program that I would then want to open briefly and then minimize is a program called CareUEyes, a screen dimming program, because when I switch to surround mode it doesn't stay enabled unless I open it again.
Nov 8, 2019  • #3
Keith Lammers (BFS)'s profile on WallpaperFusion.com
Ok great! That should be possible with a Scripted Function. Could you tell me the command line commands you use for both of those apps?
Nov 8, 2019  • #4
User Image
Sorrylol
42 discussion posts
How would i go about finding those out by chance
Nov 8, 2019  • #5
Keith Lammers (BFS)'s profile on WallpaperFusion.com
If you've got a shortcut to it, right-click the shortcut and choose Properties, then copy what's in the "Target" box :)
Nov 11, 2019  • #6
User Image
Sorrylol
42 discussion posts
Yes I do, sorry for the late reply, here are the command lines for both programs:

Helios:
"C:\Program Files\Helios Display Management\HeliosDisplayManagement.exe" -a SwitchProfile -p "{bd033197-4549-4083-8b24-9452d7f5dfa3}"

CareUEyes:
"F:\Programs\Installations\Programs (Portable)\CareUEyes\CareUEyesPortable.exe"

Appreciate the help.
Nov 12, 2019  • #7
Keith Lammers (BFS)'s profile on WallpaperFusion.com
Ok, here you go. Try importing this scripted function. I don't have either of those apps running here, so couldn't test it, but it should hopefully work on your machine :)
• Attachment: Launch Helios and CareUEyes.dfscript [1,153 bytes]
Nov 13, 2019  • #8
User Image
Sorrylol
42 discussion posts
Thank you very much! it works really well, I was just wondering two more things by chance, is it possible to close/terminate an already running program with scripts as well? also what about maximizing (i.e. bringing up an already open program that's currently minimized in the taskbar). If so, what would the scripts for these look like as I'd really like to implement some of them.
Nov 13, 2019  • #9
Keith Lammers (BFS)'s profile on WallpaperFusion.com
You sure can! These are pretty easy. Close a window:

Code

// Get the window
IntPtr window = BFS.Window.GetWindowByText("*Notepad*");

// Close the window
BFS.Window.Close(window);


Focus a minimized window:

Code

// Get the window
IntPtr window = BFS.Window.GetWindowByText("*Notepad*");

// Focus the window
BFS.Window.Focus(window);
Nov 18, 2019  • #10
User Image
Sorrylol
42 discussion posts
Thank you! will be trying them out as soon as I get a chance.
Nov 19, 2019  • #11
Subscribe to this discussion topic using RSS
Was this helpful?  Login to Vote(-)  Login to Vote(-)