STEAM GROUP
Big Picture bigpic
STEAM GROUP
Big Picture bigpic
445
IN-GAME
4,236
ONLINE
Founded
September 10, 2012
Archlion Feb 2, 2013 @ 9:49pm
Help scripting AutoHotKey for Big Picture.
I found this ahk code on here from someone and I tweaked it a little to make it work for me. I just need to add 1 more thing to it but I don't know how to. Here's the code so far

#IfWinNotExist, Steam ahk_class CUIEngineWin32
RunWait, "C:\Autohotkey\BigPicture\EnableSecondaryChangePrimary.vbs"
Process, Exist, Steam.exe
if ErrorLevel
Run, "steam://open/bigpicture"
WinWait, Steam ahk_class CUIEngineWin32
WinWaitClose, Steam ahk_class CUIEngineWin32
RunWait, "C:\Autohotkey\BigPicture\SwitchPrimaryDisableSecondary.vbs"

So far it's perfect. When I open this file, it switches to my 2nd monitor(TV) to primary and then launches Big Picture on that monitor. Then all I do is turn off my 1st monitor and move to the couch(2nd monitor). Then when I close steam picture from the couch, the ahk script automatically switches back to my 1st monitor and disables the 2nd monitor(TV) then I can just move back to my computer. Feel free to use this if you want, you will need ultramon though.

I want to add 1 more thing to it but I don't know how to. So before it launches EnableSecondaryChangePrimary.vbs which switches monitor 2 to primary, I want it to press the keys ctrl+alt+b. Then before the part where it launches SwitchPrimaryDisableSecondary.vbs which switches the TV back to my main monitor, I want it to press ctrl+alt+r.

Can anyone help me with this?
< >
Showing 1-4 of 4 comments
Roach Feb 6, 2013 @ 2:40pm 
i dont use that command for switching
C:\Windows\System32\Displayswitch.exe" /internal for main
C:\Windows\System32\Displayswitch.exe" /external for 2nd screen
this does the same thing if u were to press win+P
Archlion Feb 6, 2013 @ 6:36pm 
Originally posted by MonkeyRoach:
i dont use that command for switching
C:\Windows\System32\Displayswitch.exe" /internal for main
C:\Windows\System32\Displayswitch.exe" /external for 2nd screen
this does the same thing if u were to press win+P
I want it to press the keys ctrl+alt+b then ctrl+alt+r after because those are the keys that enable razer booster and revert so when it switches to the tv I want it to run razer booster which makes the pc a little bit faster because it deletes all programs in the background.
Coragar Jun 16, 2013 @ 3:39pm 
I have been using this script for a while however I have made a few updates to account for origin games and whenever a game closes and big picture doesn't regain focus.

#NoEnv
#Persistent
#SingleInstance force
#NoTrayIcon
SendMode Input

#IfWinNotExist, Steam ahk_class CUIEngineWin32
Joy8::
RunWait, "C:\Windows\System32\DisplaySwitch.exe" /clone
Process, Exist, Steam.exe
if ErrorLevel
Run, "steam://open/bigpicture"
WinWait, Steam ahk_class CUIEngineWin32

;======Old Method - Waits for BigPicture to close======
;WinWaitClose, Steam ahk_class CUIEngineWin32

;======Wait for BigPicture to close - While checking various items======
while winexist("Steam ahk_class CUIEngineWin32") {
sleep 1000
;==========Check for Origin Featured Today window==========
ifwinexist, Featured ahk_class QWidget
WinClose, Featured ahk_class QWidget
;==========Check for Origin base window==========
ifwinexist, Origin ahk_class QWidget
WinClose, Origin ahk_class QWidget
;==========Check if windows desktop has focus for more than 2 second==========
ifwinactive, Program Manager ahk_class Progman
{
sleep 2000
ifwinactive, Program Manager ahk_class Progman
{
WinActivate, Steam ahk_class CUIEngineWin32
}
}
;==========Check if windows taskbar has focus for more than 2 second==========
ifwinactive, ahk_class Shell_TrayWnd
{
sleep 2000
ifwinactive, ahk_class Shell_TrayWnd
{
WinActivate, Steam ahk_class CUIEngineWin32
}
}
}
RunWait, "C:\Windows\System32\DisplaySwitch.exe" /external
return
Archlion Jun 16, 2013 @ 5:32pm 
Originally posted by Cerothen:
I have been using this script for a while however I have made a few updates to account for origin games and whenever a game closes and big picture doesn't regain focus.

#NoEnv
#Persistent
#SingleInstance force
#NoTrayIcon
SendMode Input

#IfWinNotExist, Steam ahk_class CUIEngineWin32
Joy8::
RunWait, "C:\Windows\System32\DisplaySwitch.exe" /clone
Process, Exist, Steam.exe
if ErrorLevel
Run, "steam://open/bigpicture"
WinWait, Steam ahk_class CUIEngineWin32

;======Old Method - Waits for BigPicture to close======
;WinWaitClose, Steam ahk_class CUIEngineWin32

;======Wait for BigPicture to close - While checking various items======
while winexist("Steam ahk_class CUIEngineWin32") {
sleep 1000
;==========Check for Origin Featured Today window==========
ifwinexist, Featured ahk_class QWidget
WinClose, Featured ahk_class QWidget
;==========Check for Origin base window==========
ifwinexist, Origin ahk_class QWidget
WinClose, Origin ahk_class QWidget
;==========Check if windows desktop has focus for more than 2 second==========
ifwinactive, Program Manager ahk_class Progman
{
sleep 2000
ifwinactive, Program Manager ahk_class Progman
{
WinActivate, Steam ahk_class CUIEngineWin32
}
}
;==========Check if windows taskbar has focus for more than 2 second==========
ifwinactive, ahk_class Shell_TrayWnd
{
sleep 2000
ifwinactive, ahk_class Shell_TrayWnd
{
WinActivate, Steam ahk_class CUIEngineWin32
}
}
}
RunWait, "C:\Windows\System32\DisplaySwitch.exe" /external
return
What do you mean by steam doesn't regain focus? I added Mirror's Edge from Origin as non-steam game and when I launch it through big picture and exit the game, it goes back to Steam Big Picture fine. Maybe because Mirror's Edge isn't a DRM locked game and can be launched through ane .exe file. You seem like you're good at scripting. Do you think you can script mine? Instead of clicking the buttons ctrl + alt + b before and ctrl + alt + r when closing, it would be fine if it opens a closes a program at first and reopens it at the end. If you can do that that'd be really awesome!
< >
Showing 1-4 of 4 comments
Per page: 1530 50

Date Posted: Feb 2, 2013 @ 9:49pm
Posts: 4