0
テキストを送信するコマンドを書きましたが、コマンドを貼り付けると機能しません。いくつかの構文エラーや欠けていることはありますか?golang exec osascript not calling
印刷コマンドは次のとおりです。 /usr/bin/osascript -e 'tell application "Messages"' -e 'set mybuddy to a reference to text chat id "iMessage;+;chatXXXXXXXXXX"' -e 'send "test" to mybuddy' -e 'end tell'
私のコードは次のとおりです。Command
documentationから
command := fmt.Sprintf("/usr/bin/osascript -e 'tell application \"Messages\"' -e 'set mybuddy to a reference to text chat id \"%s\"' -e 'send \"%s\" to mybuddy' -e 'end tell'", chatid, message)
fmt.Println(command)
exec.Command(command).Run()