Re: Application creator code
Re: Application creator code
- Subject: Re: Application creator code
- From: Laine Lee <email@hidden>
- Date: Tue, 03 May 2005 15:02:27 -0500
On 4/26/05 4:35 AM, "Noodle" <email@hidden> wrote:
> Hi All,
>
> I'm having problems selecting an application using it's creator code.
> I've successfully used the following code for a different application:
>
> tell application "Finder"
> open application file id "XXXX"
> end tell
>
> but for the one I want to talk to now it doesn't work.
>
> I found in the archives the following code:
>
> set TheApp to choose file of type "APPL"
> set the clipboard to (info for TheApp)'s file creator
>
>
> When I run the above script I get a null (no characters) creator code
> from the application in question (works fine for other apps).
>
> The application in question can be activated by using it's name.
>
> Any ideas?
>
I think launch services can be a real pain in the neck if/when you rebuild
your database.
This is Panther stuff and I¹m not going to risk tying up Martin¹s modem too
long by taking measures to prevent it from wrapping.
I put the application ³RealPlayer² in a folder named ³real² in my
Applications folder so I could do a little Launch Services testing. First I
ran this:
do shell script
"/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewo
rks/LaunchServices.framework/Versions/A/Support/lsregister
/Applications/real -r -kill -r -domain local -domain system -domain user²
Then I ran this:
tell application "Finder"
set this_filepath to application file id "PNst" as alias
open this_filepath
end tell
That gave me error 10814.
Then I used Daniel Jalkut¹s (author of FastScripts) Applescriptkit
application
(still available at <http://www.red-sweater.com/AppleScriptKit.zip>):
tell application "AppleScriptKit"
call method "launchApplication:" of object (call method
"sharedWorkspace" of class "NSWorkspace") with parameter "RealPlayer"
--(from Christopher Hickman)
end tell
That lets the the file id script (the second one) work.
That may shed some light on the problem.
--
Laine Lee
_______________________________________________
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