Re: AppleScript-Users Digest, Vol 17, Issue 40
Re: AppleScript-Users Digest, Vol 17, Issue 40
- Subject: Re: AppleScript-Users Digest, Vol 17, Issue 40
- From: Kellen Ruyle via AppleScript-Users <email@hidden>
- Date: Mon, 20 Apr 2020 11:14:29 -0500
Thanks Christian and Jon!
Both scripts work beautifully. I’m fairly new to AppleScripting and learning
to code in conjunction to this for school. This mailing list had been a great
asset to learn from.
If anyone has suggestions for great sources to learn AppleScript from, it would
much appreciated.
Thanks again for all your help,
Kind regards,
Kel
Sent from my iPhone
> On Apr 19, 2020, at 3:21 AM, 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: reiterating over a playlist (Jon Pugh)
> 2. Re: reiterating over a playlist (Christian Boyce)
> 3. Somehow calling Finder? (=?utf-8?Q?jgarr16-sl=40yahoo.com?=)
> 4. Re: Somehow calling Finder? (Yvan KOENIG)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Sat, 18 Apr 2020 18:02:43 -0700
> From: Jon Pugh <email@hidden>
> To: ?iKel <email@hidden>
> Cc: Applescript-users list <email@hidden>
> Subject: Re: reiterating over a playlist
> Message-ID: <email@hidden>
> Content-Type: text/plain; charset="utf-8"
>
>> On Apr 18, 2020, at 2:40 PM, ?iKel via AppleScript-Users
>> <email@hidden> wrote:
>>
>> song by artist
>
> tell application "iTunes"
> tell playlist "The Hits"
> set trackItems to {name, artist} of every track
> end tell
> end tell
> set itemCount to number of items in item 1 of trackItems
> set outputString to {}
> repeat with i from 1 to itemCount
> set itemSong to item i of item 1 of trackItems
> set itemArtist to item i of item 2 of trackItems
> set itemLine to itemSong & " by " & itemArtist
> copy itemLine to end of outputString
> end repeat
> set text item delimiters to return
> outputString as string
>
>
> Jon
>
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL:
> <https://lists.apple.com/mailman/private/applescript-users/attachments/20200418/ecc586ef/attachment.htm>
>
> ------------------------------
>
> Message: 2
> Date: Sat, 18 Apr 2020 19:25:05 -0700
> From: Christian Boyce <email@hidden>
> To: ?iKel <email@hidden>, Jon Pugh via AppleScript-Users
> <email@hidden>
> Subject: Re: reiterating over a playlist
> Message-ID: <email@hidden>
> Content-Type: text/plain; charset="utf-8"
>
> Try this:
>
> set SongItems to ""
>
> tell application "Music"
> set thePlaylist to playlist ?Today at Apple"
> set theTracks to every track of thePlaylist
> repeat with aTrack in theTracks
> set theArtist to artist of aTrack
> set theTrackName to name of aTrack
> set SongItems to SongItems & return & theTrackName & " by " & theArtist
> end repeat
> end tell
>
> tell application "TextEdit"
> activate
> make new document with properties {name:"Today at Apple"}
> set text of document 1 to SongItems
> end tell
>
>
>> On Apr 18, 2020, at 2:40 PM, ?iKel via AppleScript-Users
>> <email@hidden> wrote:
>>
>> Hello!
>> I am trying to iterate over a playlist and this is what I have thus far. I
>> cannot seem to get it down. Maybe this is
>> not the best way to do it but what I am trying to do is to a iterate over a
>> playlist and get both the artist and song
>> separated by the word ?by?.
>
> ?
>
> Socially distantly yours,
>
> ? <https://christianboyce.com/>?
>
> Check out our latest blog posts!
> ?? Top 10 things to do to maximize your Mac?s performance
> <https://christianboyce.com/7-things-to-do-when-setting-up-a-new-mac/>
> ? Mac Mastery Series: Save Time and Effort with Smart Folders
> <https://christianboyce.com/save-time-effort-smart-folders-saved-search/>
> ? Mac Mastery Series: Save Time and Make Things Easier by Customizing the
> Finder?s Toolbar <https://christianboyce.com/customize-toolbar-finder-mac/>
> ? Mac Mastery Series: New Folder with Selection
> <https://christianboyce.com/new-folder-with-selection/>
> ? Mac Mastery Series: Rename Multiple Items at Once
> <https://christianboyce.com/finder-rename-multiple-items/>
>
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL:
> <https://lists.apple.com/mailman/private/applescript-users/attachments/20200418/cd5e669b/attachment.htm>
>
> ------------------------------
>
> Message: 3
> Date: Sun, 19 Apr 2020 00:10:52 -0700
> From: "=?utf-8?Q?jgarr16-sl=40yahoo.com?=" <email@hidden>
> To: email@hidden
> Subject: Somehow calling Finder?
> Message-ID: <email@hidden>
> Content-Type: text/plain; charset="utf-8"
>
> Hi - I?ve got an AppleScript that I use to either open or close an image
> using the Preview application when I press a keyboard shortcut (using
> Alfred). For some reason, when it takes the ?open? path, the Finder
> application flashes instantaneously just before the image is displayed.?
>
> set appName to "Preview"
>
> if application appName is running then
>
> tell application appName
> quit ?Users:public:repos:applescript:applescript_keyboard.png"
> end tell
>
> else
>
> tell application appName
> open ?Users:public:repos:applescript:applescript_keyboard.png"
> end tell
>
> end if
>
>
> Is there a way to call it without flashing Finder??
>
> Thanks,
> John
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL:
> <https://lists.apple.com/mailman/private/applescript-users/attachments/20200419/e1117ef0/attachment.htm>
>
> ------------------------------
>
> Message: 4
> Date: Sun, 19 Apr 2020 10:20:03 +0200
> From: Yvan KOENIG <email@hidden>
> To: liste AppleScript US <email@hidden>
> Subject: Re: Somehow calling Finder?
> Message-ID: <email@hidden>
> Content-Type: text/plain; charset="utf-8"
>
> Try:
>
> set appName to "Preview"
> set target to "Users:public:repos:applescript:applescript_keyboard.png" as
> ?class furl?
>
> if application appName is running then
>
> tell application appName
> quit --target
> end tell
>
> else
>
> tell application appName
> open target
> end tell
>
> end if
>
>
> Is it normal that this morning, at least two messages contain double quotes
> replaced by curly ones?
>
> Yvan KOENIG running High Sierra 10.13.6 in French (VALLAURIS, France)
> dimanche 19 avril 2020 10:19:54
>
>
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL:
> <https://lists.apple.com/mailman/private/applescript-users/attachments/20200419/90b8492a/attachment.htm>
>
> ------------------------------
>
> Subject: Digest Footer
>
> _______________________________________________
> AppleScript-Users mailing list
> email@hidden
> https://lists.apple.com/mailman/listinfo/applescript-users
>
>
> ------------------------------
>
> End of AppleScript-Users Digest, Vol 17, Issue 40
> *************************************************
_______________________________________________
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