• 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: How do you make AppleScript App Behave as App
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How do you make AppleScript App Behave as App


  • Subject: Re: How do you make AppleScript App Behave as App
  • From: Brian Johnson <email@hidden>
  • Date: Sun, 24 Oct 2004 20:08:36 -0700 (PDT)


David:

As I understand it,

  "launch" means load into memory if it isn't there, but don't execute.
  "run"    means launch and run any implicit or explicit run handler
  "activate" means 'make frontmost', which might also require it to be
             run (or just launched?) if it is not yet running.

I think these are a little fuzzed up by the fact that Applescript studio permits you to define 'on launch' handlers (among others).

So, for a running app, 'activate' is just a 'bring to front'. Under OS9 some apps virtually required 'activation' before they could do useful work. Some might still want to be frontmost, so it's common to at least test scripts with 'activate' at the top of the tell block, so you can catch error messages, etc., but it isn't always necessary to keep them. Of course, it can be used as 'insurance' against the chance that the user (or an error) closed the app since the last time you talked to it.

 - brian johnson

On Sun, 24 Oct 2004, David Andrews wrote:

Thanks Kin,

I thought the "to activate" was equivalent to the "to run" but I guess it is not.

I made the Big App work as desired by using your "to run" in place of my "to activate" and turning on the "ignoring" block thus:

...
try
	ignoring application responses
		tell application theApp to run
		--tell application theApp to launch
		--tell application theApp to activate
	end ignoring
on error mess
...

On Oct 24, 2004, at 1:15 AM, Graff wrote:

[snip]
Big.app
----
on run
	ignoring application responses
		tell application "little"
			run
		end tell
	end ignoring
end run

on idle
[snip]

Oh, by the way, if you tell an application to launch then it will not run what is in the run handler (or the default run handler if you didn't specify one). You need to specifically tell the application to run to have it do what is in the run handler.

- Ken
[snip]

And I guess "to run" does something more than "to activate" since the "to activate" also does nothing with "ignoring" on, but runs the little app and hangs the big app with "ignoring" off ("to run" behaves just like "to activate" with "ignoring" off).


David A

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >How do you make AppleScript App Behave as App (From: David Andrews <email@hidden>)
 >Re: How do you make AppleScript App Behave as App (From: Graff <email@hidden>)
 >Re: How do you make AppleScript App Behave as App (From: David Andrews <email@hidden>)

  • Prev by Date: Re: How do you make AppleScript App Behave as App
  • Next by Date: email@hidden
  • Previous by thread: Re: How do you make AppleScript App Behave as App
  • Next by thread: Re: Applescript-users Digest, Vol 1, Issue 130
  • Index(es):
    • Date
    • Thread