Jump to content

Opening many applications does not preserve order


Recommended Posts

Posted

I have a shortcut where I open the following applications:

 

- Google Chrome

- TextMate2

 

I do this because when I execute the script using a keyboard shortcut, I want Chrome in the background and TM2 in the foreground.

 

Sadly this doesn't always work: most of the times TM2 in fact is in the foreground, but sometimes, it is not. Is there a way to make sure the order is preserved?

 

Thank you.

Posted

I have a shortcut where I open the following applications:

 

- Google Chrome

- TextMate2

 

I do this because when I execute the script using a keyboard shortcut, I want Chrome in the background and TM2 in the foreground.

 

Sadly this doesn't always work: most of the times TM2 in fact is in the foreground, but sometimes, it is not. Is there a way to make sure the order is preserved?

 

Thank you.

 

Alfred will dispatch the calls to open the apps in order, so it may just be that TM2 is slower to launch and focusing itself after GC.

 

You could use a Run Script action set to osascript with something like this:

 

tell application "Google Chrome" to activate
delay 1
tell application "Safari" to activate

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...