How do you make AppleScript App Behave as App
How do you make AppleScript App Behave as App
- Subject: How do you make AppleScript App Behave as App
- From: David Andrews <email@hidden>
- Date: Sun, 24 Oct 2004 00:16:22 -0400
I would like a Big App (AppleScript) to launch or activate a Little App (AppleScript), but the Little App does not behave as a "normal" App, that is, it does not tell the Big App that it is running so the Big App hangs until the Little App quits (which creates an error within Little App -- perhaps another story? -- the error does not occur if Little App is run alone). This is not the desired result.
If the Little App is specified within the Big App as a "normal" app (say
SimpleText), then the desired result happens, the Little App launches or activates, the Big App continues and then quits leaving the Little App running.
Little App:
---------------
on run
say "Little App begins to run now."
--continue run
display dialog "Just wait around" buttons {"ok"} default button 1
end run
---------------
Big App:
---------------
set theApp to "Little App" -- Applescript App
--set theApp to "SimpleText" -- Classic App
try
--ignoring application responses
tell application theApp to launch -- almost, in Dock, but does nothing
--tell application theApp to activate
--end ignoring
on error mess
display dialog "The error text:" default answer mess buttons "coninue" default button 1
-- Little App got an error: Connection is invalid.
end try
say "Wait for Little App to run"
repeat
tell application "System Events"
set the_apps to the name of every application process whose visible is true
end tell
if the_apps contains theApp then exit repeat
delay 1
end repeat
say "Little App is running"
---------------
Please offer a solution, if there is one, i.e., please try your solution within the above scripts (my heads already fairly sore from the various combinations of the above commented text and then some) (;-/#.
Thanks,
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