Re: getting the user's download folder
Re: getting the user's download folder
- Subject: Re: getting the user's download folder
- From: John Delacour <email@hidden>
- Date: Fri, 11 Apr 2003 11:25:08 +0100
- Mac-eudora-version: 6.0a14
At 5:36 pm +1000 11/4/03, Richard Morton wrote:
This works for me, with the dl folder on another disk, but returns
"Disk:Downloads" - i.e. no trailing colon.
The trailing colon is not given in the plist, so it needs to be
added. If you want to do this in the script then:
getDownloadFolder()
on getDownloadFolder()
read POSIX file (do shell script "perl -e '
$f = q~/tmp/tmp~; print $f ;
$_ = `defaults read com.apple.internetconfig`; s~\\s~~g ;
s~(.+adFo[^<]+<)(..)([^>]+)~$3~ ;
$vol = substr $_, 0, 2 * hex $2;
$start = qq~$vol\\63a~ ;
/(..)($start.+)/ and $s = (substr $2, 0, 2 * hex $1) ;
open F, qq~>$f~ ; print F (pack q~H*~, $s) . q~:~ ; '")
end getDownloadFolder
_______________________________________________
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.