• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: running a stay open script app inside an app package
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: running a stay open script app inside an app package


  • Subject: Re: running a stay open script app inside an app package
  • From: Graff <email@hidden>
  • Date: Sun, 06 Jun 2004 03:13:39 -0400

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 to execute, only the run handler.

do shell script "open " & path/to/scriptapp

only causes the run handler to execute, and then the script application exits. The same goes for

do shell script path/to/scriptapp

I was sure the latter would work, because in Terminal, if I type

path/to/scriptapp

at the prompt, the test script application runs as desired, with the idle handler executing.

Note that colon style file paths don't work inside packages, so do shell script seems to be my only option.

Any help or information greatly appreciated.
_______________________________________________
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.


References: 
 >running a stay open script app inside an app package (From: Donald Hall <email@hidden>)

  • Prev by Date: Re: Any way in applescript to use an image as a folder icon?
  • Next by Date: Re: Inside Packages
  • Previous by thread: running a stay open script app inside an app package
  • Next by thread: Scripting iChat to start an Audio or Video Invitation
  • Index(es):
    • Date
    • Thread