>Kevin wrote:
>This should work.
Well, it doesn't...
Try the following:
(1) Make a Metacard standalone and call it "test"
(2) Open Applescript script editor, paste this script in:
tell application "test"
activate
end tell
(3) Run script. You may be prompted to locate "test" application. "test" will open,
but an error will appear
"test got an error - some parameter missing for activate"
(4) the test appication will be open, but it will be in the background (ie the script
editor will still be the frontmost application).
As mentioned in my previous email, you can achieve the correct behavior by using
something like this:
tell application "myMCApp"
try
activate
on error
end try
end tell
-- test to ensure myMCApp is open
try
tell application "Finder" to the first process whose �
name is "myMCApp"
if the result is {} then
display dialog "MyMCApp didn't open"
else
tell application "Finder"
set the frontmost of process "MyMCApp" to true
end tell
end if
on error
display dialog "An error occurred"
end try
Alternatively, if you are not sure what the name of the application may be (for
example, if user may have changed the name) you can substitute creator code check code
into the example above, like this:
set creaType to "****" -- where **** is the creator code of your MC standalone
-- use this in case user has changed name of application to something else (ie safer
than using 'whose name is xyz)
tell application "Finder" to the first process whose �
creator type is (creaType as type class)
--
--
Rodney Tamblyn
Educational Media group
Higher Education Development Centre, 75 Union Place
University of Otago, PO Box 56, Dunedin, New Zealand
ph +64 3 479 7580 Fax +64 3 479 8362
Archives: http://www.mail-archive.com/metacard%40lists.best.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.