English 中文(简体)
Downloading Images to a specific directory using Automator / Applescript
原标题:

Im trying to use a variable in Automator to save images into a specific folder.

Strangely when you create a new folder and you use a variable, it allows you to set the base path... but if you try to "Download URL" it does not allow you to select the base path to add the variable onto and it breaks the transaction.

Im sure applescript could do a better job, but I can t seem to figure it out.

Example.

There is a photo gallery called Cats and Dogs.

I am able to grab the Cats and Dogs title and make it my variable... it makes a new folder on my desktop called Cats and Dogs (from the Variable)... I am then able to grab all the images in the gallery as a result from "Get Image URL s from webpage"...

This works great... then I try to "Download the URLs" and I want to download them to the new "Cats and Dogs" folder I have created. But I can t seem to make that work, because I can t set the path in the Download the URLs box in automator...

This ends up being really useful when I have 100 galleries I need to rip to my desktop...

Of course I could move the files in the newly created folder by hand once saved... but then I would have to do this for each gallery...

Any suggestions?

最佳回答

From applescript you can use the command line program curl to download something. With the -o option you can specify where to save the download. So you would need an applescript like this...

do shell script "curl http://url.of.image -o /path/to/output/file"
问题回答

暂无回答




相关问题
Creating Help Files - Applescript Studio

I would like to know how to generate help files for an applescript studio application I am currently creating. I have tried many different options of creating help, and googled it for quite some time ...

封顶下载和开放式链接

I ve在Angap邮报中设定了一条规则,以操作“Download & Openlink”pple。 我希望这一文字在邮件电文中下载该词,在下载该词之后,该词应开放。

AppleScript to open named terminal window

I have two windows/tabs set up to run in Terminal.app, "syd" and "mel". i.e. in Shell | New Window, "syd" and "mel" are listed. How can I open these terminal configurations with AppleScript?

Hello World Error

I m learning AppleScript and my first program is a Hello World(of course!): display dialog "Hello World" But when I try to run this I got the error: The result of a numeric operation was too ...

User properties/ privileges in AppleScript

I want to write an applescript program that first checks to see if the user has Admin privileges, and if it doesn t then requesting a re-log-in or something. Eventually the script is going to need to ...

Applescript to archive email in Mail.app

I need to write an Applescript for Mail.app that will take all messages in my Inbox and Sent Messages that are older than a certain # of days and move them into respective folders "On My Mac", or ...

热门标签