質問

I am wanting to edit the TestFlightApp archive script so that when it prompts for release notes it will be a bigger textbox than just one line. Right now it displays the size of one line but will allow me to press CTRL+J to add multiple lines.

However my issue is trying to see what I have typed is a pain as I can only view one line at a time.

Here is what I have.

# 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"`
役に立ちましたか?

解決

It's not possible, text field of display dialog in Xcode or Automator can't be resized. But this is possible using the display dialog of osax "StandardAdditions". Try this.

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"`

The text field show 9 lines. To add a line: press the return key. If you have more than 9 lines, you can scroll with (the arrow key, page key or the mouse). The script convert carriage returns to newlines and it doesn't return the trailing blank lines.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top