tonycst Posted November 23, 2013 Share Posted November 23, 2013 I want to change powerplan from what ever i have available to what ever else i have available when executing a game. I start games by a script, so is there a line that i could add to change powerplan ? Use of swichable graphics is dumb, because GPU gets switched but PCI link is not unless i change it manually or change to powerplan that has it OFF Thanks in advance. Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted November 23, 2013 Moderators Share Posted November 23, 2013 tonycst, I start games by a script, so is there a line that i could addWhat you do with AutoIt in the world outside is entirely your own affair, but given the prohibition in the Forum rules about discussing certain possible uses, mentioning in open forum that you want help with a script that you admit is used to launch games is not a particularly clever thing to do. However, as the aim of the question is to change the power plan rather then launch a game, I will leave the thread open. Point taken for the future, I hope. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
tonycst Posted November 23, 2013 Author Share Posted November 23, 2013 Weird. I run nearly every single program i have using either CMD or AUTOIT script. Functions are basic, save registry ad files associated with the software/game to specific location. If i format or reinstall windows, scripts would restore those registry/files and software/game works again without having to reinstall it. I dont see why that would be prohibited, but OK. Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted November 23, 2013 Moderators Share Posted November 23, 2013 tonycst,Whether you understand why the prohibition exists is entirely beside the point - the fact is that the Forum rules exist and we ask members to respect them. Thank you for the assurance that you will do so in future. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
tonycst Posted November 24, 2013 Author Share Posted November 24, 2013 (edited) yea. Anyway i found some stuff. I dont know why searching forum form here didnt show anything but searching google showed allot more useful topics. Here is what i came up with: Hopefully someone will find this usefull #include <Constants.au3> $GetCurrent = "Powercfg -getactivescheme" ;CMD command $SetHigh = "POWERCFG /SETACTIVE SCHEME_MIN" ;min= minimum aving $SetLow = "POWERCFG /SETACTIVE SCHEME_MAX" Global $DOS, $Message = '' ;; added "= ''" for show only. $DOS = Run(@ComSpec & " /c " & $GetCurrent, "", @SW_HIDE, $STDERR_CHILD + $STDOUT_CHILD) ;get your current power scheme ProcessWaitClose($DOS) $Message = StdoutRead($DOS) Run(@ComSpec & " /c " & $SetHigh, "", @SW_HIDE) ;Set max performance settings $OriginalSceme = StringTrimLeft ($Message,StringInStr ($Message,":")+1) ;working on string $OriginalScemeFinal = StringLeft ($OriginalSceme,StringInStr ($OriginalSceme,"(")-3) ;working on string $ReturToOriginal = "POWERCFG /SETACTIVE " & $OriginalScemeFinal ;final string for previously used power scheme ID RunWait ("Run what ever you want here") Run(@ComSpec & " /c " & $ReturToOriginal , "", @SW_HIDE) ;Return to previously set power settings Edited November 24, 2013 by tonycst 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