Activating applications from a list
Activating applications from a list
- Subject: Activating applications from a list
- From: Doug McNutt <email@hidden>
- Date: Sat, 14 Dec 2002 17:19:36 -0700
I would appreciate suggestions for making this script work.
1) I'm not at all sure what one gets if the CANCEL button is pressed on a choose from list. The button definitions from dialog boxes don't seem to work and the dictionary seems to be flat out wrong.
2) the command "activate" works when sent to a known application but seems not to be understood when the name is text from a list. Where is the term "activate" defined?
set empty to {} -- a list of strings to display (an empty list if no selection)
set empty to "" -- another guess that doesn't work
set empty to false -- this is the empty list if no selection made. HUH?
tell application "Finder"
set opened_apps to name of every process
set selected_app to choose from list opened_apps with empty selection allowed
set theresult to result
end tell
if theresult is not empty then
-- button returned applies only to a dialog
tell selected_app
--using terms from application "Finder"
--using terms from application "Script Editor"
activate
--end using terms from
end tell
end if
--
Applescript syntax is like English spelling:
Roughly, but not thoroughly, thought through.
_______________________________________________
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.