
The script does not work all the time
Quote:
> I want to use this script to reduce the screen resolution:
> ' VB Script Document
> Dim WshShell
> Set WshShell = WScript.CreateObject("WScript.Shell")
> WScript.Sleep 500
> WshShell.run "RUNDLL32.EXE shell32.dll,Control_RunDLL desk.cpl,,3",3,false
> WScript.Sleep 500
> WshShell.SendKeys "{tab}" 'here the problem starts (snip)
Hi
SendKeys solutions are very unreliable...
I suggest you use a command line utility to change the resolution instead:
MultiRes is free screen resolutions utility that can be used from the command
line, a batch file, a shortcut or a script :-)
MultiRes has refresh rate and multi- monitor support, as well as optional timed
confirmation prompts. The little utility supports Windows 9x/Me/NT4, as well as
Windows 2000 and XP.
It's available at http://www.entechtaiwan.com/multires.htm and can be used to
set screen resolution, color depth, and refresh rate. Normally it runs with an
icon in the notification area. But it's also possible to run it in non-resident
command mode in a batch file.
Example on a command line:
Set 800x600, 32-bit color, 85Hz refresh
d:\multires\multires.exe /800,600,32,85 /exit
Some other products (command line):
A freeware utility called Resolution Changer:
http://www.myitforum.com/inc/upload/1365Vidchng.zip
Here's the description:
"Video Resolution Changer v1.0 - Tony Pombo. This command-line utility changes
the display resolution of the current display device, using several command-line
options. vidchng /? for help."
Here is a third product:
Vidres
http://www.jddesign.freeserve.co.uk/vidres.htm
--
torgeir
Microsoft MVP Scripting and WMI, Porsgrunn Norway
Administration scripting examples and a ONLINE version of the 1328 page
Scripting Guide: http://www.microsoft.com/technet/scriptcenter