@echo off
DisplaySwitch.exe /extend
start "" "C:\Program Files (x86)\Steam\Steam.exe" -bigpicture
tasklist /fi "imagename eq steam.exe" |find ":" > nul
if errorlevel 1 (
DisplaySwitch.exe /external
)
DisplaySwitch.exe changes my monior settings from second screen only to extended line 3 starts steam in big picture mode im not to familiar with line 4, basically it should list steam and generate an error level, 0 means the program is running, 1 means it is not. if statement, if the prgram isn't running change monitor settings back to second screen only.
I have a dual monitor setup, then a tv beside it that I use for steam big picture. (I dont have it enabled for instances other than big picture) I recently got a new keyboard that had programmable keys so I wanted to program a key to run big picture, switch monitors, and all that jazz. So when I press this button, I want my monitor settings to change to extended, (So my TV has a computer signal) than launch steam big picture, which I was able to achieve. The problem arose when I wanted to go back to normal monitor settings. I wanted to test to see if steam was running, if it isn't (me exiting steam big picture) I want it to go back to my default monitor settings. I made this code using a plethora of internet resources but I just can't seem to get the last part right. Any help would be greatly appreciated!