Technical support and scripting issues
Moderators: Dorian (MJT support), JRL
-
buckw1
- Junior Coder
- Posts: 20
- Joined: Sun Sep 18, 2005 5:08 am
Post
by buckw1 » Tue Jan 24, 2006 5:04 am
Any easy way to chek the system screen size and change if needed?
For examble. if resolution is currently 1024-768 I would need it changed up to 1280x1024
Example code or link to same would be very helpful.
Buck
-
support
- Automation Wizard
- Posts: 1450
- Joined: Sat Oct 19, 2002 4:38 pm
- Location: London
-
Contact:
Post
by support » Tue Jan 24, 2006 8:20 am
There are a number of ways to check the screen res and you will find some if you search the forums. However the Image Recognition library has a function which returns screen size so is probably simplest. You can download it at
http://www.mjtnet.com/image_recognition.htm
-
buckw1
- Junior Coder
- Posts: 20
- Joined: Sun Sep 18, 2005 5:08 am
Post
by buckw1 » Fri Jan 27, 2006 7:00 am
I searched quite a bit and found several references to win32 API's of which I know nothing about and trying to wade thru the Microsoft site was a pain. Your suggestion gave me a call name to actually search for and I'm now happily on my way.
Thank you.
-
pgriffin
- Automation Wizard
- Posts: 460
- Joined: Wed Apr 06, 2005 5:56 pm
- Location: US and Europe
Post
by pgriffin » Fri Jan 27, 2006 2:34 pm
just move your mouse to x,y coordinates that are huge, then get the position of the cursor. Works every time.
MouseMove>4000,4000
GetCursorPos>maxX,maxY
mdl>%maxX% x %maxY%
this code returns 1279 x 1023 for a 1280 x 1024 resolution. You get the idea.