• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Finder window help...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Finder window help...


  • Subject: Re: Finder window help...
  • From: Mr Tea <email@hidden>
  • Date: Sat, 04 Jan 2003 18:51:30 +0000

This from Domains4Days.com - dated 04-01-03 05.10 pm:

> while I'm at it: I have two more quick questions...
>
> 1 - is there a way to set - whatever the topmost window happens to be (
> Rather than a specific one) - like:
>
> set theFolder to [[[ the fontmost? / topmost? window ]]]
>

set theFolder to target of Finder window 1 as alias


> OLD
> open file "main:goodstuff:test1.fp5"
>
> Or new?
>
> set theFolder to "main:goodstuff:test1.fp5"
> open file theFolder
>
>
> * My problem is: when folders and files are moved around - the script
> fails.

set theFolder to alias "main:goodstuff:test1.fp5"

...will keep track of it. Try saving and closing the script, moving or
renaming the item (but not to a different volume) and reopening the script.
It should reflect the changes.
>
> Question: is there some "try" routine - that if it doesn't find the file or
> folder - that a dialog window can have the user to find the location and
> have that permanently stored back in the AppleScript? If so, what would
> that look like? ( I'm not very good AppleScript as you can see - So any
> actual code would help greatly.)

tell application "Finder"
activate
try
open theFolder
on error
set theFolder to choose folder with prompt "Pick a folder..."
end try
--do stuff with theFolder
end tell


HTH


Mr Tea
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

References: 
 >Re: Finder window help... (From: "Domains4Days.com" <email@hidden>)

  • Prev by Date: Re: Finder window help...
  • Next by Date: Re: Finder window help...
  • Previous by thread: Re: Finder window help...
  • Next by thread: Re: Finder window help...
  • Index(es):
    • Date
    • Thread