无聊来调戏下 mac

2014-12-14 12:16:10 +08:00
 bullettrain1433

新建一个mac script,复制以下文本

set currentUser to long user name of (get system info)
set firstName to first word of currentUser
set lastName to last word of currentUser
set noteValues to {56, 56, 58, 56, 61, 60, 50, 56, 56, 58, 56, 63, 61, 50, 56, 56, 68, 65, 61, 60, 58, 50, 66, 66, 65, 61, 63, 61} -- F
-- set noteValues to {65, 65, 67, 65, 70, 69, 60, 65, 65, 67, 65, 72, 70, 60, 65, 65, 77, 74, 70, 69, 67, 60, 75, 75, 74, 70, 72, 70} -- D
-- set noteValues to {55, 55, 57, 55, 60, 59, 50, 55, 55, 57, 55, 62, 60, 50, 55, 55, 67, 64, 60, 59, 57, 50, 65, 65, 64, 60, 62, 60} -- E
set syllables to {"hap", "p", "birth", "day", "to", "you", "[[slnc 500]]", "hap", "p", "birth", "day", "to", "you", "[[slnc 500]]", "hap", "p", "birth", "day", "dear", firstName, lastName, "[[slnc 500]]", "hap", "p", "birth", "day", "to", "you"}
repeat with i from 1 to the length of noteValues
    set thisValue to item i of noteValues
    set thisSyllable to item i of syllables
    if length of thisSyllable is less than 3 then
        set speakingRate to 220
    else
        set speakingRate to 100
    end if
    say thisSyllable pitch thisValue using "Victoria" speaking rate speakingRate modulation 0
end repeat

运行下,哈哈,为你唱生日祝福

5058 次点击
所在节点    macOS
37 条回复
shao
2014-12-14 17:39:55 +08:00
调戏得不错
shiny
2014-12-14 17:49:03 +08:00
一回想,只觉得像是鬼片里面那种风格……
littlewey
2014-12-14 19:44:20 +08:00
thanks!!
bullettrain1433
2014-12-14 19:48:14 +08:00
@jaylong ```` ```` markdown语法
17chai
2014-12-14 19:53:46 +08:00
周二生日,用上
bullettrain1433
2014-12-14 19:54:52 +08:00
@17chai 哈哈,正好
gaia
2014-12-14 21:35:19 +08:00
有才:)
varrily
2014-12-14 21:54:38 +08:00
哈哈,有意思~~
TankyWoo
2014-12-14 21:56:46 +08:00
有意思,感谢
konakona
2014-12-15 05:00:55 +08:00
@sammo 搜不到..
XDA
2014-12-15 08:02:00 +08:00
注孤生!
等会到公司放给我一个最近要过生日的同事听,哈哈
rocai185
2014-12-15 08:05:56 +08:00
给朋友听了,回复“写来这么多就那么两句简单的话!”
jxdwinter
2014-12-15 08:41:05 +08:00
哈哈哈,看懂了,有意思.
ioth
2014-12-15 09:18:32 +08:00
mark
scorpius
2014-12-15 10:34:07 +08:00
有意思。
clippit
2014-12-15 14:04:27 +08:00
为什么我突然想到 Portal 里 GLaDOS
rudolf
2014-12-16 01:09:22 +08:00
已醉。。。

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/153806

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX