Specified window "Untitled" not present

Hints, tips and tricks for newbies

Moderators: Dorian (MJT support), JRL

Post Reply
Robbyn
Junior Coder
Posts: 43
Joined: Tue Feb 15, 2005 9:55 pm

Specified window "Untitled" not present

Post by Robbyn » Sat Dec 24, 2005 2:54 pm

Here is my script to automate the scanning of a document using finereader 8 pro. It does not work. Currently I can not get past the first waitwindowopen. It reports it is not present and yet that is the title of the screen and I have run a macro to report the title of the screen and it does start with untitle...

Are there any other obvious errors because in an earlier version I could not send the date. Another problem was that I could not run it in debug mode it would not step through. I had to keep running it in run mode, but could not tell where it was failing.


Run Program>D:\Program Files\ABBYY FineReader 8.0 Professional Edition\FineReader.exe
WaitWindowOpen>Untitle*
SetFocus>Untitled
Press ALT
send>PA
Release ALT
press down * 2
LClick
WaitWindowOpen>scan*
remark>WWc>scan*
WaitWindowOpen>save*
setfocus>save*
Press ALT
send>N
Release ALT
Day>the_day
Month>the_month
Year>the_year
Let>xdate=%the_year%-%the_month%-%the_day%
Send>xdate
ascii>32
WWc>save*
Press ALT
send>FXN
Release ALT

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

Post by Marcus Tettmar » Sat Dec 24, 2005 3:09 pm

The problem is not the WaitWindowOpen line. The problem is the SetFocus line:

SetFocus>Untitled

There is no window open whose title is exactly "Untitled".
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

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

Robbyn
Junior Coder
Posts: 43
Joined: Tue Feb 15, 2005 9:55 pm

Post by Robbyn » Sat Dec 24, 2005 4:28 pm

As a result of your comment I am now further down my program. After the scan window opens another one opens as well called save. In it there is a box that can be accessed manually by ALT N. In my program below it does not go to the name box and highlight the contents. When it failed to activate the name box I put into the program Let>WF_TYPE=3 on the assumption it might be treated as a daughter window. How can I do it differently so that it works?

Run Program>D:\Program Files\ABBYY FineReader 8.0 Professional Edition\FineReader.exe
WaitWindowOpen>Untitle*
SetFocus>Untitle*
SelectMenu>Untitle*,5,8,2
WaitWindowOpen>scan*
remark>WWc>scan*
WaitWindowOpen>save*
Let>SK_DELAY=40
Let>WF_TYPE=3
setfocus>save*
Press ALT
send>N
Release ALT
Day>the_day
Month>the_month
Year>the_year
Let>xdate=%the_year%-%the_month%-%the_day%
Send>xdate
ascii>32
WWc>save*
Press ALT
send>FXN
Release ALT
Robin

Robbyn
Junior Coder
Posts: 43
Joined: Tue Feb 15, 2005 9:55 pm

Post by Robbyn » Sat Dec 24, 2005 4:44 pm

I have noticed another problem. I am using the selectmenu command to move down the drop down menus. It seems to work at that point when debugging, but not when running it at full speed. It goes to the wrong item in the menu. The drop down menu has 2 faint dividing line, which the cursor does not stop at. I have counted them iin my numbers as if they were a line. Without counting the line it does not go to the correct entry in the debug mode.
Robin

User avatar
support
Automation Wizard
Posts: 1450
Joined: Sat Oct 19, 2002 4:38 pm
Location: London
Contact:

Post by support » Sun Dec 25, 2005 7:11 pm

Send the shortcut keys in lower case, not upper case. Upper case can be interpreted as having Shift key pressed. So instead of this:

Press ALT
send>N
Release ALT

You should do:

Press ALT
send>n
Release ALT
MJT Net Support
[email protected]

Robbyn
Junior Coder
Posts: 43
Joined: Tue Feb 15, 2005 9:55 pm

Post by Robbyn » Sun Dec 25, 2005 10:46 pm

Thank you that made a lot of difference. A few more altertions and it is now working. Thank you.
Robin

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