Skip to content

daney2745ff/browser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 

Repository files navigation

browser

; $browser = $name & " (" & $browser & ")" If $browsers = "" Then $browsers = $browser Else $browsers &= "|" & $browser EndIf ; ;MsgBox($MB_SYSTEMMODAL, "Browser #" & $b, $browser) $b = $b + 1 WEnd $choices = StringReplace($browsers, "|", @LF) SplashOff() ;MsgBox(0, "Browser Details", "Default Browser = " & $default & @LF & @LF & $choices) ; Script generated by GUIBuilder Prototype 0.9 Const $style = BitOR($WS_OVERLAPPED, $WS_CAPTION, $WS_SYSMENU, $WS_VISIBLE, $WS_CLIPSIBLINGS, $WS_MINIMIZEBOX) $Main_GUI = GuiCreate("Default Browser Switcher v1.0", 295, 140, -1, -1, $style, $WS_EX_TOPMOST) ; CONTROLS $Group_def = GuiCtrlCreateGroup("Default Browser", 10, 10, 155, 55) $Input_def = GuiCtrlCreateInput("", 20, 30, 135, 20) GUICtrlSetTip($Input_def, "Current default browser!") ; $Button_info = GuiCtrlCreateButton("Info", 175, 15, 50, 50) GUICtrlSetFont($Button_info, 9, 600) GUICtrlSetTip($Button_info, "Program Information!") ; $Button_exit = GuiCtrlCreateButton("EXIT", 235, 15, 50, 50) GUICtrlSetFont($Button_exit, 9, 600) GUICtrlSetTip($Button_info, "Exit or Quit the program!") ; $Group_switch = GuiCtrlCreateGroup("Switch To", 10, 75, 275, 55) $Combo_brows = GUICtrlCreateCombo("", 20, 95, 255, 21) GUICtrlSetTip($Combo_brows, "Switch to selected browser!") ; ; SETTINGS GUICtrlSetData($Input_def, $default) ; GUICtrlSetData($Combo_brows, $browsers, $default & " (" & $defbrowser & ")") GuiSetState(@SW_SHOWNORMAL) Do Switch GuiGetMsg() Case $GUI_EVENT_CLOSE, $Button_exit ; Exit or Quit the program GUIDelete($Main_GUI) ExitLoop Case $Button_info ; Program Information $message = "This program allows you to switch from one installed browser to another, using that browser's own 'Set As Default' command." MsgBox($MB_OK + $MB_ICONINFORMATION + $MB_TOPMOST, "Program Information", $message, 0, $Main_GUI) Case $Combo_brows ; Switch to selected browser $browser = GUICtrlRead($Combo_brows) $browser = StringSplit($browser, " (", 1) $name = $browser[1] $browser = StringTrimRight($browser[$browser[0]], 1) $default = $name GUICtrlSetData($Input_def, $default) SplashTextOn("", "New Default Browser", 200, 120, -1, -1, 33) $installinfo = IniRead($inifle, $browser, "switch_command", "") $installinfo = StringSplit($installinfo, '" ', 1) $exepth = $installinfo[1] $exepth = StringReplace($exepth, '"', '') $pos = StringInStr($exepth, "", 0, -1) $foldpth = StringLeft($exepth, $pos - 1) If $browser = "FIREFOX.EXE" Then $params = "/SetAsDefaultAppUser" Else $params = $installinfo[2] EndIf ;MsgBox($MB_OK + $MB_ICONINFORMATION + $MB_TOPMOST, "New Default Browser", $browser & @LF & $exepth & @LF & $params & @LF & $foldpth, 2, $Main_GUI) If FileExists($exepth) Then ShellExecuteWait($exepth, $params, $foldpth) ;RunWait($exepth & " " & $params, $foldpth) SplashOff() GUIDelete($Main_GUI) ExitLoop Else MsgBox($MB_OK + $MB_ICONERROR + $MB_TOPMOST, "Switch Error", "Browser path does not exist.", 0, $Main_GUI) EndIf Case Else ; EndSwitch Until False

About

; $browser = $name & " (" & $browser & ")" If $browsers = "" Then $browsers = $browser Else $browsers &= "|" & $browser EndIf ; ;MsgBox($MB_SYSTEMMODAL, "Browser #" & $b, $browser) $b = $b + 1 WEnd $choices = StringReplace($browsers, "|", @LF) SplashOff() ;MsgBox(0, "Browser Details", "Default Browser = " & $default & @LF & @LF & $choices) ; Sc…

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors