Welcome to MacForumz.com!
FAQFAQ   SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

move Finder to foreground

 
   Macintosh computer (Home) -> Apple Scripts RSS
Next:  WMV files to mp3  
Author Message
Tobias Weber

External


Since: Jul 29, 2003
Posts: 151



(Msg. 1) Posted: Wed Sep 22, 2004 8:25 am
Post subject: move Finder to foreground
Archived from groups: alt>comp>lang>applescript (more info?)

Hi,
an osascript I found mainly consists of

tell application "Finder" to set the (folder of the front window) to myP
ath

what line do I have to add to make that window the foremost?

--
Tobias Weber

 >> Stay informed about: move Finder to foreground 
Back to top
Login to vote
Patrick Stadelmann

External


Since: Nov 12, 2003
Posts: 358



(Msg. 2) Posted: Wed Sep 22, 2004 9:28 am
Post subject: Re: move Finder to foreground [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

In article <towb-78FA3D.14140522092004.RemoveThis@news.1und1.de>,
Tobias Weber <towb.RemoveThis@gmx.net> wrote:

 > what line do I have to add to make that window the foremost?

tell application "Finder"
set index of window of alias myPath to 1
end tell

Patrick
--
Patrick Stadelmann <Patrick.Stadelmann.RemoveThis@unine.ch><!-- ~MESSAGE_AFTER~ -->

 >> Stay informed about: move Finder to foreground 
Back to top
Login to vote
Tobias Weber

External


Since: Jul 29, 2003
Posts: 151



(Msg. 3) Posted: Wed Sep 22, 2004 9:28 am
Post subject: Re: move Finder to foreground [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

In article <Patrick.Stadelmann-F68E74.14265222092004 RemoveThis @individual.net>,
Patrick Stadelmann <Patrick.Stadelmann RemoveThis @unine.ch> wrote:

 > tell application "Finder"
 > set index of window of alias myPath to 1
 > end tell

Thanks for helping someone who can't code himself.

But it doesn't do anything...

As I said this is executed via /usr/bin/osascript inside a shell script
called from Terminal. I'd like the Finder window to come in front of
Terminal and get the focus.

--
Tobias Weber<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: move Finder to foreground 
Back to top
Login to vote
Patrick Stadelmann

External


Since: Nov 12, 2003
Posts: 358



(Msg. 4) Posted: Wed Sep 22, 2004 9:28 am
Post subject: Re: move Finder to foreground [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

In article <towb-07EB91.14422922092004.TakeThisOut@news.1und1.de>,
Tobias Weber <towb.TakeThisOut@gmx.net> wrote:

 > As I said this is executed via /usr/bin/osascript inside a shell script
 > called from Terminal. I'd like the Finder window to come in front of
 > Terminal and get the focus.

If you want both the window to become frontmost in the Finder, and the
Finder to become the frontmost application, use :

tell application "Finder"
set index of window of alias myPath to 1
activate
end tell

Of course, the window must already be open in the Finder.

Patrick
--
Patrick Stadelmann <Patrick.Stadelmann.TakeThisOut@unine.ch><!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: move Finder to foreground 
Back to top
Login to vote
Tobias Weber

External


Since: Jul 29, 2003
Posts: 151



(Msg. 5) Posted: Wed Sep 22, 2004 1:31 pm
Post subject: Re: move Finder to foreground [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

In article <Patrick.Stadelmann-BB64BA.15152722092004 RemoveThis @individual.net>,
Patrick Stadelmann <Patrick.Stadelmann RemoveThis @unine.ch> wrote:

 > If you want both the window to become frontmost in the Finder, and the
 > Finder to become the frontmost application, use :

Since the previous line of code (see original post) works on the
frontmost Finder windows anyway the only thing I need is "activate".
Which does the job. Thanks again.

--
Tobias Weber<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: move Finder to foreground 
Back to top
Login to vote
Display posts from previous:   
   Macintosh computer (Home) -> Apple Scripts All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]