• 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[2]: Application creator code
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re[2]: Application creator code


  • Subject: Re[2]: Application creator code
  • From: Noodle <email@hidden>
  • Date: Wed, 4 May 2005 23:08:32 +1000

See below  ...

>> 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.


Thanks for the input.

I'm not sure however how the last code extract can help to open an
application using it's file id. Can you set a parameter using the file
id?

Any more ideas? I need to find a way to do the following:


tell application "Finder" open application file id "XXXX"
   set AppName to name of result
end tell


As I noted above the application that I'm trying to link to doesn't
report a file id for some reason.


Many thanks,

Mark




 _______________________________________________
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: 
 >Re: Application creator code (From: Laine Lee <email@hidden>)

  • Prev by Date: Re: New Tiger dictionary format example posted
  • Next by Date: Re: New Tiger dictionary format example posted
  • Previous by thread: Re: Application creator code
  • Next by thread: every file in path error
  • Index(es):
    • Date
    • Thread