home *** CD-ROM | disk | FTP | other *** search
- on INTLaunchWWW
- global IntBrowserAlOption
- set theApp to getExtensionApp("HTM")
- put "theapp" && theApp
- if word 1 of theApp = "Error:" then
- set IntBrowserAlOption to 2
- NewINTBrowserAlert()
- else
- put theApp into field "INTLocation"
- set FirstSlash to 0
- repeat with t = 1 to the number of chars in field "INTLocation"
- if char t of field "INTLocation" = "\" then
- if FirstSlash = 0 then
- set FirstSlash to t
- next repeat
- end if
- set LastSlash to t
- end if
- end repeat
- set folderLoc to char FirstSlash + 1 to LastSlash - 1 of field "INTLocation"
- set letterN to char FirstSlash - 2 of field "INTLocation"
- set NumOf to the number of chars in field "INTLocation"
- set Exename to char LastSlash + 1 to NumOf of field "INTLocation"
- repeat with t = 1 to 200
- set fname to getNthFileNameInFolder(letterN & ":\" & folderLoc, t)
- if fname = EMPTY then
- put "not found"
- set fname to 0
- exit repeat
- end if
- if fname = Exename then
- put "executable found"
- set fname to 1
- exit repeat
- end if
- end repeat
- case fname of
- 0:
- set IntBrowserAlOption to 1
- NewINTBrowserAlert()
- 1:
- repeat with t = 1 to the number of chars in Exename
- if char t of Exename = "." then
- set howmany to t
- exit repeat
- end if
- end repeat
- set shortexename to char 1 to howmany - 1 of Exename
- put "shortexename", shortexename
- set tasklistStore to gMasterAppObject(mGetTaskList)
- repeat with t = 1 to the number of lines in tasklistStore
- set taskLinet to line t of tasklistStore
- put "taskLinet", taskLinet
- repeat with d = 1 to the number of chars in taskLinet
- if char d of taskLinet = "," then
- set howmany to d
- exit repeat
- end if
- end repeat
- set tasknamet to char 1 to howmany - 1 of taskLinet
- if tasknamet = shortexename then
- set INTBrowserRunning to 1
- exit repeat
- end if
- end repeat
- case INTBrowserRunning of
- 1:
- put "browserrunning"
- newINTLaunchAlert()
- 0:
- newINTLaunchAlert()
- put "browsernotrunning"
- end case
- end case
- end if
- end
-