Re: Appearance OSAX
Re: Appearance OSAX
- Subject: Re: Appearance OSAX
- From: Håvard Graudo <email@hidden>
- Date: Thu, 31 May 2007 20:44:49 +0200
I have been using that approach for some time and it works very well.
I found that they changed wording extensively from version 3.0 to 3.1
so scripts created this way will only work with a spesific version of
the OSAX.
The item count limit seems to depend on current screen resolution, so
you may find that scripts working on your large monitor fails on a
MacBook. (It would be great to be able to ask for a smaller typeface)
Appearance OSAX is well worth the money. They also have great
support. (I have no releations, just happy)
Håvard
Den 31. mai. 2007 kl. 18.00 skrev Simon Topliss:
For any Appearance OSAX users...
Today I needed a way to dynamically display a "better dialog" with
an unknown number of check boxes. This example shows how this can
be achieved. It can be easily be adapted for other field types. I'm
not too sure what the limits are for each field type.
-- BEGIN SCRIPT EXAMPLE
set colourList to {"Cyan", "Magenta", "Yellow", "Black", "Gold",
"Red"}
set dialogScriptString to "set dRes to display better dialog
\"Select colours:\" fields {"
repeat with i from 1 to colourList's length
set dialogScriptString to dialogScriptString & "{kind:check box,
name:\"" & item i of colourList & "\"},"
end repeat
set dialogScriptString to (text 1 thru -2 of dialogScriptString) &
"} buttons {\"OK\", \"Cancel\"}"
set dRes to run script dialogScriptString
set coloursChosen to choices returned of dRes -- result is a list
of all checked checkboxes
-- END SCRIPT EXAMPLE
It builds a string from the list and uses "run script" to compile
and run it. Run script also returns the correct chosen "choices".
I don't think I've seen this offered as a solution before (no doubt
I'm not the first to think of it!), so I thought I'd submit it for
those who may need this functionality at some time.
Simon
ps. Appearance OSAX is a scripting addition available from http://
www.24usoftware.com/AppearanceOSAX. It's a great tool for anything
other than standard "display dialog" can offer without resorting to
Xcode.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (applescript-
email@hidden)
Help/Unsubscribe/Update your Subscription:
40c2i.net
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden