Re: Finding default browser with AS
Re: Finding default browser with AS
- Subject: Re: Finding default browser with AS
- From: Jan Pieter Kunst <email@hidden>
- Date: Mon, 30 Apr 2001 13:51:28 +0200
JollyRoger (email@hidden) schreef op 30-04-2001 13:34 :
>
> But (wild idea) maybe I could do this only once, and save the browser
>
> signature in some kind of 'preference' for the script? By saving a text file
>
> with the signature somewhere, maybe, or is it somehow possible for a script
>
> to modify itself permanently? I.e., something like, on first run, find
>
> browser signature, save self with information about default browser, use
>
> that browser for subsequent runs?
>
>
Just save it in a property:
>
>
property gBrowserCreator : ""
>
>
on run
>
if gBrowserCreator = "" then my ResolveBrowser()
>
end run
>
>
on ResolveBrowser()
>
tell application "File Exchange"
>
set browser to creator type of (extension mapping "html")
>
quit
>
end tell
>
return browser
>
end ResolveBrowser
Yes, but this doesn't keep the value of 'browser' after the script quits,
unless I'm mistaken? Or am I missing a step where the script saves itself
with "property gBrowserCreator : browser"?
Thanks,
Newbie JP