This is what I have so far:
Code: Select all
Input>NumTimes, Enter Numer of Runs:,50
Let>x=0
Repeat>x
SetFocus>Microsoft Word
Wait>1
Press Ctrl
Press Page Down
Release Ctrl
Wait>2
Press Shift
Press Page Down
Release Shift
Wait>1
Press Ctrl
Send>c
Release Ctrl
Wait>1
SetFocus>EasePublisher
Wait>0.5
SetFocus>Table of Contents editor
Wait>0.2
Press Down
Wait>1
Press Enter
Wait>1
Press F6
Let>WW_TIMEOUT=90
WaitWindowOpen>HTML Edit
SetFocus>HTML Edit
Wait>1
Press Del *150
Wait>1
Press Ctrl
Send>v
Release Ctrl
Wait>1.5
Press Tab
Press Enter
Wait>1.5
SetFocus>EasePublisher
Wait>1
Press Alt
Press F4
Release Alt
Wait>1
Press Enter
Wait>2
Let>x=x+1
Until>x=NumTimes
The first error is that it says that it can't find a window called Microsoft Word which is probably because the window is actually titled "name of file.doc - Microsoft Word" but as the file will constantly have a different name I've resorted to just using "Microsoft Word" and that does seem to work if it's run once.
If I add a second SetFocus>Microsoft Word right after the last Wait>2 command then I then get an 'error' which pops up in a separate window saying "Please Make A Selection".
So it seems that on the 2nd repeat the macro simply isn't finding the correct Microsoft Word window/file.
Is there a clever/better way of doing this, perhaps something like a Go to current open document in Microsoft Word instruction?