screen display

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

Post Reply
Tobias
Junior Coder
Posts: 22
Joined: Mon Jul 19, 2004 1:44 pm
Location: The Netherlands

screen display

Post by Tobias » Mon Jul 19, 2004 2:26 pm

Hi,

I am looking for a way to detect the actual screen resolution. I probably need to use VBScript, as Macro Scheduler does not offer such functionality. Unfortunately my programming skills do not go that far. Could anyone help me?

To make it more complex (or perhaps more challenging), I would like to be able to use two monitors (dual screen). So I also need to be able to detect number of used monitors and their relative position.

thanks,
Tobias

User avatar
Bob Hansen
Automation Wizard
Posts: 2475
Joined: Tue Sep 24, 2002 3:47 am
Location: Salem, New Hampshire, US
Contact:

Post by Bob Hansen » Mon Jul 19, 2004 3:17 pm

If not going to use VB script, you will need to call other utilities to help with this.

This one may be helpful (maybe not):
http://www.12noon.com/reschange.htm It is a command based utility to help modify screen resolutions. Will probably not help to solve issue with multiple monitors.
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!

Tobias
Junior Coder
Posts: 22
Joined: Mon Jul 19, 2004 1:44 pm
Location: The Netherlands

Post by Tobias » Wed Jul 21, 2004 6:32 am

thanks for the suggestion, Bob. However, Reschange seems (the site is down at the moment) to change rather than detect the screen resolution. I do not want to change the resolution, just detect it.

Lumumba

Post by Lumumba » Wed Jul 21, 2004 10:07 am

SetFocus>Program Manager
GetActiveWindow>window_title,X,Y,Width,Height
MessageModal>%Width%x%Height%

Tobias
Junior Coder
Posts: 22
Joined: Mon Jul 19, 2004 1:44 pm
Location: The Netherlands

Post by Tobias » Wed Jul 21, 2004 10:21 am

Lumumba,

I had tried your suggestion with notepad (I don't seem to have a Program Manager running on my XP PC), with a "windowAction>1,Notepad" to maximize notepad.
Although not a very smooth sloution, it would allow me to detect used screen resolution of one monitor. I would not know which one, nor their relative position.

Lumumba

Post by Lumumba » Wed Jul 21, 2004 11:51 am

Program Manager is the Standard Window name of the Windows Desktop.
The Desktop is using the maximum scale, always.
Run that script. Click onto the desktop (within 10 sec) and wait for the result.

Wait>10
GetActiveWindow>window_title,X,Y,Width,Height
MessageModal>%window_title%%CRLF%,%X%x%Y%%CRLF%%Width%x%Height%

The more advanced option is to read the screen resolution from the registry !

I'm sure your topic has been requested already. Please check/search the forum.

Tobias
Junior Coder
Posts: 22
Joined: Mon Jul 19, 2004 1:44 pm
Location: The Netherlands

Post by Tobias » Wed Jul 21, 2004 12:21 pm

Lumumba,

Thanks! Excellent tip!
I did not even consider using the desktop.

thanks again.

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts