GetActiveWindow problems

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
User avatar
pgriffin
Automation Wizard
Posts: 460
Joined: Wed Apr 06, 2005 5:56 pm
Location: US and Europe

GetActiveWindow problems

Post by pgriffin » Wed May 11, 2005 9:18 pm

I have set a time-out on WaitWindowOpen and subsequently want to GetActiveWindow when the timeout occurs. I check the WW_RESULT system variable and it is correctly set to FALSE. Then on my GAW, (even though I have WF_TYPE=2 for visible only windows) the variable is storing "Shift + Esc to Stop", which is a system window of MacroScheduler and NOT visible.

???

SkunkWorks

mmorrison
Newbie
Posts: 13
Joined: Thu Apr 14, 2005 7:15 pm
Location: Arkansas

Post by mmorrison » Wed May 11, 2005 9:31 pm

Based on what you're saying, I created the following code:

------------------------------------
let>WW_TIMEOUT=3
LET>WF_TYPE=2
Press ctrl
send>c
release ctrl
WWO>TESTING
If>WW_RESULT=FALSE,NOWINDOW
SET>TESTING
Goto>Endit

LABEL>NOWINDOW
GAW>TITLE,X,Y
MSG>TITLE

LABEL>ENDIT
----------------------------

Of course, CTRL-C does not open any window, so it fails to NOWINDOW - and I get whatever active window exists... I do not get "Shift + Esc to Stop".

If this doesn't help you see where the problem is, post your code so we can look at it.

Good luck, ~Marvin~

User avatar
pgriffin
Automation Wizard
Posts: 460
Joined: Wed Apr 06, 2005 5:56 pm
Location: US and Europe

Post by pgriffin » Thu May 12, 2005 12:47 am

I think what I am experiencing is a function of the application I am trying to run. when I use a simple example, the GAW works fine with a wwo and ww_timeout.

I did have to restart MacroSched to get rid of the "Shift + Esc to Stop",....which was very strange.

Also, I am doing some work on a server of a client and on that server WW_TIMEOUT always evaluates to .....WW_TIMEOUT....literally. never a numeric value.

armsys
Automation Wizard
Posts: 1108
Joined: Wed Dec 04, 2002 10:28 am
Location: Hong Kong

Post by armsys » Thu May 12, 2005 3:24 am

Hi Skunworks,

Please make sure there are no invisible characters embedded in your script.

mmorrison
Newbie
Posts: 13
Joined: Thu Apr 14, 2005 7:15 pm
Location: Arkansas

Post by mmorrison » Thu May 12, 2005 5:01 pm

"WW_TIMEOUT always evaluates to .....WW_TIMEOUT....literally. never a numeric value."

Set this early in your macro: Let>VAREXPLICIT=1

Then set all variables with % % on each side, like this:
%WW_TIMEOUT%.

Again, post any code that doesn't seem to be working & I'll try to look it over... g/l ~Marvin~

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 » Thu May 12, 2005 9:16 pm

Hello SkunkWorks

Please submit the actual code sections that are producint these results. Do cut/past, do not do a retyping.
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!

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