Re: AppleScript-Users Digest, Vol 17, Issue 24
Re: AppleScript-Users Digest, Vol 17, Issue 24
- Subject: Re: AppleScript-Users Digest, Vol 17, Issue 24
- From: Kellen Ruyle via AppleScript-Users <email@hidden>
- Date: Tue, 10 Mar 2020 21:41:49 -0500
Shane!!
You’re a genius.
It worked perfectly. Thanks 😊
Regards,
Kel
Sent from my iPhone
> On Mar 8, 2020, 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. Moving multiple URLs with corresponding names into a folder.
> (?iKel)
> 2. Re: Moving multiple URLs with corresponding names into a
> folder. (Shane Stanley)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Sat, 7 Mar 2020 16:35:54 -0600
> From: ?iKel <email@hidden>
> To: Applescript-users list <email@hidden>
> Subject: Moving multiple URLs with corresponding names into a folder.
> Message-ID: <email@hidden>
> Content-Type: text/plain; charset="utf-8"
>
> Hello!
> I?m working on a script to move a few URLs into a folder with
> corresponding names. I have made a script where I made a script to make move
> one URLs with the properties name command to a folder but was wondering if I
> can iterate over a list of URLs and match a corresponding name to a specific
> URL and to move them all into a folder.
> set the website_names to ?
> {"AppleScriptHelp", "Introduction to AppleScript Language Guide",
> "Introduction to AppleScript Overview", "Mac Automation Scripting Guide",
> "About Mac Scripting", "Automator User Guide", "Add AppleScript scripts to a
> workflow in Automator on Mac", "Control Automator with scripts on Mac",
> "Introduction to Automator AppleScript Actions Tutorial", "The macOS
> Automation Sites", "MacScripter", "CMD-D | Masters of Automation"}
> set the website_URLs to ?
> {"https://help.apple.com/applescript/mac/10.9/",
> "https://developer.apple.com/library/archive/documentation/AppleScript/Conceptual/AppleScriptLangGuide/introduction/ASLR_intro.html#//apple_ref/doc/uid/TP4000098
> 3-CH208-SW1",
> "https://developer.apple.com/library/archive/documentation/AppleScript/Conceptual/AppleScriptX/AppleScriptX.html#//apple_ref/doc/uid/10000156i",
>
> "https://developer.apple.com/library/archive/documentation/LanguagesUtilities/Conceptual/MacAutomationScriptingGuide/AutomatetheUserInterface.html",
> "https://support.apple.com/guide/automator/welcome/mac",
> "https://support.apple.com/guide/automator/add-applescript-scripts-to-a-workflow-aut4bb6b2b4f/2.10/mac/10.15",
>
> "https://support.apple.com/guide/automator/control-automator-with-scripts-autf238a3e24/2.10/mac/10.15",
>
> "https://developer.apple.com/library/archive/documentation/AppleApplications/Conceptual/AutomatorTutorialAppleScript/Introduction/Introduction.html",
> "https://macosxautomation.com/index.html",
> "https://macscripter.net/index.php", "https://cmddconf.com/2017/videos.html?}
>
> repeat with i from 1 to the count of the website_names
> set the website_names to item i of the website_URLs
> --setting the websites names to the websites URLs
> exit repeat
> end repeat
> --moving the URLs into designated to a folder with the corresponding names
> tell application "Finder"
> make new internet location file ?
> to website_URLs at ?
> {"Macintosh HD:Users:?iKel:Desktop:Apple Support Links:Scripting |
> Automation Links:"} ?
> with properties {name:website_names}
> end tell
>
>
> I could be way off with my logic here or there may be a better
> way to do this with a script. But if anyone has a better solution of
> moving these URLs with corresponding names into a folder. I am
> new to AppleScript so just trying to learn the basics here so any
> help is much appreciated.
>
> Kind regards,
> Kel
>
>
>
>
>
>
>
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL:
> <https://lists.apple.com/mailman/private/applescript-users/attachments/20200307/069a7ec8/attachment.htm>
>
> ------------------------------
>
> Message: 2
> Date: Sun, 8 Mar 2020 14:32:53 +1100
> From: Shane Stanley <email@hidden>
> To: AS users <email@hidden>
> Subject: Re: Moving multiple URLs with corresponding names into a
> folder.
> Message-ID: <email@hidden>
> Content-Type: text/plain; charset="utf-8"
>
>> On 8 Mar 2020, at 9:35 am, ?iKel via AppleScript-Users
>> <email@hidden> wrote:
>>
>> I am new to AppleScript so just trying to learn the basics here
>
> The first issue is very basic: the number of items in each list must match.
> You're also passing a string instead of a file object as the location for the
> new files.
>
> As for your repeat, try this:
>
> set the website_names to [...]
> set the website_URLs to [...]
> set destPath to (path to desktop as text) & "Apple Support Links:Scripting |
> Automation Links"
> repeat with i from 1 to the count of website_names
> tell application "Finder"
> make new internet location file at folder destPath to (item i of
> website_URLs) with properties {name:item i of website_names}
> end tell
> end repeat
>
> (You might need to check you URLs, too.)
>
> --
> Shane Stanley <email@hidden>
> <www.macosxautomation.com/applescript/apps/>, <latenightsw.com>
>
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL:
> <https://lists.apple.com/mailman/private/applescript-users/attachments/20200308/d5d33d1f/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 24
> *************************************************
_______________________________________________
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