Landshark Posted December 15, 2007 Share Posted December 15, 2007 I am trying to automate the loading of a graphics profile in my Nvidia control panel, specifically to select dual output mode (monitor + HDTV). The first part of the script works well up to the point where a dialogue box pops up to confirm my desire to load the selected profile. I cannot, however, get the script to select "Yes". In order to troubleshoot, I broke the script into two parts, getting to the box and selecting "Yes". When I manually get to the dialogue box, the "Select Yes" function that I have works. It does not work, however, if the box is arrived at through the efforts of my automation script. The box just goes away without executing the command. Here's the Code and a screenshot with AutoIt Window Info. NvidiaCtrPanel() Sleep(250) SelYes() Func NvidiaCtrPanel() ; works as advertised RUN("C:\Windows\System32\nvcplui.exe") Sleep(4000) Send("!p") sleep(500) Send("l") Sleep(500) Send("MonitorPlasma") ;name of profile I'm trying to load sleep(500) send("{Enter}") Sleep(1000) EndFunc Func SelYes() ; inop if run after NvidiaCtrPanel(). WinActivate("nvdisps") ControlClick("nvdisps", "&Yes", 6) EndFunc Also tried MouseMove() and MouseClick(), ControlCommand() and ControlSend() with no success. Thanks in advance for the help. Link to comment Share on other sites More sharing options...
Valuater Posted December 15, 2007 Share Posted December 15, 2007 You have ControlClick("nvdisps", "&Yes", 6) per help ControlClick ( "title", "text", controlID [, button [, clicks [, x [, y ]]]] ) the "&Yes" is the button text ( i am sure/guessing ) not actual text on that GUI also, be sure you have the control id "6" from Autoit Info Tool. its in the Autoit folder and in the Autoit start menu 8) Link to comment Share on other sites More sharing options...
Landshark Posted December 16, 2007 Author Share Posted December 16, 2007 (edited) One more troubleshooting item. When the script navigates to the "Yes" button and is then stopped, manual selection of the "Yes" button has the same effect as the second part of the script (closes the box but doesn't run anything). I think the problem is in the first function, not the second. Edited December 16, 2007 by Landshark Link to comment Share on other sites More sharing options...
Landshark Posted December 16, 2007 Author Share Posted December 16, 2007 problem solved. Issue was that the program was not accepting text inputs to change the display settings. Had to double click on the value instead. Here's my final code in case anyone runs into the same issue. RUN("C:\Windows\System32\nvcplui.exe") WinWait("NVIDIA Control Panel") Send("!p") Send("l") WinWait("Load Desktop Profile") ControlClick("Load Desktop Profile", "FolderView", 1, "left", 2, 67, 52) WinWaitActive("nvdisps") ControlClick("nvdisps", "&Yes", 6) WinWaitActive("Apply Changes") ControlClick("Apply Changes", "&Yes", 1) WinWaitActive("NVIDIA Control Panel") WinClose("NVIDIA Control Panel") Run("C:\Windows\ehome\ehshell.exe") 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