Jump to content
Macro Express Forums

Problems In Java App


terrydiz

Recommended Posts

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

Link to comment
Share on other sites

Is it possible that the clipboard contains a space in front of or after the 'Z'? This would be difficult to determine and would cause your macro to fail. You could either read the clipboard into a variable and then trim off any spaces or you could do an If Clipboard Contains instead of If Clipboard Equals command.

 

Another idea. It looks like your macro was first created by 'Capturing' it. What happens if you recapture the macro?

 

One last idea: Have you updated the Java Runtime Engine (JRE)? Some versions work better than others with macro programs. You mentioned that the colors changed. Was this a result of updating the JRE or was it a result of the application being updated?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...