Format text in display dialog

I am wanting to set some of the text in a display dialog in bold, but am not sure if this can be accomplished with a standard dialog. Can it?

display dialog "one lot of text" & return & "followed by another lot of text"

I want the first lot in bold.
Thanks
Chuckles:D

i don’t think you can format dialog text…i could be wrong but i have never seen it done before

Hendo is not wrong - you cannot format a standard “display dialog” message.

Quite. However, depending on the precise effect that you’re after, an alert might do the trick for you:

display alert "One lot of text" message "Followed by another lot of text" buttons {"Cancel", "OK"} cancel button 1

yeah…i wonder if thats what he was after…well there is no better way anyway:P

Thanks for the speedy replies. The alert is what I was looking for. One last question, can you change the icon from applescript to say the stop icon with an alert? I know you can do it with display dialog.
Chuckles :smiley:

Forgot about that (turning 69 on the 29th, ugh). What’s nice about alerts too, is that like dialogs they can have more than one line and as dialogs do now, they understand tabs:

display alert "One lot of text" & return & "more of the text" & return & "and even more" & return & "and even more" & return & tab & "and even more" message tab & "Followed by another lot of text" & return & "and quite a bit more" & return & "and even more" & return & "and even more" & return & "and even more" & return & "and even more" buttons {"Cancel", "OK"} cancel button 1

Cool! That makes my msg even easier to read by the non-scripters I have to build it for. Thanks.
:smiley:

Adder: If you’re willing to fool around with spacing, you can even do this:

set headers to "Name" & tab & tab & "Address" & tab & tab & tab & tab & "Phone"
set myData to "Billy-Bob B" & tab & "27 Dreadful Heights" & tab & tab & "555-9797" & return & "George Jones" & tab & "49 Windblown Place" & tab & tab & "123-4567"

display alert headers message myData buttons {"Cancel", "OK"} cancel button 1

And no, I don’t think you can change the icon in an alert (at least there’s no AppleScript property for that)

You should be able to, Chuckles, by adding an ‘as critical’ parameter - but I’m afraid that doesn’t work. You can, however, use the warning icon:

display alert "One lot of text" message "Followed by another lot of text" buttons {"Cancel", "OK"} cancel button 1 as warning

Thanks. I am now using alert in place of most of my DDs. I discovered when testing alert that it displays the icon of the program its called by, so it is fine the way it is currently. I will be using as warning soon in another script though.
Thanks everybody. :smiley:

Yeah - the behaviour is similar to icons in display dialog in that respect (although you can have a bit more fun with varying the latter).