• 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: AppleScript-Users Digest, Vol 11, Issue 379
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: AppleScript-Users Digest, Vol 11, Issue 379


  • Subject: Re: AppleScript-Users Digest, Vol 11, Issue 379
  • From: Stacy Proficy <email@hidden>
  • Date: Thu, 09 Oct 2014 13:01:03 -0500

Please get me off the list. Thanks. I tried myself and can not log into the account. I don't remember signing up for this and do not want to keep getting them.

Thank You.

On Wed, Oct 8, 2014 at 2:00 PM, <email@hidden> wrote:
Send AppleScript-Users mailing list submissions to
        email@hidden

To subscribe or unsubscribe via the World Wide Web, visit
        https://lists.apple.com/mailman/listinfo/applescript-users
or, via email, send a message with subject or body 'help' to
        email@hidden

You can reach the person managing the list at
        email@hidden

When replying, please edit your Subject line so it is more specific
than "Re: Contents of AppleScript-Users digest..."


Today's Topics:

   1. Re: Library Confusion (Jan Geerling)
   2. Re: Library confusion (David Gregg)
   3. Re: Library Confusion (Luther Fuller)


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

Message: 1
Date: Wed, 08 Oct 2014 19:40:59 +0200
From: Jan Geerling <email@hidden>
To: Luther Fuller <email@hidden>
Cc: Applescript Users <email@hidden>
Subject: Re: Library Confusion
Message-ID: <email@hidden">email@hidden>
Content-Type: text/plain; charset="utf-8"; Format="flowed";
        DelSp="yes"

Hi Luther,

This is how i do it - not with Finder but with System Events.
Still works good with Maverick :

tell application "System Events"
        set a to path of preferences folder
        set b to path of library folder
end tell

Greetings,

Jan



Op 8 okt 2014, om 18:51 heeft Luther Fuller het volgende geschreven:

> After eliminating everything not involved with this problem in
> Mavericks (10.9.5)
> I have arrived at this short script ...
>
> tell application "Finder"
>       set folderRef to get folder "Filesystems" of folder "Library" of
> folder "System" of startup disk
> end tell
> folderRef as alias --> alias "OSX_Mavericks:Library:Filesystems:"
> INCORRECT
> folderRef as text as alias --> alias
> "OSX_Mavericks:System:Library:Filesystems:"
>
> But is it a system problem or a problem with AppleScript's aliasing ?
> And should I bug-report this ?
>
>
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> AppleScript-Users mailing list      (applescript-
> email@hidden)
> Help/Unsubscribe/Update your Subscription:
> Archives: http://lists.apple.com/archives/applescript-users
>
> This email sent to email@hidden

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.apple.com/mailman/private/applescript-users/attachments/20141008/742bed05/attachment.html>

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

Message: 2
Date: Wed, 08 Oct 2014 12:39:31 -0600
From: David Gregg <email@hidden>
To: email@hidden
Subject: Re: Library confusion
Message-ID: <email@hidden">email@hidden>
Content-Type: text/plain; charset="utf-8"

Hi Luther,

There might be a bug but you can get around it by avoiding the Finder.

The path to most of the common important folders, as hinted by Jan, can be picked up through use of the Standard Additions dictionary (see below with highlights) so you can then use it outside of a tell block. In my case I usually set it up as a property but it can also be used in a set statement as well. Note that you can easily concatenate a string of the subfolders to that path if you keep it as a string.

e.g.
property folderRef: (path to library folder from system domain as string) & "Filesystems"

-- or

set folderRef to (path to library folder from system domain as string) & "Filesystems"
-> "Mavericks:System:Library:Filesystems"
set folderRef to alias folderRef -- if you actually need or prefer an alias
-> alias "Mavericks:System:Library:Filesystems"

Regards
David

Standard Additions dictionary

path to v : Return the full path to the specified folder
path to application support/‌applications folder/‌desktop/‌desktop pictures folder/‌documents folder/‌downloads folder/‌favorites folder/‌Folder Action scripts/‌fonts/‌help/‌home folder/‌internet plugins/‌keychain folder/‌library folder/‌modem scripts/‌movies folder/‌music folder/‌pictures folder/‌preferences/‌printer descriptions/‌public folder/‌scripting additions folder/‌scripts folder/‌services folder/‌shared documents/‌shared libraries/‌sites folder/‌startup disk/‌startup items/‌system folder/‌system preferences/‌temporary items/‌trash/‌users folder/‌utilities folder/‌workflows folder/‌voices/‌apple menu/‌control panels/‌control strip modules/‌extensions/‌launcher items folder/‌printer drivers/‌printmonitor/‌shutdown folder/‌speakable items/‌stationery : the folder to return
[from system domain/‌local domain/‌network domain/‌user domain/‌Classic domain] : where to look for the indicated folder
[as type class] : the type to return: alias or string (default is alias)
[folder creation boolean] : Create the folder if it doesn’t exist? (default is true)
→ alias : the path to the specified folder

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.apple.com/mailman/private/applescript-users/attachments/20141008/cf28a297/attachment.html>

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

Message: 3
Date: Wed, 08 Oct 2014 13:58:31 -0500
From: Luther Fuller <email@hidden>
To: Applescript Users <email@hidden>
Subject: Re: Library Confusion
Message-ID: <email@hidden">email@hidden>
Content-Type: text/plain; charset="utf-8"

The only valid work-around for this problem is to convert a reference to an alias via text,
as in ...

        folderRef as text as alias

This gives the correct result every time.

But, where is the bug ? Is it in the system or AppleScript ?

I'm thinking that it's in the system, because a reference to a folder contained in startupDisk:System:Library:
but not in startupDisk:Library: does not produce the erroneous result.

But, I could be wrong. Opinions welcomed.



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.apple.com/mailman/private/applescript-users/attachments/20141008/f54389bd/attachment.html>

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

_______________________________________________
AppleScript-Users mailing list
email@hidden
https://lists.apple.com/mailman/listinfo/applescript-users

End of AppleScript-Users Digest, Vol 11, Issue 379
**************************************************

 _______________________________________________
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

  • Prev by Date: Finder-Selection-Bug Work-Around
  • Next by Date: Scripting mail attachments in Yosemite
  • Previous by thread: Finder-Selection-Bug Work-Around
  • Next by thread: Scripting mail attachments in Yosemite
  • Index(es):
    • Date
    • Thread