0

Mac アプリに NSDatePicker オブジェクト (時間、分、秒のみ) があります。私はすべてをリンクしました。私の唯一の質問は、NSDatePicker オブジェクトから日付/文字列を取得するための AppleScript 構文は何ですか? 次に、AppleScript キーワード「say」を使用して、選択した日付を読み上げたいと思います。アプリの GUI で [Speak Date] ボタンが押されると、AppleScript コードが実行されます。

ありがとうございました。

ベスト...SL

4

1 に答える 1

0

Cocoaアプリで、次のようなものを試してください。

NSAppleScript *script = [[NSAppleScript alloc] initWithSource:[NSString stringWithFormat:@"say \"%@\"", [[yourDatePicker dateValue] description]]];
[script executeAndReturnError:nil];
于 2012-11-21T15:16:57.600 に答える