Created
September 3, 2014 23:42
-
-
Save abacha/fa777fa97469bac39950 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| on ^*:hotlink:*//*.*:*:{ } | |
| on *:hotlink:*//*.*:*: http $1 | |
| on ^*:hotlink:*www.*:*:{ } | |
| on *:hotlink:*www.*:*: http $1 | |
| alias http { | |
| var %site = $remove($1,',",>,<) | |
| var %trailing = ,&.&!&? | |
| run %_Browser $iif($istok(%trailing,$right(%site,1),38),$left(%site,-1),%site) | |
| } | |
| alias -l InternetExplorer if (%IEXPLORE.EXE) return $iif(%_Browser == %IEXPLORE.EXE,$style(1)) Internet Explorer | |
| alias -l Mozilla if (%mozilla.exe) return $iif(%_Browser == %mozilla.exe,$style(1)) Mozilla | |
| alias -l Netscape if (%netscape.exe) return $iif(%_Browser == %netscape.exe,$style(1)) Netscape | |
| alias -l Opera if (%Opera.exe) return $iif(%_Browser == %Opera.exe,$style(1)) Opera | |
| alias -l Phoenix if (%phoenix.exe) return $iif(%_Browser == %phoenix.exe,$style(1)) Phoenix | |
| alias -l Other { | |
| if ((!$istok(%_Browsers,$nopath($remove(%_Browser,")),158)) && ($len(%_Browser))) return $+($style(1),Other) | |
| return Other | |
| } | |
| menu * { | |
| - | |
| SetBrowser | |
| .$InternetExplorer: set %_Browser %IEXPLORE.EXE | |
| .$Mozilla: set %_Browser %mozilla.exe | |
| .$Netscape: set %_Browser %netscape.exe | |
| .$Opera: set %_Browser %Opera.exe | |
| .$Phoenix: set %_Browser %phoenix.exe | |
| .$Other: set %_Browser $+(",$$sfile("C:\Program Files\*.exe",Pick a completely different browser,Select),") | |
| .- | |
| .Unload: .unload -rs $script | |
| } | |
| on *:UNLOAD: unset %_Browser* %IEXPLORE.EXE %mozilla.exe %netscape.exe %Opera.exe %phoenix.exe | |
| on *:LOAD: set %_browsers IEXPLORE.EXEžmozilla.exežnetscape.exežOpera.exežphoenix.exe | _find.browser 1 | |
| alias _find.browser { | |
| var %b | |
| if ($1 == 1) %b = $findfile(C:\,IEXPLORE.EXE,0,set %IEXPLORE.EXE $+(",$1-,")) | |
| elseif ($1 == 2) %b = $findfile(C:\,mozilla.exe,1,set %mozilla.exe $+(",$1-,")) | |
| elseif ($1 == 3) %b = $findfile(C:\,netscape.exe,1,set %netscape.exe $+(",$1-,")) | |
| elseif ($1 == 4) %b = $findfile(C:\,Opera.exe,1,set %Opera.exe $+(",$1-,")) | |
| elseif ($1 == 5) { | |
| %b = $findfile(C:\,phoenix.exe,1,set %phoenix.exe $+(",$1-,")) | |
| linesep -a | |
| echo $color(info) -ati2 * BrowserSwitch initiliazed | |
| echo $color(info) -ati2 * | |
| echo $color(info) -ati2 * Right-click in any window | |
| echo $color(info) -ati2 * Select Set Browser and choose your browser | |
| echo $color(info) -ati2 * | |
| echo $color(info) -ati2 * Double-clicking a link will run it | |
| echo $color(info) -ati2 * /http www.mirc.com will also run the link in your selected browser | |
| linesep -a | |
| set %_Browser %IEXPLORE.EXE | |
| halt | |
| } | |
| .timer 1 2 _find.browser $calc($1 + 1) | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment