Rawox Posted March 26, 2009 Share Posted March 26, 2009 expandcollapse popup#include <GUIConstantsEx.au3> #include <SliderConstants.au3> $Window = GUICreate ( "The Love Tester", 325, 140 ) GUICtrlCreateLabel ( "Name 1:", 10, 7 ) GUICtrlCreateLabel ( "Name 2:", 165, 7 ) $Name1 = GUICtrlCreateInput ( "", 10, 24, 150, 20 ) $Name2 = GUICtrlCreateInput ( "", 165, 24, 150, 20 ) $Calculate = GUICtrlCreateButton ( "Calculate the love!", 10, 50, 305, 25 ) $Slider1 = GUICtrlCreateSlider ( 10, 80, 305, 30, BitOr ( $TBS_NOTICKS, $GUI_DISABLE ) ) GUICtrlCreateLabel ( "The result:", 18, 115 ) $ResultLabel = GUICtrlCreateLabel ( "", 100, 115, 2000, 2000 ) GUICtrlSetFont ( $ResultLabel, 8.5, 600 ) GUICtrlSetLimit ( -1, 200, 0 ) GUISetState ( @SW_SHOW, $Window ) While 1 $nMsg = GUIGetMsg() Select Case $nMsg = $GUI_EVENT_CLOSE Exit Case $nMsg = $Calculate If $Name1 = "Henk" Then MsgBox(4096,"", "Henk") ElseIf $Name1 = "Cas" Then MsgBox(4096,"", "Cas.") Else If $Name1 = "" And $Name2 = "" Then MsgBox(4096,"", "Empty!") Else MsgBox(4096,"", "Unknown") EndIf EndIf EndSelect WEnd Does anyone know why this isn't working? I just can't figure it out... Link to comment Share on other sites More sharing options...
youknowwho4eva Posted March 26, 2009 Share Posted March 26, 2009 (edited) Define isn't working. By isn't working you mean that it's not reading your input boxes? in your while loop replace $name1 with guictrlread($name1) and see what happens Edited March 26, 2009 by youknowwho4eva Giggity Link to comment Share on other sites More sharing options...
Rawox Posted March 26, 2009 Author Share Posted March 26, 2009 Well, maybe it's stupid... but that didn't really help me Link to comment Share on other sites More sharing options...
Yashied Posted March 26, 2009 Share Posted March 26, 2009 Does anyone know why this isn't working? I just can't figure it out..."If $Name1 = "Henk" Then" - This is wrong.If GUICtrlRead($Name1) = "Henk" Then My UDFs: iKey | FTP Uploader | Battery Checker | Boot Manager | Font Viewer | UDF Keyword Manager | Run Dialog Replacement | USBProtect | 3D Axis | Calculator | Sleep | iSwitcher | TM | NetHelper | File Types Manager | Control Viewer | SynFolders | DLL Helper Animated Tray Icons UDF Library | Hotkeys UDF Library | Hotkeys Input Control UDF Library | Caret Shape UDF Library | Context Help UDF Library | Most Recently Used List UDF Library | Icons UDF Library | FTP UDF Library | Script Communications UDF Library | Color Chooser UDF Library | Color Picker Control UDF Library | IPHelper (Vista/7) UDF Library | WinAPI Extended UDF Library | WinAPIVhd UDF Library | Icon Chooser UDF Library | Copy UDF Library | Restart UDF Library | Event Log UDF Library | NotifyBox UDF Library | Pop-up Windows UDF Library | TVExplorer UDF Library | GuiHotKey UDF Library | GuiSysLink UDF Library | Package UDF Library | Skin UDF Library | AITray UDF Library | RDC UDF Library Appropriate path | Button text color | Gaussian random numbers | Header's styles (Vista/7) | ICON resource enumeration | Menu & INI | Tabbed string size | Tab's skin | Pop-up circular menu | Progress Bar without animation (Vista/7) | Registry export | Registry path jumping | Unique hardware ID | Windows alignment More... Link to comment Share on other sites More sharing options...
Rawox Posted March 26, 2009 Author Share Posted March 26, 2009 Whoops Stupid! Link to comment Share on other sites More sharing options...
youknowwho4eva Posted March 26, 2009 Share Posted March 26, 2009 All I was saying is that saying a script isn't working is very vague. Next time say, I don't see why it only returns unknown. Technically the script was working Giggity 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