Mombu the Programming Forum sponsored links

Go Back   Mombu the Programming Forum > Programming > bring new created window to the front
User Name
Password
REGISTER NOW! Mark Forums Read

sponsored links


Reply
 
1 10th August 05:07
claus atzenbeck
External User
 
Posts: 1
Default bring new created window to the front



Hi,

I have the following script which opens a terminal window and jumps to the
folder which is selected in the Finder.

The only problem is that
tell application "Terminal" activate
brings all terminal windows to the front.

What do I have to do in order to have just the new created terminal window
brought to the front?

Thanks for any hint!
Claus

**********************************
(* source: <http://www.macosxhints.com/article.php?story=20020426093503563>
*)
on run
tell application "Finder"
try
activate
set frontWin to folder of front window as string
set frontWinPath to (get POSIX path of frontWin)
tell application "Terminal"
activate
do script with command "cd \"" & frontWinPath & "\""
end tell
on error error_message
beep
display dialog error_message buttons Â
{"OK"} default button 1
end try
end tell
end run
**********************************
  Reply With Quote


  sponsored links


Reply


Thread Tools
Display Modes




Copyright © 2006 SmartyDevil.com - Dies Mies Jeschet Boenedoesef Douvema Enitemaus -
666