I know that Java apps like my CafeTran behave differently on El Capitan. Nevertheless, I don't have any native alternative for this app.
The problem that I'm facing is: When I switch from CafeTran to Safari, Mail etc., I cannot trigger macros like the attached one. Instead, I have to click on Keyboard Maestro first and then on CafeTran.
tell application id "com.cafetran.CafeTran"
if not running then run
activate
end tell
tell application "System Events"
set frontmost of processes whose bundle identifier is "com.cafetran.CafeTran" to true
end tell
Do all of CafeTran’s windows that you work in have ‘CafeTran’ somewhere in the title?
If so you could use a window-name-based activator for the CafeTran group instead of just excluding applications.
CafeTran’s developer has named the internal executable ‘JavaAppLauncher’ for some reason.
I feel like he’s done something wrong somewhere, and that plus Apple’s changes to Java-based-apps in El Capitan are at the root of the problem.
When this AppleScript is compiled:
tell application "CafeTran"
# Stub
end tell
It transforms into this in Script Debugger:
tell application "Script Debugger"
# Stub
end tell
It takes on the name of the Script Editor it is compiled in (Script Debugger, Script Editor, or Smile), and that indicates something is quite wrong in Denmark…
When I execute your first script while CafeTran isn't running, it is started. However, when CafeTran is already running and I'm in Mail or Safari, the script doesn't activate (pop up) CafeTran.
The string 'CafeTran' is in the main app, not in dialogue boxes like Find and Replace or New Term. But it would already be a great help if I could reliably activate the main app. So, when you write:
If so you could use a window-name-based activator for the CafeTran group instead of just excluding applications.
Is this a command that I'll find in Keyboard Maestro's pick list right away?
I'll point CafeTran's developer to your posting and hope that he'll look into this/make the necessary modifications to the app.
Related to this: In CafeTran I can open a pane that shows the statistics of my translation project. I could position this pane on my second screen with:
CafeTran’s developer has named the internal executable ‘JavaAppLauncher’ for some reason.
On my MacBook Pro I’m running El Capitan. There I could address JavaAppLauncher. On my iMac I’m still using Yosemite, there I cannot find JavaAppLauncher in the list of recent apps nor in More…
So there’s no one solution that fits all, is there?