fisofo Posted October 6, 2006 Share Posted October 6, 2006 Okay, so I have a dual monitor setup as well as a TV plugged into my S-video output. When i want to watch a movie, I previously had to go through the manual process of selecting the TV as my output. So I finally wrote the below script (WARNING: Extremely messy/bad code!) Problem is, every once in awhile, the specialized NVidia menu doesn't get focus and then the script craps out. I know this isn't the support forum, I've already posted on that side, I hoped someone on this end might have improvement ideas (besides, I AM posting a script ) The Script activates the TV, opens up PowerDVD and moves it to the TV. Run it with PowerDVD open and it puts everything back. Is there some way to do this directly with a dll and/or regedit? I've used regmon a bit and just can't seem to get a handle on anything useful... and dll's are just beyond me expandcollapse popupIf WinExists("PowerDVD") = 1 Then WinClose("PowerDVD") Run("rundll32.exe shell32.dll, Control_RunDLL desk.cpl") ;desktop properties WinWaitActive("Display Properties") Send("^+{TAB}") ;advanced tab Send("+{tab}+{tab}+{tab}+{tab}{space}") ;advanced settings WinWaitActive("SyncMaster 940T/940B/940Be,SyncMaster Magic CX914B(Digital) and NVIDIA GeForce 6600 GT Properties") Send("^+{TAB}") ;Nvidia settings sleep(5000) Send("{up}{up}{up}{up}{up}{up}{up}{up}{up}{up}{up}{down}{tab}{tab}{UP}{UP}{tab}{tab}{tab}{tab}{tab}{ENTER}") ;select monitor as output WinWaitActive("Display Properties") Send("{tab}{down}") Send("{down}{down}{down}{down}{down}{down}{down}{down}{down}{down}{down}{down}{down}{down}{down}{down}{down}{down}{down}{down}") Send("{left}{left}{left}{left}{left}{left}{left}{left}{left}{left}{left}{left}{left}{left}{left}{left}{left}{left}{left}{left}{left}{left}{left}{left}{left}{left}{left}{left}{left}{left}{left}{left}{left}{left}{left}") Send("{up}{up}{up}{up}{up}{up}{up}{up}{up}{up}{up}{up}{up}{up}{up}{up}") ;move monitor into proper place sleep(5000) Send("{ENTER}") MsgBox(0, "Script Completed", "The Script to end a Movie is complete, this message will disappear in 5 seconds", 5) Else Run("rundll32.exe shell32.dll, Control_RunDLL desk.cpl") WinWaitActive("Display Properties") Send("^+{TAB}") ;advanced tab Send("+{tab}+{tab}+{tab}+{tab}{space}") ;advanced settings WinWaitActive("SyncMaster 940T/940B/940Be,SyncMaster Magic CX914B(Digital) and NVIDIA GeForce 6600 GT Properties") Send("^+{TAB}") ;nvidia settings sleep(5000) Send("{up}{up}{up}{up}{up}{up}{up}{up}{up}{up}{up}{down}{tab}{tab}{DOWN}{DOWN}{tab}{tab}{tab}{tab}{tab}{ENTER}") ;select tv as output WinWaitActive("Display Properties") Send("{ENTER}") sleep(3000) Run("C:\Program Files\CyberLink\PowerDVD\PowerDVD.exe F:\", "", @SW_MAXIMIZE) ;run powerdvd WinWaitActive("PowerDVD") sleep(15000) Send("!z") ;move it to tv (ultramon script) Send("!{TAB}") ;move it to tv Send("!z") ;move child window to tv (ultramon script) Send("!{TAB}") ;move child window to tv MsgBox(0, "Script Completed", "The Script to start a Movie is complete, this message will disappear in 5 seconds", 5) EndIf Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now