Opening a file in OSX with code (Real Studio network user group Mailinglist archive)

Back to the thread list
Previous thread: Excel examples
Next thread: AppleScript Editor


ASCII value differences in strings Mac to Windows and SQL   -   McGrath, John
  Opening a file in OSX with code   -   Mike B
   Re: Opening a file in OSX with code   -   Kevin Ballard
    Re: Opening a file in OSX with code   -   Mike B
    Re: Opening a file in OSX with code   -   Mike B
     Reading RB XML source   -   Andrew

Opening a file in OSX with code
Date: 31.03.02 19:08 (Sun, 31 Mar 2002 20:08:52 +0200)
From: Mike B

I use the code below in a menu item to open an html file, this works fine in
classic but while selecting the Menu item with the application running on
OSX I find that the "f.launch" forces the browser to open in the classic
environment instead of using the OSX browser, anyone any ideas how to make
the browser from OSX open the html file?

Thanks
Mike

Dim f as FolderItem
f=GetFolderItem("GUIDE.html")
If f<>nil then
if f.exists then
f.launch
else
MessageWindow.show
end if
end if

---
Subscribe to the digest:
<mailto:<email address removed>>
Unsubscribe:
<mailto:<email address removed>>

Re: Opening a file in OSX with code
Date: 31.03.02 20:03 (Sun, 31 Mar 2002 14:03:23 -0500)
From: Kevin Ballard
On 3/31/02 1:08 PM, "Mike B" <<email address removed>> wrote:

> I use the code below in a menu item to open an html file, this works fine in
> classic but while selecting the Menu item with the application running on
> OSX I find that the "f.launch" forces the browser to open in the classic
> environment instead of using the OSX browser, anyone any ideas how to make
> the browser from OSX open the html file?

My guess is the file has a type/creator code belonging to a classic browser.
You might want to check that.

Re: Opening a file in OSX with code
Date: 31.03.02 22:30 (Sun, 31 Mar 2002 23:30:18 +0200)
From: Mike B
>> I use the code below in a menu item to open an html file, this works fine in
>> classic but while selecting the Menu item with the application running on
>> OSX I find that the "f.launch" forces the browser to open in the classic
>> environment instead of using the OSX browser, anyone any ideas how to make
>> the browser from OSX open the html file?
>
> My guess is the file has a type/creator code belonging to a classic browser.
> You might want to check that.
>

The file is a Internet explorer html file, I found that if Internet explorer
is open on OSX it will open the file in OSX but if Explorer is not open in
OSX it resorts to the classic environment and classic version of Explorer.

The Classic file Resource info is:

Type: LINK and Creator: MSIE

The Carbon file Resource info is:

Type: ilht and Creator: MACS

By the way, when I change the classic file Type and Creator I can no longer
open the file as it reports it as being damaged.

Thanks
Mike

---
Subscribe to the digest:
<mailto:<email address removed>>
Unsubscribe:
<mailto:<email address removed>>

Re: Opening a file in OSX with code
Date: 01.04.02 00:02 (Mon, 01 Apr 2002 01:02:39 +0200)
From: Mike B
On 31/3/02 23:09, "REALbasic Network Users Group"
<<email address removed>> wrote:

>> Subject: Re: Opening a file in OSX with code
>> From: "Kevin Ballard" <kevin@sb.org>
>> Date: Sun, 31 Mar 2002 14:03:23 -0500
>>
>> On 3/31/02 1:08 PM, "Mike B" <<email address removed>> wrote:
>>
>>> I use the code below in a menu item to open an html file, this works fine in
>>> classic but while selecting the Menu item with the application running on
>>> OSX I find that the "f.launch" forces the browser to open in the classic
>>> environment instead of using the OSX browser, anyone any ideas how to make
>>> the browser from OSX open the html file?
>>
>> My guess is the file has a type/creator code belonging to a classic browser.
>> You might want to check that.
>>

>The file is a Internet explorer html file, I found that if Internet explorer is
>open on OSX it will open the file in OSX but if Explorer is not open in OSX it
>resorts to the classic environment and classic version of Explorer.
>
>The Classic file Resource info is:
>
>Type: LINK and Creator: MSIE
>
>The Carbon file Resource info is:
>
>Type: ilht and Creator: MACS
>
>By the way, when I change the classic file Type and Creator I can no longer
>open the file as it reports it as being damaged.

>Thanks
>

To add to the above I find that double clicking the actual html file while
in OSX opens the OSX version of Explorer, the problem seems to be only when
using "launch" to open the html file with the Explorer application?

Thanks
Mike

---
Subscribe to the digest:
<mailto:<email address removed>>
Unsubscribe:
<mailto:<email address removed>>