• 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
Script that "Tells" Finder just Focuses on Finder instead of running
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Script that "Tells" Finder just Focuses on Finder instead of running


  • Subject: Script that "Tells" Finder just Focuses on Finder instead of running
  • From: Alex Hall <email@hidden>
  • Date: Fri, 02 Jan 2015 14:30:58 -0500

Hi list,
A friend asked me to hack together a script that will copy the names of all the files in the current folder *and* any subfolders. I'm still in the beginning stages, making sure I have the right terms and such. Here's my script so far:

tell application "Finder"
set currentDir to (target of front window)
display dialog (currentDir as text) & " has " & ((currentDir's items) count) & " items."
repeat with f in currentDir's items
display dialog name of f & "< " & (size of f as text)
repeat with p in properties of f
display dialog p as text
end repeat
end repeat
end tell

The problem is that, once that first display dialog appears and I dismiss it, Finder pops up instead of the Script Editor, and no other display dialog runs. It's as though Finder is showing me that front window instead of executing the "repeat" statements, for some reason. The path and count the initial dialog shows are correct, so that's working. Why then is Finder appearing, and no dialogs displaying at all? Related: if something like this already exists, can someone let me know and save me the time? I don't mind doing it, but I'd rather not re-invent the wheel. Thanks!

--
Have a great day,
Alex Hall
email@hidden

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

  • Follow-Ups:
    • Re: Script that "Tells" Finder just Focuses on Finder instead of running
      • From: Luther Fuller <email@hidden>
    • Re: Script that "Tells" Finder just Focuses on Finder instead of running
      • From: Deivy Petrescu <email@hidden>
    • Re: Script that "Tells" Finder just Focuses on Finder instead of running
      • From: Stan Cleveland <email@hidden>
    • Re: Script that "Tells" Finder just Focuses on Finder instead of running
      • From: Luther Fuller <email@hidden>
  • Next by Date: Re: Script that "Tells" Finder just Focuses on Finder instead of running
  • Next by thread: Re: Script that "Tells" Finder just Focuses on Finder instead of running
  • Index(es):
    • Date
    • Thread