Start a new topic

CafeTran and Keyboard Maestro

Hello Igor,


Could you please read this thread and respond either here or in the Keyboard Maestro Discourse forum?


Many thanks!


Hans


Igor,


Could you please download Keyboard Maestro and test it with CafeTran on El Capitan?


I cannot get the result of string manipulations put back in the Target segment pane.


Hans

Peter refuses to support Java apps, I see no reason why Igor should support KBM. For two users at that.


H. The Nasty One

Yes. I know that you're not a fan of Keyboard Maestro. You'd probably want to solve these mini tasks via AppleScript. The problem is that CafeTran cannot be addressed properly via AS either (see Christopher's reply).


Off list he wrote me that I have interpreted Peter's remark about Java the wrong way:


>I believe this has nothing to do with Peter's willingness and everything to do with low-level changes Apple has made to the Java-app mechanism in OSX.


This could be explaining why macros that work in Yosemite don't work in El Capitan and vice versa.

Hans CafeTran Wiki: The problem is that CafeTran cannot be addressed properly via AS either


Chris' script just works:


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


If CT is already running, you can also use the latter part of the script to set CT frontmost:


tell application "System Events"

set frontmost of processes whose bundle identifier is "com.cafetran.CafeTran" to true

end tell


El Capi, Java 1.8


H.

I'm now on El Capitan. The behaviour of the AS is consistent:

  • It will start CafeTran when it's not active.
  • Once it's active, it will not be activated/made 'frontmost' when running the AS while another app is active.
I find it amazing that the second part of the script works on your computer. How do you trigger it?

Just updated my Java:


And this is how I activate the AS, via Keyboard Maestro:


This is what Igor wrote today:


>As for Keyboard Maestro, I think that it is rather a question to the KM developer who might be willing to tune it for Java applications, or at least give some public tips for Java developers on Mac OSX.


I must confess that I'm a little shy to ask Keyboard Maestro's developer for such tips. What would be a friendly and polite wording for such a request? Any help appreciated.


As Christopher Stone wrote: the handling of Java is different in El Capitan. In EC this macro works:


This could be a reason for my to upgrade my working horse from Yosemite to EC.


Question to Igor: Why is it that you let CafeTran identify itself as 'JavaAppLauncher' under EC? Can this be changed to 'Café Trans'?

Hans CafeTran Wiki: How do you trigger it?


Script Editor.


I'm a little shy to ask Keyboard Maestro's developer for such tips


Don't. He didn't even respond to your questions. I think he's not interested. Or worse.


H.

I got an answer from Chris, he sent me a new version of the script ... that works in Keyboard Maestro too. Now I'll have to upgrade my iMac to El Capitan first.


I'll keep you on the running about this.

So what does the new script look like?


H.

-------------------------------------------------------------------------------------------

set appBundleID to "com.cafetran.CafeTran"


try

tell application id appBundleID

if it is not running then

run

activate

end if

end tell

end try


tell application "System Events"

set frontmost of processes whose bundle identifier is appBundleID to true

end tell

-------------------------------------------------------------------------------------------


Yep. It also works. Both run and set frontmost.


H.

I'm happy to report that I'm up and running again. With the great help of Christopher, I was able to port my macros to El Capitan.


Great weekend,


Hans

Remarkable, with CafeTran 2016 Haflinger the Statistics pane can be positioned on the secondary monitor again!

Login to post a comment