How about

dim f as folderItem = Desktopfolder
f = f.child("myWebPage")
if f <> nil and f.Exists then
dim b as TextOutputStream = f.createTextFile
b.write myPage
b.Close
f.mactype = "HTML"
f.macCreator = "sfri"  // Safari

Johan Simons



On 18/04/2007, at 1:13 PM, Carlo Rubini wrote:
>
> On 4/17/07, Carlo Rubini <[EMAIL PROTECTED]> wrote:
>> I want to assign to a file( downloaded thru a RB-application) the  
>> macCreator so that the file shows its right icon and opens in the  
>> right application.
>> As I said, that we could do (in the past) making a call to the  
>> Internet Configuration File (passing as parameter either the  
>> extension or the MIME type).
>
>> "Dennis Birch" <[EMAIL PROTECTED]>
>>
>> Have you tried setting the MacCreator and MacType properties for the
>> FolderItem? If that doesn't work, you should be able to get
>> AppleScript to do the job for you.
>
> That's not the problem. Problem being: what should be the  
> MacCreator/MacType of a file of a given extension (or MIME type)?
>  Once we could know it from a call to the Internet Conf. File; so,  
> according to the user's settings, for .html files we could get  
> MSIE, MOSS and so on, for .jpg files we could get ogle or GKON, etc  
> etc. and the user would be happy to see his/her downloaded files  
> being assigned the right icon and opening in the expected application.
>
> And now? Should we let the Finder do the job for us (a la Windows),  
> setting the right MacCreator and macType of downloaded files?
>
>> In the old days (OS 9 and Classics), after downloading a file we  
>> could postprocess it; i.e. from its extension or MIME type, we  
>> could set its MacCreator so that the file got its proper icon and  
>> so on. Everything was done according to the specifications entered  
>> in the Internet Control Panel.
>>
>> Now that the Internet Control Panel has disappeared, what is the  
>> suggested way to postprocess a downloaded file?
>>
>> Am I right in supposing that I should altogether forget about  
>> postprocessing, leaving the job to the Finder that will  
>> automagically assign the right icon, macCreator (if any) and so on  
>> and so forth to the downloaded file?
>>
>> Suggestions welcome. Thanks.
>
> -- 
> Carlo

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to