AppleScript 从 HTTP 服务器下载文件,改变 URL?
我从来没有搞乱过 AppleScript,所以这对我来说只是一个概念。这可以吗?
游戏设计师 Bungie 在系统命名的文件和目录中托管了大量 Halo Reach 的 PNG 文件。 IE:
http://www.bungie.net/images/reachstats/commendations /onyx/onyx_large_ precision_multiplayer.png
更改同一单词的两个实例,并生成图像的另一个版本。将“onyx”更改为“铁”、“青铜”、“银”或“金”,您将获得相应的图像,如下所示:
http://www.bungie.net/images/reachstats/commendations/gold/gold_large_ precision_multiplayer.png
AppleScript 是否能够获取输入 URL,查找并更改 URL 中单词的实例,然后将关联的文件下载到目录中?今天是我的生日(10 月 27 日!因此是 XXVII),如果这能成功,如果有人能做到这一点,我会非常兴奋!
感谢您的热情解答!
I've never messed with AppleScript so this is only a concept to me. Can this work?
Bungie, the game designer, is hosting a ton of PNGs for Halo Reach in systematically named files and directories. IE:
http://www.bungie.net/images/reachstats/commendations/onyx/onyx_large_precision_multiplayer.png
Change two instances of the same word, and you generate another version of the image. Change "onyx" to "iron", "bronze", "silver" or "gold" and you get a corresponding image, like so:
http://www.bungie.net/images/reachstats/commendations/gold/gold_large_precision_multiplayer.png
Would an AppleScript be able to take an input URL, find and change the instances of the words in the URL, and then download the associated file to a directory? Today is my birthday (Oct 27th! hence the XXVII) and if this will work I would be super excited if someone could make this!
Thanks for all of your kind answers!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这是有效的:
字符串操作完全通过更改 Applescript 的文本项分隔符来完成。因此,要将 URL 的组成部分放入列表中,您需要执行以下操作:
加盐调味,但我同意第一个评论者的观点,即有更好的语言可以做到这一点。 Applescript 将是我最后的选择。
This works:
String manipulation is done completely with changing Applescript's text item delimiters. So to get the components of the URL into a list, you need to do the following:
Add salt to taste, but I agree with the first commenter that there are better languages to do this. Applescript would be my last choice here.