Re: Shortcut to change Screen Resolution[Script attached]



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@xxxxxxxxxxxxxxxxxxxxxxx
Thanks, 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



Relevant Pages

  • Re: Help!
    ... script that makes a web site automatically adjust to different ... If you remember having heard something about a script for this purpose, ... was probably a script which detects the monitor resolution and redirects the ... user to a page supposedly designed for that resolution. ...
    (microsoft.public.frontpage.programming)
  • Re: Shortcut to change Screen Resolution
    ... This toggle script makes use of an external program QRes.exe to do the actual screen resolution changing. ... 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: ...
    (microsoft.public.windowsxp.general)
  • Re: Calculate time difference in mini-second with VBScript
    ... we wrote a script to monitor file server ... high resolution, but VBScript cannot directly get to them. ... COM objects that can access a higher resolution timer. ...
    (microsoft.public.scripting.vbscript)
  • Re: Automatic display resolution settings
    ... To boot to a specific screen resolution "Automatically" based on day and time would require some sort of booting software that would read the day and time information from the BIOS and then decide which configuration to boot. ... An alternative is to have the resolution set to the desired settings by way of a batch file or logon script. ...
    (microsoft.public.win2000.general)
  • Re: Latin translation
    ... These 8 lines appear to be the judgement and they are in Latin in a very difficult script. ... Your image is low resolution (150 dpi) making it very difficult to discern the script. ...
    (soc.genealogy.medieval)

Loading