RE: auto Click Button
RE: auto Click Button
- Subject: RE: auto Click Button
- From: Scott Babcock <email@hidden>
- Date: Thu, 31 May 2007 14:12:35 -0700
- Acceptlanguage: en-US
- Thread-topic: auto Click Button
Use "ignoring application responses":
ignoring application responses
tell application "Finder"
activate
display dialog "This is a test"
end tell
end ignoring
delay 2
tell application "System Events" to keystroke return
Another way to handle this sort of scenario is to build a separate "monitor" applet that runs on its own, looking for specific dialogs and issuing canned responses. That way, your main script doesn't have to deal with this issue at all. Your applet would use System Events to look for specific dialogs, issuing the desired responses whenever one of them appears.
-----Original Message-----
From: applescript-users-bounces+scoba=email@hidden [mailto:applescript-users-bounces+scoba=email@hidden] On Behalf Of email@hidden
Sent: Saturday, May 26, 2007 12:01 PM
To: email@hidden
Subject: AppleScript-Users Digest, Vol 4, Issue 248
Date: Fri, 25 May 2007 12:05:30 -0700 (PDT)
From: Oakley Masten <email@hidden>
Subject: auto Click Button
To: Users Group AppleScript <email@hidden>
Message-ID: <email@hidden>
Content-Type: text/plain; charset=iso-8859-1
On Thu, 24 May 2007 14:04:02 -0700
Michelle Steiner wrote
regartding Subject: Re: Auto Click Button
On May 24, 2007, at 12:39 PM, Oakley Masten wrote:
> Why doesn't this work?
>
> tell application "Finder"
> activate
> display dialog "Well, what do you want?"
>
> delay 2
>
> tell application "System Events" to click "OK"
>
> end tell
Because the script is halted at the dialog line, and
never gets to
the delay line.
Regardless, it's not needed.
Use this instead:
display dialog "Well, what do you want?" giving up
after 2
-- Michelle
Thanks Michelle
You are correct. It would never get to the delay.
Obviously, I did not ask my question correctly.
What I wanted to know was how do I get applescript to
push buttons on applications that it is monitoring?
aka Choosing an answer in a display dialog box or
entering a number in a box and then choosing the "OK"
button? in a finder window or an App window.
Thanks
Oakley
_______________________________________________
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