Re: Shortcut to change Screen Resolution[Script attached]
- From: "Jon" <Email_Address@xxxxxxxxxxxxxxxxxxxx>
- Date: Mon, 8 May 2006 19:16:03 +0100
Attached script in case of word wrap
Jon
"Jon" <Email_Address@xxxxxxxxxxxxxxxxxxxx> wrote in message news:%23JEjksscGHA.3348@xxxxxxxxxxxxxxxxxxxxxxx
Hi Eustace
This toggle script makes use of an external program QRes.exe (freeware) to do the actual screen resolution changing. It needs to be placed in the same folder as the script, or alternatively, somewhere in your 'path' eg c:\windows.
You can currently download QRes.exe from here
http://www.snapfiles.com/get/qres.html
Change lines 2 & 3 of the script accordingly, to put in the resolutions, of your choosing - in the same format as the ones shown eg "800 x 600". I haven't tested it with the particular resolutions you suggested.
NB Be very careful which particular resolutions you choose, ie ones that your monitor / graphics card can definitely handle - otherwise you'll end up doing a safe mode system restore [or putting a link to a modified script in your startup folder to get things back to normal (as I did just now when experimenting :-) )]
Again watch out for wordwrap. Let me know if it works ok.
Jon
'***************************************************************
'Toggles resolutions between the following settings
res1= "800 x 600"
res2= "1024 x 768"
'Initialization
set WshShell = WScript.CreateObject("WScript.Shell")
'Process the resolutions
res1=trim(lcase(res1))
res2=trim(lcase(res2))
xres1=trim(left(res1,instrrev(res1,"x")-1))
yres1=trim(mid(res1,instrrev(res1,"x")+1))
xres2=trim(left(res2,instrrev(res2,"x")-1))
yres2=trim(mid(res2,instrrev(res2,"x")+1))
'Get current resolution
strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set colItems = objWMIService.ExecQuery _
("Select * From Win32_DisplayConfiguration")
For Each objItem in colItems
currentXRes = trim(objItem.PelsWidth)
currentYRes = trim(objItem.PelsHeight)
Next
'Decide which resolution to set
if (currentXRes = xres1) and (currentYRes = yres1) then
xres = xres2 : yres = yres2
else
xres = xres1 : yres = yres1
end if
'Run the command to set the resolution
runstring = "cmd /c " & chr(34) & "qres.exe /x:" & xres & " /y:" & yres & chr(34)
wshshell.run runstring,0
'**********************************************************************
"Eustace" <emf@xxxxxxxxxxxxxxxx> wrote in message news:uUcwwajcGHA.1856@xxxxxxxxxxxxxxxxxxxxxxxThanks, but it is not exactly what I need... First of all it does not have the 1280x800 resolution that I normally use (while it contains 640x480 that is not available), so I would have to restore it through the normal procedure. Also, its 800x600 resolution shows things much larger then when I apply it the normal way. Besides, though it saves a couple of clicks, a shortcut to toggle between the 2 specific resolutions would simplify things a lot...
On 2006.05.07 18:30 Andy W wrote:Try this little utility.
Link : http://www.dougknox.com/xp/utils/xp_quickres.htm
Hope that helps, it lets you change the screen res on the fly.
Andy W
"Eustace" wrote:
I would like to be able to toggle between Screen Resolution 1280x800 and 800x600 be clicking a shortcut. I suppose I need another VBScript Jon, right?
Attachment:
ToggleRes.vbs
Description: Binary data
- References:
- Shortcut to change Screen Resolution
- From: Eustace
- Re: Shortcut to change Screen Resolution
- From: Eustace
- Re: Shortcut to change Screen Resolution
- From: Jon
- Shortcut to change Screen Resolution
- Prev by Date: Re: Shortcut to change Screen Resolution
- Next by Date: Re: Registry Keys for Default and current wallpaper.
- Previous by thread: Re: Shortcut to change Screen Resolution
- Next by thread: Re: Shortcut to change Screen Resolution
- Index(es):
Relevant Pages
|
Loading