• 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: reveal ?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: reveal ?


  • Subject: Re: reveal ?
  • From: Christopher Stone <email@hidden>
  • Date: Wed, 16 Jan 2019 06:51:46 -0600

On 01/15/2019, at 18:53, Stockly, Ed <email@hidden
<mailto:email@hidden>> wrote:
> I recall that if the folder window was already open then reveal would have no
> effect, and would not update to show a newly created or changed item, but, if
> the window was closed, reveal would open the window and work pretty
> flawlessly.


Hey Ed,

I seem to remember that but not recently.

> I also use finder's "update" command which you can send directly to the
> folder with the item.

Oh, yeah.  I totally forgot to mention that.

This works flawlessly for me on macOS Sierra 10.12.6, whether the folder is
open or closed – with many items in the folder or few.

----------------------------------------------------------------

set newFileName to "goofyNewFile.txt"

set destinationFolder to "~/Downloads/2018 and Before/2018/Consolidated Items
Folder/"
tell application "System Events" to set destinationFolder to POSIX path of disk
item destinationFolder
if destinationFolder does not end with "/" then set destinationFolder to
destinationFolder & "/"
set newFilePath to destinationFolder & newFileName

set shCMD to "touch " & quoted form of newFilePath & "
    sleep 0.25
"
do shell script shCMD

set newFileAlias to alias POSIX file newFilePath
set destinationFolder to alias POSIX file destinationFolder

tell application "Finder"
    activate
    update destinationFolder
    reveal newFileAlias
end tell

----------------------------------------------------------------

I seem to remember some instances where the file was selected but not scrolled
to in an open window, but I could be thinking of a different process.

--
Take Care,
Chris

 _______________________________________________
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: reveal ?
      • From: Jean-Christophe Helary <email@hidden>
References: 
 >reveal ? (From: Jean-Christophe Helary <email@hidden>)
 >Re: reveal ? (From: Christopher Stone <email@hidden>)
 >Re: reveal ? (From: "Stockly, Ed" <email@hidden>)

  • Prev by Date: Holding a Key Down or Releasing It
  • Next by Date: Re: reveal ?
  • Previous by thread: Re: reveal ?
  • Next by thread: Re: reveal ?
  • Index(es):
    • Date
    • Thread