Sign in to follow this  
Followers 0
Phenom

how to check if an input box is empty

11 posts in this topic

if $input1 == "" doesn't work.

Share this post


Link to post
Share on other sites

Try to use if $input1 = '' , if $input1 = ' ' or if $input1 = " " .

Maybe one of them will work :mellow:

Share this post


Link to post
Share on other sites

But if we use that if it will wont check if the inputbox have the value 0 ?

Share this post


Link to post
Share on other sites

None of those work.

Share this post


Link to post
Share on other sites

First of all, are you talking about an InputBox or a GuiCtrlCreateInput? If you are using InputBox, $input1 == "" will work. If you are using the GuiCtrlCreateInput method you will need to use GuiCtrlRead($input1) to get the contents of the input box.

In the future, provide as much detail as possible. Saying that something doesn't work does not really give us much information. Always provide the code you have tried so that we can assess the problem.

Share this post


Link to post
Share on other sites

Yeah, I was talking about the inputbox for the gui, GuiCtrlCreateInput.

Share this post


Link to post
Share on other sites

#11 ·  Posted (edited)

Hi,

as Zorphnog suggests:

$input1 = GuiCtrlCreateInput.......

If GuiCtrlRead($input1) = "" Then MsgBox (0,"Empty.....", "....Input detected!")

;-))

Stefan

Edited by 99ojo

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  
Followers 0