Re: running a stay open script app inside an app package OUTCOME
Re: running a stay open script app inside an app package OUTCOME
- Subject: Re: running a stay open script app inside an app package OUTCOME
- From: Donald Hall <email@hidden>
- Date: Mon, 7 Jun 2004 22:53:23 -0600
Graff,
Thanks for the reply. It now mysteriously has started working for me, too!
However, there is one modification needed:
do shell script path/to/scriptapp
will in fact launch the stay open script app that is inside the other
application's bundle, but the do shell script won't return until the
stay open script app quits. To get around this, you must redirect the
return from the do shell script to /dev/null:
do shell script testScriptApp & " > /dev/null 2>&1 &"
With this statement, the do shell script command returns immediately,
allowing the initiating script to proceed to completion.
I am not sure why the idle handler of my stay open script app was not
firing earlier.
Regards,
Don
At 10:00 PM -0700 2004/06/06, Graff <email@hidden> wrote:
>
>
Hmm it seems to work fine for me. I created two scripts, saved one as
>
"AnotherApp.app" as a stay-open application bundle:
>
----
>
global startTime
>
on run
>
display dialog "Start count down?"
>
set startTime to current date
>
end run
>
>
on idle
>
if ((current date) - startTime > 10) then
>
display dialog "I'm done for!"
>
quit
>
end if
>
return 5
>
end idle
>
----
>
>
Saved the other also as an application bundle:
>
----
>
on run
>
tell application "AnotherApp"
>
activate
>
end tell
>
end run
>
----
>
>
When I run the second one it runs the first one without a hitch. The
>
idle handler works as expected. I even put the AnotherApp.app inside
>
the second application bundle (named StarterApp.app) in its
>
":Content:Resources:" folder and it still worked fine.
>
>
I don't see any reason to use paths at all, whether colon or slash
>
delimited. Can you give any more specific information as to what you
>
are attempting to script? Colon-style paths should work in AppleScript
>
no matter where the script resides.
>
>
- Ken
>
>
On Jun 6, 2004, at 2:11 AM, Donald Hall wrote:
>
>
> I have a stay open script application that I want to run from inside
>
> another application's package. I cannot seem to get the idle handler
>
...snip...
>
> shell script seems to be my only option.
>
>
>
> Any help or information greatly appreciated.
>
--
Donald S. Hall, Ph.D.
Apps & More Software Design, Inc.
email@hidden
http://www.appsandmore.com
_______________________________________________
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.