ZenKensei Posted March 15, 2005 Share Posted March 15, 2005 Group, I have a question about the possibility (or syntax) of running a script in either minimized or hidden mode that uses the 'send' command. We're trying to standardize certain settings within our enterprise, such as default monitor power off, etc. The following script works, but I would like to make it run without the user seeing anything. I believe the use of the 'send' command as well as my trying to insure the correct window is active is what is causing me the problem, how to insure the window is active without it showing... Opt("WinWaitDelay",100) Opt("WinTitleMatchMode",4) Opt("WinDetectHiddenText",1) Opt("MouseCoordMode",0) Run('rundll32.exe shell32.dll,Control_RunDLL Powercfg.cpl',@SystemDir,@SW_HIDE) WinWait("Power Options Properties","Select the power sch") If Not WinActive("Power Options Properties","Select the power sch") Then WinActivate("Power Options Properties","Select the power sch") WinWaitActive("Power Options Properties","Select the power sch") Send("{TAB}{TAB}{TAB}{HOME}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{TAB}{TAB}{TAB}{TAB}{ENTER} ") Any suggestions would be most appreciated. Thanks, ZenKensei Link to comment Share on other sites More sharing options...
Andre Posted March 15, 2005 Share Posted March 15, 2005 Hi, When running in a Windows 2000 Environment u should consider the usage of Group Policies ! Andre What about Windows without using AutoIt ?It would be the same as driving a car without an steering Wheel! Link to comment Share on other sites More sharing options...
ZenKensei Posted March 15, 2005 Author Share Posted March 15, 2005 (edited) Andre, The enterprise it not fully migrated to AD as of yet, and in the past we have found that this particular setting (as well as some of the other power settings) do not always work as anticipated within the GPO's. I was planning on pushing the script out either SMS or during logon.... Thanks, ZK Edited March 15, 2005 by ZenKensei Link to comment Share on other sites More sharing options...
keeskas Posted March 15, 2005 Share Posted March 15, 2005 make a snapshot of a "wrong" system do the settings manually make a snapshot of the "fixed" system compare get the registry changes put them in the script run the script but i agree policies are the thing to use Link to comment Share on other sites More sharing options...
bshoenhair Posted March 15, 2005 Share Posted March 15, 2005 (edited) The send command is not the best way to handle this issue because it can be interupted by the user. I suggest using the ControlCommand ( "title", "text", controlID, "SelectString", 'string') to set the value in the combo box then ControlClick to apply the settings. Edited March 15, 2005 by bshoenhair 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