home *** CD-ROM | disk | FTP | other *** search
/ .net 1998 August / netCD48.iso / mac / net / current / 00028_Script_28 < prev    next >
Text File  |  1998-06-24  |  3KB  |  100 lines

  1. --browser launching bits
  2. on LaunchBrowser
  3.   global gPlatform, gCDDrive, gURL, gMA, gBrowserLoc, gPathsep
  4.   
  5.   if gBrowserLoc = "" then
  6.     Alert "To access the internet using the .net CD-ROM you must have a functioning internet connection using either Netscape Navigator or Microsoft Internet Explorer set up as the default browser. Detecting Browser..."
  7.     --  First off, check to see whether there is a browser set up
  8.     
  9.     if not objectP(gMA) then
  10.       if the machinetype <>256 then
  11.         openxlib "MasterAp.pxo"
  12.       else
  13.         openxlib "MastrApp.dll"
  14.       end if
  15.       if the machinetype = 256 then
  16.         global j2736d2937m2382, gVoid
  17.         set j2736d2937m2382 to "Y7729J3338J3942"
  18.       else
  19.         global j2345q8345s3245, gMasterAppObject, gVoid
  20.         set j2345q8345s3245 to "u2321h8334k9372"
  21.       end if
  22.       
  23.       put MasterApp(mNew) into gMA
  24.       
  25.       if the machinetype = 256 then
  26.         set j2736d2937m2382 to gVoid
  27.       else
  28.         set j234q8345s3245 to gVoid
  29.       end if
  30.       
  31.       if not objectP(gMA) then
  32.         alert "No object!"
  33.         return
  34.       end if
  35.     end if
  36.     
  37.     set gBrowserLoc = gMA(mLocateExecutable, the pathname & "web" & gpathsep & "IE3.htm")
  38.     if word 1 of gBrowserLoc = "error:" then 
  39. --      Alert "We were unable to detect a IE3 on this system. Trying for Netscape"
  40.       set gBrowserLoc = gMA(mLocateExecutable, the pathname & "web" & gpathsep & "netscape.htm")   
  41.     end if
  42.     --    if there is no browser installed on the users' system then tell them and 
  43.     --    if we can get them to enter a path to it.
  44.     
  45.     if word 1 of gBrowserLoc = "error:" then
  46.       Alert "We were unable to detect either browser set as default on this system. To access the internet using the .net CD-ROM you must have a functioning internet connection using either Netscape Navigator or Microsoft Internet Explorer set up as the default browser. Exiting..."
  47.       if objectP(gMA) then gMA(mDispose)
  48.       exit
  49.     else     
  50.       
  51.       if objectP(gMA) then gMA(mDispose)
  52.     end if
  53.   end if
  54.   
  55.   --  sort out which button they pressed and assign a URL to go to
  56. --  alert "Browser found at: " & gBrowserLoc
  57.   
  58.   --    put the bit in here that launches our external browser thing.
  59. --  Alert "launching to external Browser. It will launch " & the clickon & gURL & ".htm"
  60.   
  61.   if not objectP(gMA) then
  62.     if the platform = 256 then
  63.       openxlib the pathname & "MastrApp.dll"
  64.     else 
  65.       openxlib "MasterAp.pxo"
  66.     end if
  67.     
  68.     if the machinetype = 256 then
  69.       global j2736d2937m2382, gVoid
  70.       set j2736d2937m2382 to "Y7729J3338J3942"
  71.     else
  72.       global j2345q8345s3245, gMasterAppObject, gVoid
  73.       set j2345q8345s3245 to "u2321h8334k9372"
  74.     end if
  75.     
  76.     put MasterApp(mNew) into gMA
  77.     
  78.     if the machinetype = 256 then
  79.       set j2736d2937m2382 to gVoid
  80.     else
  81.       set j234q8345s3245 to gVoid
  82.     end if
  83.     
  84.     
  85.     if not objectP(gMA) then
  86.       alert "No object!"
  87.       return
  88.     end if
  89.   end if
  90.   
  91.   set instanceID = gMA(mOpenDocument, the pathname & "web" & gpathsep & gURL & ".htm")
  92.   if instanceID <= 0 then
  93.     alert "Error launching: " & string(instanceID)
  94.   end if 
  95.   
  96.   
  97.   --  need to check that I'm shutting down the Xobjects OK.
  98.   if objectP(gMA) then gMA(mDispose)  
  99. end LaunchBrowser
  100.