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
Specified window "Untitled" not present
Moderators: Dorian (MJT support), JRL
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
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".
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?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
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
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
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
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
Press ALT
send>N
Release ALT
You should do:
Press ALT
send>n
Release ALT
MJT Net Support
[email protected]
[email protected]