I have a macro I've set up to get information from one screen (we'll call it App 01) and then activate a specific application (App 02) and paste this info into App 02's screen.
It all works perfectly except for the paste function at the end. It's as if KBM is unable to carry out the paste function once App 02 has been activated.
App 02 is a Java-based tool and I'm just wondering whether this is the problem in some way. I've modified my macro to copy the data from App 01 and paste the results to TextEdit and it works a treat every time. If I change this back to pasting the data to App 02, it just activates App 02, but doesn't paste the data. I have to do this manually.
Extending the pause hasn't corrected the issue and once focus is placed on CafeTran I just press Ctrl+V manually and it pastes the data, so I'm not sure how to modify the focus in the macro so that it just completes the function "press Ctrl+V".
As above, if I select TextEdit as the tool to receive the pasted data rather than CafeTran, this works "out of the box" so to speak. Switching this back to CafeTran (and making no other changes to the macro) results in it not completing the paste function.
A similar test macros worked fine with CafeTran for me even without a pause, so I'm afraid I'm not sure what could be wrong. Just out of curiosity, does it still fail to work as expected if you type some text into CT manually, switch to another app, and then run the macro?
Either way, it can't hurt to try KM's Assistance feature from the Help menu.
Typing text in manually and then running the macro doesn't seem to change things. It still fails to complete the "Cmd+V" paste function.
I've been typing Ctrl+V in my examples above, but I had my Windows hat on at the time. I'm actually using a MacBook Pro and so the paste function would be Cmd+V, not Ctrl+V.
What app are you moving from to return to CafeTran and how have you set up that part of your macro? Can you share a screenshot?
I don't have an Assistance feature in my Help menu for KBM. I'm running version 6.4.8, so perhaps that's the reason.
For what it's worth, here is my full macro. It uses the Epic browser to access a customer's in house tools for a project I'm working on for them. I can't say more than that due to an NDA I have with them.
The Assistance feature was added in KM 8, so no, it wouldn't be available in 6.4.8, I'm afraid.
My test macro is very simple. I tried running it from within a few different apps, and it acted as expected each time:
I took a look at your macro, and didn't see anything that would explain why the last step fails in CafeTran. It's also very strange that it fails even after you've made sure it accepts text input. As a last-ditch idea, is your version of CafeTran up to date? I just downloaded the latest version today, which appears to be "CafeTran Espresso 10.5 Croissant."
No, mine isn't the latest CT. I heavily use KBM with this app and have found on past occasions that when I upgrade, it wrecks most of my macros, so I have to spend a few hours sorting them out again. It's just not worth the overhead in time to me.
I'll just keep manually pasting. It's the easiest way to deal with the problem and I'll have another look when I eventually upgrade CT.
The simulated keystrokes use a different (newer) API in version 8 from the ones used in version 6 (I believe), so that is probably what the difference is (that or OS X version differences).
Unfortunately, it seems that the simulated keystrokes simply is not working for you in CT, I'm not sure there is anything that can be done without upgrading (which may or may not resolve the issue).
Actually, another possibility is that the Activate Application is never finishing, because the application never appears to come to the front because Java applications are no longer well supported.
Set the timeout on the Activate Application to show, and disable abort on timeout, and see if that helps.