Get Active Window - Size Problem

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

Post Reply
User avatar
Phil Pendlebury
Automation Wizard
Posts: 543
Joined: Tue Jan 16, 2007 9:00 am
Contact:

Get Active Window - Size Problem

Post by Phil Pendlebury » Thu Apr 09, 2009 11:03 pm

Greetings all.

I am doing a small script for a tutorial

This odd. The basics of the problem are:

Code: Select all

GetActiveWindow>window_title_not_required,zerox,zeroy,xres,yres

Wait>3

ScreenCapture>zerox,zeroy,xres,yres,%SCRIPT_DIR%\active.jpg
This should give me 3 seconds to activate a window and then take a shot of the active window.

It is part of a bigger script with a dialog etc. but this code above still causes the problem.

Which is:

It works but the whole active window is not captured. Some of the right hand side is cut off.

I have tried with different windows. Same result.

If you would like to see a shot of the actual window and what it should be I will post up.

Or have I made a mistake in my very simple code?
Phil Pendlebury - Linktree

User avatar
Phil Pendlebury
Automation Wizard
Posts: 543
Joined: Tue Jan 16, 2007 9:00 am
Contact:

Post by Phil Pendlebury » Thu Apr 09, 2009 11:05 pm

Yes I had. Doh!

Sorry I keep doing this.

Solved...

GetActiveWindow>window_title_not_required,zerox,zeroy,xres,yres
let>xres=xres+zerox
let>yres=yres+zeroy


I thought the xres yres were the coordinates. :-)
Phil Pendlebury - Linktree

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Fri Apr 10, 2009 11:02 am

:-)
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

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