Jump to content
Sign in to follow this  
fraudh8er

Input not being ready from GUI

Recommended Posts

fraudh8er

any thoughts on why agency1 is not getting to the dbpix func?

Global $timeout = 5 
Gui()
Done()
Exit


Func Gui()

  Global $GUI_CHECKED   = 1
  Global $GUI_INDETERMINATE = 2
  Global $GUI_UNCHECKED  = 4

 ;Script generated by AutoBuilder 0.4
 ;Fileinstall (that icon file)

  Opt("GUICoordMode", 1)
  Opt("GUINotifyMode", 1)
  
 ;creates the GUI window with name and given dimensions
  GuiCreate("adfasdfasdf", 319,380,(@DesktopHeight-319)/2, (@DesktopHeight-353)/2 , 0x004CF000)
  AutoItSetOption ( "Colormode", 0)

  GUICreateEx ("","0xECE9D8","smart.ico")
  WinSetOnTop("adsdasdfasf","",1)   ;makes the GUI window always on top

  Dim $top = GUISetControl("label", "adfasdfasdfsd", 29, 20, 260, 20)
    GUISetControlFont(-1, 13, 500)
    
  Dim $SmartUpdate = GUISetControl("checkbox", "Smart Update", 30, 60, 100, 30)
  Dim $DBPix = GUISetControl("checkbox", "DBPix", 30, 100, 60, 20)
  Dim $MSDEServer = GUISetControl("checkbox", "MSDE Server", 30, 135, 90, 20)
  Dim $TightVNC = GUISetControl("checkbox", "TightVNC", 160, 64, 65, 20)
  Dim $DbaMgr = GUISetControl("checkbox", "DBaMgr", 160, 100, 60, 20)
  Dim $Nibrs = GUISetControl("checkbox", "Install NIBRS", 160, 129, 90, 30)
  Dim $WinZip81 = GUISetControl("checkbox", "Install WinZip81", 30, 161, 100, 30)
  
 ;labels and inputs boxes for the three prompts
  GUISetControl("label", "Agency's Full Name", 100, 190, 125, 20)
  Dim $AgencyNm = GUISetControl("input", "Enter Agency's Name", 40, 215, 225, 20)
  Global $agency1 = GuiRead($AgencyNm)
 
  Dim $AgencySTLb = GUISetControl("label", "Enter Agency's State", 40, 252, 170, 30)
  
  Dim $agencyST = GUISetControl("combo", "my combo", 155, 252, 80, 100)
    GUISetControlData($agencyST,"IA|MN|WI|MO|TX|MN")
    
;press to start installation box and label above it
  $StartLb = GUISetControl("label", "START INSTALLATION", 100, 290, 150, 20)
  $PressHere = GUISetControl("button", "PRESS HERE", 10, 310, 290, 30)

  GuiShow()
 ;GuiWaitClose()
  
  While 1
    ;sleep(100)
     $msg = GuiMsg(0)
     
     Select
     Case $msg = -3
      Cancel()
     Case $msg = $PressHere
       If GuiRead($SmartUpdate) = $GUI_CHECKED Then SmartUpdate()
       If GuiRead($DBPix) = $GUI_CHECKED Then DBPix()
       If GuiRead($MSDEServer) = $GUI_CHECKED Then MSDE()
       If GuiRead($TightVNC) = $GUI_CHECKED Then TightVnc()
       If GuiRead($WinZip81) = $GUI_CHECKED Then WinZip81()
       If GuiRead($DbaMgr) = $GUI_CHECKED Then DbaMgr()
     EndSelect
  WEnd
  Done()
 ;GuiWaitClose()
EndFunc
Func Done()
  MsgBox(64, "dgdfghdfghdgh", "  Installation of Selected Items Completed! ")
 ;DllReg()
  Exit
EndFunc

I Am not sure what is going on, also I would like to know to get the GUI to not be ontop all the time,

Share this post


Link to post
Share on other sites
Jos

maybe this way?:

Global $timeout = 5 
Global $agency1 
Gui()
Done()
Exit


Func Gui()

 Global $GUI_CHECKED   = 1
 Global $GUI_INDETERMINATE = 2
 Global $GUI_UNCHECKED  = 4

;Script generated by AutoBuilder 0.4
;Fileinstall (that icon file)

 Opt("GUICoordMode", 1)
 Opt("GUINotifyMode", 1)
 
;creates the GUI window with name and given dimensions
 GuiCreate("adfasdfasdf", 319,380,(@DesktopHeight-319)/2, (@DesktopHeight-353)/2 , 0x004CF000)
 AutoItSetOption ( "Colormode", 0)

 GUICreateEx ("","0xECE9D8","smart.ico")
 WinSetOnTop("adsdasdfasf","",1)  ;makes the GUI window always on top

 Dim $top = GUISetControl("label", "adfasdfasdfsd", 29, 20, 260, 20)
GUISetControlFont(-1, 13, 500)

 Dim $SmartUpdate = GUISetControl("checkbox", "Smart Update", 30, 60, 100, 30)
 Dim $DBPix = GUISetControl("checkbox", "DBPix", 30, 100, 60, 20)
 Dim $MSDEServer = GUISetControl("checkbox", "MSDE Server", 30, 135, 90, 20)
 Dim $TightVNC = GUISetControl("checkbox", "TightVNC", 160, 64, 65, 20)
 Dim $DbaMgr = GUISetControl("checkbox", "DBaMgr", 160, 100, 60, 20)
 Dim $Nibrs = GUISetControl("checkbox", "Install NIBRS", 160, 129, 90, 30)
 Dim $WinZip81 = GUISetControl("checkbox", "Install WinZip81", 30, 161, 100, 30)
 
;labels and inputs boxes for the three prompts
 GUISetControl("label", "Agency's Full Name", 100, 190, 125, 20)
 Dim $AgencyNm = GUISetControl("input", "Enter Agency's Name", 40, 215, 225, 20)
 Dim $AgencySTLb = GUISetControl("label", "Enter Agency's State", 40, 252, 170, 30)
 
 Dim $agencyST = GUISetControl("combo", "my combo", 155, 252, 80, 100)
   GUISetControlData($agencyST,"IA|MN|WI|MO|TX|MN")
   
;press to start installation box and label above it
 $StartLb = GUISetControl("label", "START INSTALLATION", 100, 290, 150, 20)
 $PressHere = GUISetControl("button", "PRESS HERE", 10, 310, 290, 30)

 GuiShow()
;GuiWaitClose()
 
 While 1
  ;sleep(100)
    $msg = GuiMsg(0)
    
    Select
    Case $msg = -3
     Cancel()
    Case $msg = $PressHere
      $agency1 = GuiRead($AgencyNm)
      If GuiRead($SmartUpdate) = $GUI_CHECKED Then SmartUpdate()
      If GuiRead($DBPix) = $GUI_CHECKED Then DBPix()
      If GuiRead($MSDEServer) = $GUI_CHECKED Then MSDE()
      If GuiRead($TightVNC) = $GUI_CHECKED Then TightVnc()
      If GuiRead($WinZip81) = $GUI_CHECKED Then WinZip81()
      If GuiRead($DbaMgr) = $GUI_CHECKED Then DbaMgr()
    EndSelect
 WEnd
 Done()
;GuiWaitClose()
EndFunc
Func Done()
 MsgBox(64, "dgdfghdfghdgh", "  Installation of Selected Items Completed! ")
;DllReg()
 Exit
EndFunc

Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
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
Sign in to follow this  

×