Jump to content

Submit Button


tharris
 Share

Recommended Posts

I know that I am doing something stupid here because when I hit the submit button nothing happens. I'm not feeling well and my brain isn't functioning right. Someone willing to help me out? Everything else is set with the exception of that part.

#include <GUIConstantsEx.au3>

Local $radio1, $radio2, $msg, $combo
GUICreate("Set CA Server") ; will create a dialog box that when displayed is centered

$radio1 = GUICtrlCreateRadio("Freight", 112, 112, 73, 41)
$radio2 = GUICtrlCreateRadio("National", 218, 112, 89, 41)
$combo = GUICtrlCreateCombo("Location", 72, 176, 265, 25)
$Button1 = GUICtrlCreateButton("Submit", 120, 232, 169, 49, 0)
GUICtrlSetData($combo, "Please Choose Freight or National")
GUISetState() ; will display an  dialog box with 1 checkbox

; Run the GUI until the dialog is closed
While 1
    $msg = GUIGetMsg()
    Select
        Case $msg = $GUI_EVENT_CLOSE
            ExitLoop
        Case $msg = $radio1 And BitAND(GUICtrlRead($radio1), $GUI_CHECKED) = $GUI_CHECKED
            GUICtrlSetData($combo, "") ;clear control
            GUICtrlSetData($combo, "GOE|ANH|ATL|CFS|CLC|DAL|DAY|DEN|FTA|GAR|IVN|KCY|MEM|MTB|OAK|OCC|PHX|POR|POS|SAC|SEA|SFV|SJC|SLC|UCC|WHT|SALES|OTHER")
            If $combo = "GOE" Then
                Run("Caf setserveraddress SSFXFGO2.fxfeast.freight.fedex.com")
                Exit
            ElseIf $combo = "ANH" Then
                Run("Caf setserveraddress SSFXFAnh.fxfeast.freight.fedex.com")
                Exit
            ElseIf $combo = "ATL" Then
                Run("Caf setserveraddress SSFXFATL.fxfeast.freight.fedex.com")
                Exit
            ElseIf $combo = "CFS" Then
                Run("Caf setserveraddress SSFXFCFS.fxfeast.freight.fedex.com")
                Exit
            ElseIf $combo = "CLC" Then
                Run("Caf setserveraddress SSFXFCLC.fxfeast.freight.fedex.com")
                Exit
            ElseIf $combo = "DAL" Then
                Run("Caf setserveraddress SSFXFDAL.fxfeast.freight.fedex.com")
                Exit
            ElseIf $combo = "DAY" Then
                Run("Caf setserveraddress SSFXFDAY.FXFeast.freight.fedex.com")
                Exit
            ElseIf $combo = "DEN" Then
                Run("Caf setserveraddress SSFXFDEN.fxfeast.freight.fedex.com")
                Exit
            ElseIf $combo = "FTA" Then
                Run("Caf setserveraddress SSFXFFTA.fxfeast.freight.fedex.com")
                Exit
            ElseIf $combo = "GAR" Then
                Run("Caf setserveraddress SSFXFGAR.fxfeast.freight.fedex.com")
                Exit
            ElseIf $combo = "IVN" Then
                Run("Caf setserveraddress SSFXFIVN.fxfeast.freight.fedex.com")
                Exit
            ElseIf $combo = "KCY" Then
                Run("Caf setserveraddress SSFXFKCY.fxfeast.freight.fedex.com")
                Exit
            ElseIf $combo = "MEM" Then
                Run("Caf setserveraddress SSFXFMEM.fxfeast.freight.fedex.com")
                Exit
            ElseIf $combo = "MTB" Then
                Run("Caf setserveraddress SSFXFMTB.fxfeast.freight.fedex.com")
                Exit
            ElseIf $combo = "OAK" Then
                Run("Caf setserveraddress SSFXFOAK.fxfeast.freight.fedex.com")
                Exit
            ElseIf $combo = "OCC" Then
                Run("Caf setserveraddress SSFXFOCC.fxfeast.freight.fedex.com")
                Exit
            ElseIf $combo = "PHX" Then
                Run("Caf setserveraddress SSFXFPHX.fxfeast.freight.fedex.com")
                Exit
            ElseIf $combo = "POR" Then
                Run("Caf setserveraddress SSFXFPOR.fxfeast.freight.fedex.com")
                Exit
            ElseIf $combo = "POS" Then
                Run("Caf setserveraddress SSFXFPOS.fxfeast.freight.fedex.com")
                Exit
            ElseIf $combo = "SAC" Then
                Run("Caf setserveraddress SSFXFSAC.fxfeast.freight.fedex.com")
                Exit
            ElseIf $combo = "SEA" Then
                Run("Caf setserveraddress SSFXFSEA.fxfeast.freight.fedex.com")
                Exit
            ElseIf $combo = "SFV" Then
                Run("Caf setserveraddress SSFXFSFV.fxfeast.freight.fedex.com")
                Exit
            ElseIf $combo = "SJC" Then
                Run("Caf setserveraddress SSFXFSJC.fxfeast.freight.fedex.com")
                Exit
            ElseIf $combo = "SLC" Then
                Run("Caf setserveraddress SSFXFSLC.fxfeast.freight.fedex.com")
                Exit
            ElseIf $combo = "UCC" Then
                Run("Caf setserveraddress SSFXFUCC.fxfeast.freight.fedex.com")
                Exit
            ElseIf $combo = "WHT" Then
                Run("Caf setserveraddress SSFXFWHT.fxfeast.freight.fedex.com")
                Exit
            ElseIf $combo = "SALES" Then
                Run("Caf setserveraddress SSFXFGO4.fxfeast.freight.fedex.com")
                Exit
            ElseIf $combo = "OTHER" Then
                Run("Caf setserveraddress SSFXFGO5.fxfeast.freight.fedex.com")
                Exit
            ElseIf $combo = "" Then
                MsgBox(48, "Warning!!!", "Please pick a location!!!")
            EndIf
        Case $msg = $radio2 And BitAND(GUICtrlRead($radio2), $GUI_CHECKED) = $GUI_CHECKED
            GUICtrlSetData($combo, "") ;clear control
            GUICtrlSetData($combo, "LAO|LGO|ATA|CHR|CGO|CCN|DTX|ETX|HSB|HST|HRT|KCM|LSA|MPS|NWK|OFL|EGV|SBC|SLK|SLS|SALES|OTHER")
            If $combo = "LAO" Then
                Run("Caf setserveraddress edsm-dom-fxf03.fxfeast.freight.fedex.com")
                Exit
            ElseIf $combo = "LGO" Then
                Run("Caf setserveraddress wsms-grf.WATKINS.LAN")
                Exit
            ElseIf $combo = "ATA" Then
                Run("Caf setserveraddress WSMS-ATL.WATKINS.LAN")
                Exit
            ElseIf $combo = "CHR" Then
                Run("Caf setserveraddress wsms-CHA.WATKINS.LAN")
                Exit
            ElseIf $combo = "CGO" Then
                Run("Caf setserveraddress WSMS-CHI.WATKINS.LAN")
                Exit
            ElseIf $combo = "CCN" Then
                Run("Caf setserveraddress wsms-WIN.WATKINS.LAN")
                Exit
            ElseIf $combo = "DTX" Then
                Run("Caf setserveraddress WSMS-DLS.WATKINS.LAN")
                Exit
            ElseIf $combo = "ETX" Then
                Run("Caf setserveraddress wsms-ELP.WATKINS.LAN")
                Exit
            ElseIf $combo = "HSB" Then
                Run("Caf setserveraddress WSMS-HBG.WATKINS.LAN")
                Exit
            ElseIf $combo = "HST" Then
                Run("Caf setserveraddress wsms-HOU.WATKINS.LAN")
                Exit
            ElseIf $combo = "HRT" Then
                Run("Caf setserveraddress WSMS-HRT.WATKINS.LAN")
                Exit
            ElseIf $combo = "KCM" Then
                Run("Caf setserveraddress wsms-KCY.WATKINS.LAN")
                Exit
            ElseIf $combo = "LSA" Then
                Run("Caf setserveraddress WSMS-LOS.WATKINS.LAN")
                Exit
            ElseIf $combo = "MPS" Then
                Run("Caf setserveraddress wsms-MPS.WATKINS.LAN")
                Exit
            ElseIf $combo = "NWK" Then
                Run("Caf setserveraddress WSMS-NWK.WATKINS.LAN")
                Exit
            ElseIf $combo = "OFL" Then
                Run("Caf setserveraddress wsms-ORL.WATKINS.LAN")
                Exit
            ElseIf $combo = "EGV" Then
                Run("Caf setserveraddress WSMS-SAC.WATKINS.LAN")
                Exit
            ElseIf $combo = "SBC" Then
                Run("Caf setserveraddress wsms-SBR.WATKINS.LAN")
                Exit
            ElseIf $combo = "SLK" Then
                Run("Caf setserveraddress WSMS-SLC.WATKINS.LAN")
                Exit
            ElseIf $combo = "SLS" Then
                Run("Caf setserveraddress wsms-STL.WATKINS.LAN")
                Exit
            ElseIf $combo = "SALES" Then
                Run("Caf setserveraddress SSFXFGO4.fxfeast.freight.fedex.com")
                Exit
            ElseIf $combo = "OTHER" Then
                Run("Caf setserveraddress edsm-dom-fxf03.fxfeast.freight.fedex.com")
                Exit
            ElseIf $combo = "" Then
                MsgBox(48, "Warning!!!", "Please pick a location!!!")
            EndIf
    EndSelect
WEnd
Link to comment
Share on other sites

Don't you need to add a Case $Button1?

Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...