pro Posted January 22, 2009 Share Posted January 22, 2009 I am creating a script : Somebody fills his name and the script check if the input is filled and if so then it will send his name in a msgbox . If not it will give a msgbox that he first must fill de input name. But I can't figure aout how to send his name in msgbox and how to let the script check the inputbox couldn't find in the forums or help files. Could somebody help me . In advanced THX Pro And sorry for my English #include <GuiConstants.au3> #include <Inet.au3> #include <GUIConstantsEx.au3> ; GUI Creation GuiCreate("Data", 500, 420) GUICtrlCreateTabItem("Data") $labelnaam = GUICtrlCreateLabel("Naam : ",60,40) $Button_word = GUICtrlCreateButton("Opslaan",400,350) $input_naam = GuiCtrlCreateInput("", 100, 40, 130, 20) ; GUI Show GUISetState(@SW_SHOW) While 1 $msg = GUIGetMsg() Select Case $msg = $Button_word MsgBox(0, "Data", "Your name is $input_naam ") EndSelect If $msg = $GUI_EVENT_CLOSE Then ExitLoop WEnd Link to comment Share on other sites More sharing options...
Valuater Posted January 22, 2009 Share Posted January 22, 2009 Like this... #include <GuiConstants.au3> #include <Inet.au3> #include <GUIConstantsEx.au3> ; GUI Creation GUICreate("Data", 500, 420) GUICtrlCreateTabItem("Data") $labelnaam = GUICtrlCreateLabel("Naam : ", 60, 40) $Button_word = GUICtrlCreateButton("Opslaan", 400, 350) $input_naam = GUICtrlCreateInput("", 100, 40, 130, 20) ; GUI Show GUISetState(@SW_SHOW) While 1 $msg = GUIGetMsg() Select Case $msg = $Button_word $read_input = GUICtrlRead($input_naam) MsgBox(0, "Data", "Your name is " & $read_input & " ") EndSelect If $msg = $GUI_EVENT_CLOSE Then ExitLoop WEnd 8) Link to comment Share on other sites More sharing options...
pro Posted January 22, 2009 Author Share Posted January 22, 2009 (edited) Like this... #include <GuiConstants.au3> #include <Inet.au3> #include <GUIConstantsEx.au3> ; GUI Creation GUICreate("Data", 500, 420) GUICtrlCreateTabItem("Data") $labelnaam = GUICtrlCreateLabel("Naam : ", 60, 40) $Button_word = GUICtrlCreateButton("Opslaan", 400, 350) $input_naam = GUICtrlCreateInput("", 100, 40, 130, 20) ; GUI Show GUISetState(@SW_SHOW) While 1 $msg = GUIGetMsg() Select Case $msg = $Button_word $read_input = GUICtrlRead($input_naam) MsgBox(0, "Data", "Your name is " & $read_input & " ") EndSelect If $msg = $GUI_EVENT_CLOSE Then ExitLoop WEnd 8) THX for this now it show the name . Now I am stiil searching for the function to check if the input is empty if it is so give message 'fill please your name' ? Edited January 22, 2009 by pro Link to comment Share on other sites More sharing options...
CodyBarrett Posted January 23, 2009 Share Posted January 23, 2009 try If GUICTRLREAD($input_naam) = '' then YOUR CODE else YOUR CODE endif [size="1"][font="Tahoma"][COMPLETED]-----[FAILED]-----[ONGOING]VolumeControl|Binary Converter|CPU Usage| Mouse Wrap |WinHide|Word Scrammbler|LOCKER|SCREEN FREEZE|Decisions Decisions|Version UDF|Recast Desktop Mask|TCP Multiclient EXAMPLE|BTCP|LANCR|UDP serverless|AIOCR|OECR|Recast Messenger|AU3C|Tik-Tak-Toe|Snakes & Ladders|BattleShips|TRON|SNAKE_____________________[u]I love the Helpfile it is my best friend.[/u][/font][/size] Link to comment Share on other sites More sharing options...
billthecreator Posted January 23, 2009 Share Posted January 23, 2009 (edited) #include <GuiConstants.au3> #include <Inet.au3> #include <GUIConstantsEx.au3> ; GUI Creation GUICreate("Data", 500, 420) GUICtrlCreateTabItem("Data") $labelnaam = GUICtrlCreateLabel("Naam : ", 60, 40) $Button_word = GUICtrlCreateButton("Opslaan", 400, 350) $input_naam = GUICtrlCreateInput("", 100, 40, 130, 20) ; GUI Show GUISetState(@SW_SHOW) While 1 $msg = GUIGetMsg() Switch $msg Case $Button_word Switch GUICtrlRead($input_naam) Case "" MsgBox(0, "Data", "Please Fill in Your Name") Case Else MsgBox(0, "Data", "Your name is " & $read_input & " ") EndSwitch Case $GUI_EVENT_CLOSE ExitLoop EndSwitch WEnd Edited January 23, 2009 by billthecreator [font=Microsoft Sans Serif]My Scripts: From Most recent to least.[/font]Countdown GUI | QLOCK TWO | FlipClock | Slot Machine My UDF:_GenerateRandomNoRepeat | _GuiSnap Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now