HAZEHELL Posted November 28, 2008 Share Posted November 28, 2008 Hello World!I mean.... Hello Everyone. Since my first scrpit I was impressed by the versality of this software and decided to do a second, my first was a COD4MW autopatcher, so that all the patch updates (from 1.2-1.7) will install in one go.AutoIt left a great impression of how powerful and easy tool it is.That was my first script ever! and so much I liked the program that some other couple ideas started, like this one. I'm in the process of making a script to turn on/off the SLI , most games nowdays use it, but some others don't (like some old ones) so I thought it was a pain in the neck to be activating and deactivating every time (I usually disable it when not playing), and figured why not, lets make a script for it to make it easier to activate/deactivate.Now, lets get to the important part, the reason I'm here is because, as I said, Im a begginer in this scripting world, but I like the "trial and error method" a lot, and I have learned a lot on the go, right now I'm stuck after doing all I could, I came to a point where I couldn't find a why to work this out, due to my lack of knowledge ,and of course, experience.The first thing I was trying to do was to get the SLI to be enabled, before going deeper into to the conditionals, etc, right now this is what I got, so far it seems to be working up to the point where SLI is applied, then get teh box "Your desktop configuration has changed.Would you like to keep these changes?" thats where the problem starts, I could not get the mouseclick to work on the coordinates given on that window and could not get controlclick to click on the dreaded "button1". I would like to recieve some advise as of how to work with this one since the script doesn't seem to be recognizing the commands given in regards to this pop up window. I will leave my humble code in here and also the Summary of Autoit Window Info.AutoIt Version: 3.2.12.1 Author: HAZEHELL Script Function: Turns SLI on/off #ce ---------------------------------------------------------------------------- ; Script Start - Add your code below here Run ("nvcplui.exe") WinWaitActive("nvcplui.exe", "", 1) Opt("MouseCoordMode", "2") MouseClick("primary", 46, 104, 1) ControlClick("NVIDIA Control Panel", "", "Button2") ControlClick("NVIDIA Control Panel", "", "Button4") WinWaitActive("Applications Shutdown Required") ControlClick("Applications Shutdown Required", "", "Button1") WinWaitActive("Apply Changes") ControlClick("Apply Changes","","Button1")CODE>>>> Window <<<<Title: Apply ChangesClass: #32770Position: 554, 352Size: 414, 117Style: 0x94C800CCExStyle: 0x00010101Handle: 0x009E0100>>>> Control <<<<Class: ButtonInstance: 1ClassnameNN: Button1Advanced (Class): [CLASS:Button; INSTANCE:1]ID: 1Text: &YesPosition: 242, 57Size: 75, 23ControlClick Coords: 22, 13Style: 0x50010000ExStyle: 0x00000004Handle: 0x022004FC>>>> Mouse <<<<Position: 267, 95Cursor ID: 0Color: 0xD4D4D4>>>> StatusBar <<<<>>>> Visible Text <<<<Your desktop configuration has changed.Would you like to keep these changes?Reverting in 9 seconds&Yes&No>>>> Hidden Text <<<<I would like to avoid mouseclicks at all costs, if anyone has a suggestion to avoid the mouseclick used in my scprit would be really apreciated, because I could not get a controlclick, or a send to work on that "set SLI configuration" static option, I will leave also the summary of that one just in case.CODE>>>> Window <<<<Title: NVIDIA Control PanelClass: Afx:00400000:b:00010011:00000006:019E083FPosition: 233, 41Size: 685, 672Style: 0x14CF0000ExStyle: 0x00010100Handle: 0x000A0356>>>> Control <<<<Class: StaticInstance: 11ClassnameNN: Static11Advanced (Class): [CLASS:Static; INSTANCE:11]ID: 4100Text: Set SLI configurationPosition: 38, 104Size: 107, 16ControlClick Coords: 59, 9Style: 0x5000C18CExStyle: 0x00000000Handle: 0x0160043A>>>> Mouse <<<<Position: 101, 159Cursor ID: 0Color: 0x555555>>>> StatusBar <<<<>>>> Visible Text <<<<{3156EC84-29BD-4EAA-AE0A-817ED606FA99}:{DE0549BD-F34D-4748-AD94-0F2F22749F4F}Select the SLI configuration for your system:&Do not use SLI technologyEnable &SLI technology (recommended)Description:Typical usage scenarios:Restore DefaultsSelect a Task...Select a Task...Left ViewAdjust image settings with previewManage 3D settingsSet SLI configurationRun display optimization wizardMove CRT screen positionChange resolutionAdjust desktop color settingsRotate displayManage custom resolutionsSet up multiple displaysAdjust video color settingsAdjust video image settingsSystem Information<a id="LINK_TARGET">System Information</a>>>>> Hidden Text <<<< Simple View Pages Apply Bar&ApplyCancel Link to comment Share on other sites More sharing options...
Pain Posted November 28, 2008 Share Posted November 28, 2008 I hope you like this one, I can't tell if it will work or not, I only translated it to AutoIt.; Open the SLI Multi-GPU applet. Run('rundll32.exe C:\WINDOWS\system32\nvcpl.dll,LaunchMultiGpuApplet') ; On slower machines this Sleep value may need to be increased. Sleep(500) ; Send the keystrokes to change the mode. Send("!E"); alt + E Send("{ENTER}")Original code: http://forums.nvidia.com/lofiversion/index.php?t12566.html Link to comment Share on other sites More sharing options...
HAZEHELL Posted November 28, 2008 Author Share Posted November 28, 2008 Thank you Pain, that script works. BUT, I really don't know how was intended to work or I should say with what drivers, once applied you still need to use the mouse, this is just like a shortcut to get a window that enables or disables the SLI, different from the one in Nvidia Control Panel, and also requires restarting the computer, My Goal is to avoid that, so that with a simple doubleclick on the script, or a combination keystroke an automatically do the job for you, I guess I can try to work out a little with that one and might figure something out, but is not exactly what I', currently working on. 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