Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

I am writing an AppleScript and I'd like to be able to format text in a display dialog box. For instance, I want part of the text to be bold or italic. How can I do this?

share|improve this question
    
I don't beleive you can from what I remember, but I'd need to check hence comment (not an answer) –  Stu Wilson May 2 '12 at 11:57
    
@StuWilson Ok! Thank you! –  daviesgeek May 2 '12 at 16:01
add comment

1 Answer

up vote 2 down vote accepted

Barring using Cocoa dialogs and integrating them into your script (way out of the scope of this question – and of my expertise, too), you can’t. AppleScript’s display dialog does not allow for typographic formatting (and neither does the only script friendly alternative to AppleScript’s inbuilt abilities, Carsten Blüm’s Pashua).

If all you need is for the first (supposedly most important) part of the text to be emphasized, you can use display alert instead of display dialog

display alert "this is the important part" message "… and this is not"

which will give you this:

display alert example

share|improve this answer
    
Will display alert allow you to have a text input? –  daviesgeek May 2 '12 at 16:00
    
@daviesgeek: nope. It’s strictly a message type dialog. –  kopischke May 2 '12 at 17:11
    
Too bad. I need a text input box. :-( –  daviesgeek May 2 '12 at 20:39
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.