Haggisdog Posted November 25, 2012 Share Posted November 25, 2012 I'm a new AutoIt user and struggling with what is probably such a basic concept that I haven't been able to find any help on it. I would like to create a simple script that starts up the Windows 7 Screen Resolution dialog from Control Panel and extends my desktop to each of my three monitors. I've used Auto v3 Windows Info to capture the address (Address: Control Panel\Appearance and Personalization\Display\Screen Resolution) but I'm not sure how to call the dialog to the screen and then select the Extend Desktop option. PS. I'm doing this so I can switch from my EyeFinity group which used all 3 monitors for playing games back to Windows for controlling my extended desktop. Thanks for any help that can be provided. Link to comment Share on other sites More sharing options...
Danyfirex Posted November 25, 2012 Share Posted November 25, 2012 wellcome to Autoit Forum. Did you mean this: Run("rundll32.exe shell32.dll,Control_RunDLL desk.cpl") Regards Haggisdog 1 Danysys.com AutoIt... UDFs: VirusTotal API 2.0 UDF - libZPlay UDF - Apps: Guitar Tab Tester - VirusTotal Hash Checker Examples: Text-to-Speech ISpVoice Interface - Get installed applications - Enable/Disable Network connection PrintHookProc - WINTRUST - Mute Microphone Level - Get Connected NetWorks - Create NetWork Connection ShortCut Link to comment Share on other sites More sharing options...
Haggisdog Posted November 27, 2012 Author Share Posted November 27, 2012 Thanks for the reply on this, I have to confess I doubt I would have figured that command out :-) At least I can experiment with creating a script now! Link to comment Share on other sites More sharing options...
IanN1990 Posted November 27, 2012 Share Posted November 27, 2012 (edited) Also Haggisdog, u might want to look into this topicYou could easily take code their, twink and a few things and it changes res Also Danny, i do wonder ^^ Did the copy/Paste that from the other topic or did u know it ? Edited November 27, 2012 by IanN1990 Link to comment Share on other sites More sharing options...
Haggisdog Posted November 28, 2012 Author Share Posted November 28, 2012 (edited) Thanks for sharing the topic thread above. You're right that person was attempting something very similar (the only significant difference being that I am doing this for 3 monitors not 2). However, I have to confess the ControlSend function is completely foreign to me and I wasn't able to get that script to run.However, I think this is an incredibly straightforward script. I've mapped out the "tab" sequence but I'm having a problem with two things: The WinActivate doesn't seem to be activating the Screen Resolution window and the key sequences keep getting pasted back into my AutoIt script. It works OK if I have the Screen Resolution dialog already open but it's not waiting for the dialog to appear before continuing the key sequence.I'm not sure how to automate the dialog box that pops up after the screen resolution is changed that asks whether you want to "Keep" or "Revert" your changes.Run("rundll32.exe shell32.dll,Control_RunDLL desk.cpl") WinActivate("Screen Resolution","Control PanelAppearance and PersonalizationDisplayScreen Resolution") Send("{TAB 3}") SEND("{DOWN}") SEND("{TAB}") SEND("{UP}") SEND("{TAB}") SEND("{DOWN}") Send("{TAB 4}") Send("!A") Edited November 28, 2012 by Haggisdog Link to comment Share on other sites More sharing options...
KevinLanders Posted December 2, 2012 Share Posted December 2, 2012 I am in the same situation. I am trying to setup the following: Open Screen Display Settings Extend the display for two monitors. Move the 2nd monitor to the left of the 1st monitor. Make the 2nd monitor the primary monitor. Set both monitors resolution to the same setting (not sure what I want it at for the moment). Exit. Have you made any progress with extending your displays? I am just into the "search google, search forums, look over existing code to get a handle on how it all works" phase. Link to comment Share on other sites More sharing options...
KevinLanders Posted December 2, 2012 Share Posted December 2, 2012 I just confirmed I will need monitor 2 @ 1920x1080 and monitor 1 @ 1360x768. (Weird, I can't edit my posts yet.) Link to comment Share on other sites More sharing options...
IanN1990 Posted December 2, 2012 Share Posted December 2, 2012 (edited) You need at lest 5 posts to be able to edit If you check the link in Post 4. That should get you started For the second step of "moving" windows. You have 2 options i can think of. ClickandDrag or MouseDown MouseMove MouseUp. but these are not "control" fuctions. So u will need to make sure the window is visible, in the same space every time, with no windows blockin or ontop of it Edited December 2, 2012 by IanN1990 Link to comment Share on other sites More sharing options...
KevinLanders Posted December 3, 2012 Share Posted December 3, 2012 IanN1990 - Thanks for the clarification on posting. I must say, this is one of the most "on top of it" forums I have read in a while. IE, they have their crap together on how it will be ran. Curiosity - If the screens are set in the proper order, resolution, etc.... Is there not a way to export the registry settings or whatever settings file that is storing the current settings and then potentially pushing those settings back into place manually, rather than going through the process of automating the window and commands? Link to comment Share on other sites More sharing options...
IanN1990 Posted December 3, 2012 Share Posted December 3, 2012 Honestly i wouldn't know, i assume it is possible as everything is stored in registery and then u just need 2 update it but that can get very complex and u need to understand how to send windows message. My advice would be, try to automate first and that fails then go for the more complex ideas Link to comment Share on other sites More sharing options...
Haggisdog Posted December 5, 2012 Author Share Posted December 5, 2012 This is what I came up with. I append this to the end of a preset I have in the AMD Vision Engine Control Center that disables the monitoring extending after I finish playing WoW. Works like a charm now, Run("rundll32.exe shell32.dll,Control_RunDLL desk.cpl") Sleep(500) WinActivate("Screen Resolution","Control PanelAppearance and PersonalizationDisplayScreen Resolution") Send("{TAB 3}") SEND("{DOWN}") SEND("{TAB}") SEND("{UP}") SEND("{TAB}") SEND("{DOWN}") Send("!A") SEND("{TAB}") Sleep(500) Send("{ENTER}") Link to comment Share on other sites More sharing options...
ChrisBair Posted June 18, 2014 Share Posted June 18, 2014 I found this topic and eventually moved onto other stuff. Thought I would report back the resolution I found. You can use http://12noon.com/?page_id=80 to change resolution and arrangement via command lines which work nicely with AutoIT. 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