Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Changing OSAExecute default timeout value

1 view
Skip to first unread message

RAHUL

unread,
Nov 4, 2009, 6:16:09 AM11/4/09
to
Hi All,

While using OSAExecute to run one AappleScript from my C++ program, I
came across a situation when the OSAExecution timed out and a message
dialog came up showing "AppleScript execution timed out" and it
returned failure.
I wanted to know is there any way to increase/decrease the timeout
value for OSAExecute?
I couldn't find anything in xcode documentation.

Thanks in advance
Rahul

Neal Reid

unread,
Nov 4, 2009, 11:55:06 AM11/4/09
to
In article
<8fed3e0d-51a8-49aa...@g22g2000prf.googlegroups.com>,
RAHUL <rsharm...@gmail.com> wrote:

We need a little more info. Are you running Snow Leopard? If so, see
http://db.tidbits.com/article/10643

RAHUL

unread,
Nov 4, 2009, 10:02:54 PM11/4/09
to
On Nov 4, 9:55 pm, Neal Reid <nealr...@magma.ca> wrote:
> In article
> <8fed3e0d-51a8-49aa-9423-8ccead641...@g22g2000prf.googlegroups.com>,

>
>  RAHUL <rsharma.ch...@gmail.com> wrote:
> > Hi All,
>
> > While using OSAExecute to run one AappleScript from my C++ program, I
> > came across a situation when the OSAExecution timed out and a message
> > dialog came up showing "AppleScript execution timed out" and it
> > returned failure.
> > I wanted to know is there any way to increase/decrease the timeout
> > value for OSAExecute?
> > I couldn't find anything in xcode documentation.
>
> We need a little more info. Are you running Snow Leopard? If so, see
>    http://db.tidbits.com/article/10643

Hi Neal,

I have a Leopard, Mac OS X 10.5.8, Kernel version -> Darwin 9.8.0, CPU
-> Intel Core 2 Duo
After reading the link I understood that the problem specified there
does not exits in leopard, So what could be the reason behind my
problem, Is it because the main application (to which applescript is
trying to communicate) is not responding due to some reason.

How long will applescript wait if that application is hung or waiting
for some user input or is not responding?

Thanks
Rahul


RAHUL

unread,
Nov 5, 2009, 4:24:35 AM11/5/09
to

I' ve got a workaround, just increasing the default 2 min timeout of
applescript using the following.

with timeout of <value> seconds
tell application ........
end tell
end timeout

0 new messages