I have a macro that copies an area from a fixed window. This area will always contain either an "A" or a "Z". I have been running this macro for weeks without a problem, but now it is broken. The macro copies the "A" or "Z" into the clipboard. If the clipboard text is "Z", then an "If" command runs. Again, it's been fine until Monday.
I have checked to see if the text that is copying to the clipboard is actually a "Z" and that's what comes up. So, for some reason the macro is ending before the "if" command even if the clipboard contains the correct character. The window is a java app that emulates a DOS program, but all that has changed is the color and the position (which I have corrected).
I have copied the macro below.
Terry
Macro Playback Speed: Normal Speed
Delay 50 Milliseconds
// Next mouse move is to the F10 button
Mouse Move Screen 1395, 798
Mouse Left Button Click
Delay 50 Milliseconds
// Next mouse move is to Excel on the taskbar
Mouse Move Screen 400, 10
Mouse Left Button Click
Delay 50 Milliseconds
// Next mouse move is to the java app
Mouse Move Screen 1100, 10
Mouse Left Button Click
Delay 50 Milliseconds
Text Type: 9512
Delay 50 Milliseconds
Text Type: <ENTER>
Clipboard Empty
Delay 1 Seconds
// Next mouse move is to Where the "Z" shows up on the screen, positioned to the left of the "Z"
Mouse Move Screen 946, 414
Mouse Left Button Down
Delay 50 Milliseconds
// Next mouse move is to Where the "Z" shows up on the screen, positioned to the right of the "Z"
Mouse Move Screen 951, 421
Delay 50 Milliseconds
Mouse Left Button Up
Clipboard Copy
Delay 50 Milliseconds
If Clipboard Text Equals "Z"
Delay 50 Milliseconds
// Next mouse move is to Where the "app number" shows up on the screen, positioned to the left of the "app number"
Mouse Move Screen 948, 435
Delay 50 Milliseconds
Mouse Left Button Down
Delay 50 Milliseconds
// Next mouse move is to Where the "app number" shows up on the screen, positioned to the right of the "app number"
Mouse Move Screen 998, 442
Delay 50 Milliseconds
Mouse Left Button Up
Delay 50 Milliseconds
Delay 50 Milliseconds
Clipboard Copy
Delay 50 Milliseconds
// Next mouse move is to Excel on the taskbar
Mouse Move Screen 400, 10
Mouse Left Button Click
Delay 50 Milliseconds
// Next mouse move is to the java app
Mouse Move Screen 1100, 10
Mouse Left Button Click
Delay 50 Milliseconds
Text Type: 9245
Delay 50 Milliseconds
Text Type: <ENTER>
Delay 50 Milliseconds
Clipboard Paste
Text Type: <ENTER>
End If