• 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: tell app, name in string var
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: tell app, name in string var


  • Subject: Re: tell app, name in string var
  • From: Jon Pugh <email@hidden>
  • Date: Fri, 27 May 2011 18:26:03 -0700

At 6:21 PM -0700 5/27/11, Jon Pugh wrote:
>defaults write com.apple.finder AppleShowAllFiles ON
>
>Wrapping it in a do shell script or pasting it into Terminal is left as ... you know.

Oh wait, I already had it done.

-- turn invisibles on and off in the Finder, requires restarting the Finder
tell application "Finder" to quit
set inOff to do shell script "defaults read com.apple.finder AppleShowAllFiles"
if inOff = "NO" or inOff = "OFF" then
	set onOffCmd to "ON"
else
	set onOffCmd to "OFF"
end if
set onOffCmd to "defaults write com.apple.finder AppleShowAllFiles " & onOffCmd
do shell script onOffCmd
delay 1
tell application "Finder" to launch

Jon
 _______________________________________________
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

References: 
 >Re: tell app, name in string var (From: Shane Stanley <email@hidden>)
 >Re: tell app, name in string var (From: Doug McNutt <email@hidden>)
 >Re: tell app, name in string var (From: Jon Pugh <email@hidden>)

  • Prev by Date: Re: tell app, name in string var
  • Next by Date: Re: tell app, name in string var
  • Previous by thread: Re: tell app, name in string var
  • Next by thread: Re: tell app, name in string var
  • Index(es):
    • Date
    • Thread