Re: Displaying Alert Window with special icon in AppleScript Studio
Re: Displaying Alert Window with special icon in AppleScript Studio
- Subject: Re: Displaying Alert Window with special icon in AppleScript Studio
- From: Bernardo Hoehl <email@hidden>
- Date: Fri, 30 Jul 2004 11:04:05 -0300
Thanks Paul!
You reply has been very helpfull.
Bernardo
============
On 30 de jul de 2004, at 02:20, Paul Berkowitz wrote:
On 7/29/04 9:57 PM, "Bernardo Hoehl" <email@hidden> wrote:
My application can either return a positive result or an alert that it
failed.
In order to enhance its look I would like to add diferent icons for
"success" or "failure" on the alert messages.
We do it in a simple AppleScript using "with icon 1" or "with icon 2"
But I can't figure out how it is done in AppleScript studio
This is my line:
display alert "Result" as warning message "Success" default button
"OK"
attached to window "Main"
Question:
How to provide the alert window with a special icon and or change the
color of the text? (red for failure, blue for success)
Wrong mailing list. There's a separate AppleScript Studio mailing list.
The answer to you question is clearly in the AppleScript Studio
Reference
Guide - if you find the dictionary too cryptic (it is).
There's an optional parameter [as], with 3 enumerations, You're
actually
using one of them. informational/warning/critical
The Guide explains that critical provides the ! yellow sign. For some
obscure reason, after a few years or Cocoa, both informational and
warning
provide the sane generic 'application' icon. That's a flaw. 'warning'
should
have its own icon, but doesn't.
there's nothing stopping using 'display dialog' instead of 'display
alert',
you know. The Studio version supercedes the Standard Additions version.
'icon 1/2/3' works fine there - you get Cocoa (nice-looking) versions
of red
stop sign, yellow !, and generic icons. the trouble is, there's a bug
that
limits you to 3 lines to text, very short lines.
Finally, you can use the normal AppleScript (Stand Additions) version
of
display dialog by putting it into a tell block targeted at any
application -
including System Events which is invisible. Then you'll et the usual
1/2/3.
--
Paul Berkowitz
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.