1

我想编辑 TestFlightApp 存档脚本,以便当它提示发布说明时,它将是一个比一行更大的文本框。现在它显示一行的大小,但允许我按 CTRL+J 添加多行。

但是,我的问题是试图查看我输入的内容很痛苦,因为我一次只能查看一行。

这就是我所拥有的。

# Bring up an AppleScript dialog in Xcode to enter the Release Notes for this (beta) build:
NOTES=`osascript -e "tell application \"Xcode\"" -e "set notes_dialog to display dialog \"Please provide some release notes:\nHint: use Ctrl-J for New Line.\" default answer \"\" buttons {\"Next\"} default button \"Next\" with icon 1" -e "set notes to text returned of notes_dialog" -e "end tell" -e "return notes"`
4

1 回答 1

2

这是不可能的,Xcode或 Automator 中显示对话框的文本字段无法调整大小。但这可以使用 osax "StandardAdditions" 的显示对话框来实现。试试这个。

notes=`osascript -e "tell application \"Dock\"" -e "activate" -e "display dialog \"Please provide some release notes.\" default answer \"\r\r\r\r\r\r\r\r\r\" buttons {\"Next\"} default button \"Next\" with title \"Xcode\"" -e "set notes to text returned of the result" -e "end tell" -e "set {tid, text item delimiters} to {text item delimiters, \"\n\"}" -e "set r to (paragraphs of notes) as string" -e "set text item delimiters to tid" -e "activate application \"Xcode\"" -e "return r"`

文本字段显示 9 行。添加一行:按回车键。如果超过 9 行,可以使用(箭头键、翻页键或鼠标)滚动。脚本将回车符转换为换行符,它不返回尾随的空行。

于 2012-06-06T18:02:17.803 回答