Testing Shane’s, Dialog Toolkit.
EDIT: Would it be possible to set colour of the font ??
I find the solution I put the text first at placeholder… I have correct that.
This script take ‘properties’ as argument and display it, but I guess any text will do.
use AppleScript version "2.4"
use scripting additions
use script "Dialog Toolkit Plus" version "1.1.0"
tell application "Keynote" to tell front document
my listDialogProperties(get the properties)
end tell
on listDialogProperties(MyObject)
try
get properties of MyObject
on error errText number errNum
set pStart to offset of "{" in errText
set structure to text pStart thru ((length of errText) - 2) of errText
set TIDL to AppleScript's text item delimiters
set AppleScript's text item delimiters to ","
set fields to text items of structure as list
set myMessage to ""
repeat with f from 1 to count of fields
set AppleScript's text item delimiters to ":"
set theseItems to text items of (item f of fields) as list
set itemPropName to text 2 thru length of item 1 of theseItems
set itemValue to item 2 of theseItems
set myMessage to myMessage & "Property Label: " & itemPropName & tab & "Value: " & itemValue & linefeed
end repeat
set AppleScript's text item delimiters to TIDL
-- display dialog myMessage
set accViewWidth to 650
set {theButtons, minWidth} to create buttons {"Cancel", "OK"} default button "OK"
set {theField, theTop} to create field myMessage placeholder text "" bottom 0 field width accViewWidth extra height 300 with accepts linebreak and tab
set {boldLabel, theTop} to create label "Property of " bottom theTop + 20 max width accViewWidth control size regular size
set {Display} to display enhanced window "Display Properties List" acc view width accViewWidth acc view height theTop acc view controls {theField, boldLabel} buttons theButtons active field theField initial position {0, 0} with align cancel button
end try
end listDialogProperties