Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

I am wondering whether it is possible to use built-in services (menu bar options) of specific applications in Automator.

For instance, I want to create a service to launch Google Chrome and open a new window (the effect of Command+N when Chrome is active).

Is it possible?

share|improve this question
    
Using a service to start Chrome seems a bit strange. Can you elaborate a bit more on the problem you are trying to solve, maybe there are better solutions than creating an Automator workflow. –  patrix Jan 3 '13 at 10:15
    
Well, I don't think it's strange at all. The best thing about services is keyboard shortcuts. Beyond that, sometimes I need to keep a Chrome window open in full screen presentation mode and perform tasks in new windows. It's not cool to Command Tab to switch into a Chrome full screen window, Command N to launches a new full screen window, and Command Control F to exit full screen mode. –  ksh Jan 4 '13 at 0:12
add comment

1 Answer 1

up vote 0 down vote accepted

You can always use AppleScript for that. In Automator, drag Run AppleScript to the right pane, and for the script, enter the following:

tell application "Google Chrome"
    make new window
    activate
end tell

The activate is optional, but it'll bring Chrome to the front.

share|improve this answer
    
Cool, it works. Thank you very much! Guess I really need to spend some time on applescripts. I've always been lazy about that. –  ksh Jan 4 '13 at 0:14
    
Glad to help! AppleScript can be hard to learn since it's a little different to get things done if you know other programming languages, but it's fun after a while. Since you're new to Stack Exchange, did you know you can accept answers that worked for you? Just click the green checkmark next to their score :) –  slhck Jan 4 '13 at 9:33
    
I happened to check that just one second ago ;) –  ksh Jan 4 '13 at 9:34
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.