Xcode 如何在afplay运行时运行脚本

Xcode 如何在afplay运行时运行脚本,xcode,bash,applescript,applescript-objc,Xcode,Bash,Applescript,Applescript Objc,大家好,我想知道在afplay运行时如何继续执行脚本?例如 do shell script "afplay /song.mp3" say "Hello, nice to meet you, what's your name?" 当我执行代码时,“Say”命令直到歌曲停止才会执行! 谢谢 在bash中,您可以使用: #!/bin/bash command_name & echo "message" 符号将在后台运行该命令 在applescript中,类似这样的内容: do

大家好,我想知道在afplay运行时如何继续执行脚本?例如

   do shell script "afplay /song.mp3"
    say "Hello, nice to meet you, what's your name?"
当我执行代码时,“Say”命令直到歌曲停止才会执行! 谢谢

在bash中,您可以使用:

#!/bin/bash
command_name &
echo "message"
符号将在后台运行该命令

在applescript中,类似这样的内容:

do shell script "afplay /song.mp3 &"
  "echo 'Hello, nice to meet you, what's your name?'"
希望对您有所帮助。

在bash中,您可以使用:

#!/bin/bash
command_name &
echo "message"
do shell script "afplay /System/Library/Sounds/Purr.aiff & say Hello, nice to meet you, whats your name?"
符号将在后台运行该命令

在applescript中,类似这样的内容:

do shell script "afplay /song.mp3 &"
  "echo 'Hello, nice to meet you, what's your name?'"
希望对您有所帮助。

在bash中,您可以使用:

#!/bin/bash
command_name &
echo "message"
do shell script "afplay /System/Library/Sounds/Purr.aiff & say Hello, nice to meet you, whats your name?"
符号将在后台运行该命令

在applescript中,类似这样的内容:

do shell script "afplay /song.mp3 &"
  "echo 'Hello, nice to meet you, what's your name?'"
希望对您有所帮助。

在bash中,您可以使用:

#!/bin/bash
command_name &
echo "message"
do shell script "afplay /System/Library/Sounds/Purr.aiff & say Hello, nice to meet you, whats your name?"
符号将在后台运行该命令

在applescript中,类似这样的内容:

do shell script "afplay /song.mp3 &"
  "echo 'Hello, nice to meet you, what's your name?'"
希望有帮助

do shell script "afplay /System/Library/Sounds/Purr.aiff & say Hello, nice to meet you, whats your name?"
我刚刚在OS X 10.8.3下的AppleScript中测试了这一点,它可以根据您的需要工作

注意,我从“what's”中删除了

我刚刚在OS X 10.8.3下的AppleScript中测试了这一点,它可以根据您的需要工作

注意,我从“what's”中删除了

我刚刚在OS X 10.8.3下的AppleScript中测试了这一点,它可以根据您的需要工作

注意,我从“what's”中删除了

我刚刚在OS X 10.8.3下的AppleScript中测试了这一点,它可以根据您的需要工作

注意,我从“what's”中删除了