Code: Select all
First time poster and I appreciate everything in advance. not the best but have been tinkering over the past 3 days and came into a snag.
I and making a diagnostics tool for my work and several people stated they want the ability to have the script switch between browsers. I have the obvious one for "Run chrome.exe" and Run firefox.exe". But I have the an If variable for %PassthroughBrowser% so If I make the "Default Browser" selection with nothing, it gives an error.
I had to cut out most of the propietary stuff from my work but here is the core of the code im am working with.
Again, Thank you in advance!
Code: Select all
#NoEnv
#SingleInstance Force
SetWorkingDir %A_ScriptDir%
Gui -MaximizeBox
Gui Font, s10 Bold, Segoe UI
Gui Add, Button, x3 y90 w110 h23, Domain Name
Gui Font
Gui Add, Edit, vdomain x115 y90 w180 h20
Gui Add, DropDownList, x175 y120 gBrowserType vSelectedBrowser, Default Browser||Firefox|Chrome
Gui, Add, CheckBox, x205 y155 gAlwaysOnTop vCheck, Always on Top
Gui Font, s10 Bold, Segoe UI +Center
Gui Add, Text, x120 y200 w110 h20, Tools
Gui Font
Gui Add, Button, x10 y130 w50 h50, Dig
GUI Add, Button, xp+65 yp+0 w50 h50, Browser
Gui Show, w300, Tool Board
Return
GuiEscape:
GuiClose:
ExitApp
ButtonBrowser:
Gui, submit, nohide
Run %PassthroughBrowser% %domain%
return
ButtonDig:
Gui, submit, nohide
run %PassthroughBrowser% http://www.digwebinterface.com/?hostnames=%domain%&type=ANY&useresolver=8.8.4.4&ns=all&nameservers=
return
AlwaysOnTop:
Gui, Submit, NoHide
If Check = 1
{
Gui, +AlwaysOnTop
}
else
{
Gui, -AlwaysOnTop
}
Return
BrowserType:
Gui, Submit, NoHide
If SelectedBrowser = Default Browser
{
PassthroughBrowser =
}
If SelectedBrowser = Firefox
{
PassthroughBrowser = firefox.exe
}
If SelectedBrowser = Chrome
{
PassthroughBrowser = chrome.exe
}
Return