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

Re: Safari Download Folder?


  • Subject: Re: Safari Download Folder?
  • From: Takaaki Naganoya <email@hidden>
  • Date: Sat, 7 Mar 2009 00:46:30 +0900

Oh, your Japanese spelling is perfect. It means "download" in Japanese (Katakana Characters).
Your perl script is very nice. But I'll introduce more simple one in my AppleScript Blog (AS hole).
Thank you.


On 2009/03/05, at 21:38, Mark J. Reed wrote:

On Thu, Mar 5, 2009 at 6:18 AM, Takaaki Naganoya <email@hidden > wrote:
It gave me wrong result in Japanese environment.

<AppleScript>
do shell script "defaults read com.apple.safari DownloadsPath"
</AppleScript>
--> "~/Documents/\\u30bf\\u3099\\u30a6\\u30f3\\u30ed\\u30fc\\u30c8\ \u3099"

That's not the wrong result, assuming the correct folder name is ダウンロード. It's just encoded using Java-style \u escapes.

Unfortunately, expanding those is not as simple as do shell script
echo.  This will do the trick:

do shell script "echo " & (quoted form of folderName) & " | perl -lne
's/\\\\u(.{4})/chr(hex($1))/ge; print glob($_); '"

--
Mark J. Reed <email@hidden>

-- Takaaki Naganoya Piyomaru Software http://piyo.piyocast.com email@hidden

PiyoCast Web (Podcasting with Music!)
http://www.piyocast.com
Free AppleScript Library "AS Hole"
http://www.piyocast.com/as/



_______________________________________________
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: Safari Download Folder? (From: Takaaki Naganoya <email@hidden>)
 >Re: Safari Download Folder? (From: "Mark J. Reed" <email@hidden>)

  • Prev by Date: Re: Looking for empty folders
  • Next by Date: Background App Questions
  • Previous by thread: Re: Safari Download Folder?
  • Next by thread: Re: Safari Download Folder?
  • Index(es):
    • Date
    • Thread