Window focus when launched from the command line

Support for our DiffMerge utility.

Moderator: SourceGear

Post Reply
jsh
Posts: 1
Joined: Fri Aug 31, 2007 4:12 pm

Window focus when launched from the command line

Post by jsh » Fri Aug 31, 2007 4:25 pm

Not sure if this is a DiffMerge issue....Most of the time I want to run DiffMerge from a command line (I use a Mac, so I'm launching /Applications/DiffMerge.app/Contents/MacOS/DiffMerge via an alias). However, when I do this DiffMerge does not get window focus, so I have to either click the window or Cmd-tab to it. Is there a way around this? Thanks.

Beth
Posts: 8550
Joined: Wed Jun 21, 2006 8:24 pm
Location: SourceGear
Contact:

Post by Beth » Tue Sep 04, 2007 1:17 pm

Are you using the 'open' command with that? If not, try that. It should keep focus on what you launched when you use that commend.

You could also try an AppleScript to bring it to the front.

For example:
  • /Applications/DiffMerge/Contents/MacOS/DiffMerge.app &
    /usr/bin/osascript
    tell application "DiffMerge"
    activate
    end tell

Post Reply