Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate

Screen Resolution...


  • Please log in to reply
3 replies to this topic
Royce
  • Guests
  • Last active:
  • Joined: --
Is it possible to change the screen resolution with an AHK script and if so how? Thanks...

hawaiianAHKfreak
  • Guests
  • Last active:
  • Joined: --
Check out MultiRes...try searching the forum. A simple search on "resolution" would give you suffcient results. Here's one....Goodluck!

http://www.autohotke... ... t=multires

Laszlo
  • Moderators
  • 4713 posts
  • Last active: Mar 31 2012 03:17 AM
  • Joined: 14 Feb 2005
Here is simpler solution...
You can open up the Windows Display Properties/Settings dialog, move the slider (for the screen resolution) to its leftmost position (Home), then send as many Right arrow keys as necessary for your desired resolution (3 as an example below) and finally simulate a click on the OK button. For Windows XP
Run control desk.cpl`,`,3
WinActivate Display Properties
WinWaitActive Display Properties
ControlSend msctls_trackbar321, {Home}{Right 3}, Display Properties
ControlClick Button8, Display Properties  ; OK
If you want a more fancy solution, you can read the screen resolution to be set under the slider
ControlGetText Res, Static8, Display Properties
and compare it to the desired one. If it is not right, send another Right arrow in a loop. If there is no change in the displayed resolution, you cannot set your desired resolution, send an error message and Cancel with control-clicking on Button9.

By (control) clicking on Advanced, selecting Adapter, clicking on List All Modes a list pops up, where you can choose the refresh rate, too. ControlSend Home/End/Up/Down, as you like.

PhiLho
  • Moderators
  • 6850 posts
  • Last active: Jan 02 2012 10:09 PM
  • Joined: 27 Dec 2005
There is also shimanov's solution...
Posted Image vPhiLho := RegExReplace("Philippe Lhoste", "^(\w{3})\w*\s+\b(\w{3})\w*$", "$1$2")