Re: Need help writing some AppleScripts!!! Please help!
Re: Need help writing some AppleScripts!!! Please help!
- Subject: Re: Need help writing some AppleScripts!!! Please help!
- From: email@hidden (Michael Sullivan)
- Date: Fri, 17 May 2002 17:09:13 -0400
- Organization: Society for the Incurably Pompous
Dan Ball writes:
>
I don't have much experiance with AppleScript, I can do simple editiing and
>
write simple scripts but thats about it. I would greatly appreciate anyones
>
help! The scripts I am looking to make are easy I just don't have the
>
knowledge to write them. I searched all over the net for examples to help
>
me but no luck. Please help!
>
>
I need three AppleScripts written, here is what I need them to do:
>
>
1) How do I have an AppleScript automatically click a button on a dialog
>
box?? Say I get an error that I know is going to happen with a script and
>
instead of waiting for the user to select the button I want the script to
>
select it automatically! Possible?
This depends on exactly what you're talking about. Is it an applescript
error that's being returned by the application? Or a dialog box that
the application generates even though there isn't really any error?
In the first case, you can trap for the error as Jean Baptiste LeStang
suggested. It's generally better style to test your input data and not
do the command, rather than trap for an exception (although in AS, I
don't think there's a major performance penalty for exception handling).
In the second case, the problem is that app isn't really as scriptable
as you'd like (alas). Maybe you're using a do menu function that pops
up a dialog before doing its thing?
This may require third party software to get around, depending on how
complicated your needs are. Akua Sweets has some fairly complicated
resource munging shortcuts that might do what you need. There also
exist some simple utilities for specific tasks, like OkeyDokey, which if
you set it to running, will click "OK" on any dialog box that comes up.
The best solution is to use something like PreFab Player, a faceless
background application that can scriptably drive just about any part of
a program's interface that's possible to drive. Other programs that can
be a bit faster, easier but not *quite* as comprehensive include
OneClick and KeyQuencer. AFAIK all of these are dead end with OS 9.
Quickeys isn't as powerful as the others but has an X product now.
There's also a new free utility called Youpi Key on X which does a
little bit of this.
If you're on X and this is really an issue for you, there are a few
resources I could recommend.
I've ignored your questions 2 and 3 since others have already answered
them to my satisfaction.
Michael
--
Michael Sullivan
Business Card Express of CT Thermographers to the Trade
Cheshire, CT email@hidden
_______________________________________________
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.