crash748 Posted October 30, 2009 Share Posted October 30, 2009 (edited) I have a problem with my script...here the part witch bug me:$x=0 If $x <> "NONE" Then msgbox(0,"",$x&" <> NONE")Did anybody can explain to me why this don't work?For me this is suppose to pop the msgbox but nothing the expression is calculate as false Edited October 30, 2009 by crash748 Link to comment Share on other sites More sharing options...
Bert Posted October 30, 2009 Share Posted October 30, 2009 (edited) $x is a number being declared by a variable "none" is a word. change "none" to $x in your code. Edited October 30, 2009 by Volly The Vollatran project My blog: http://www.vollysinterestingshit.com/ Link to comment Share on other sites More sharing options...
crash748 Posted October 30, 2009 Author Share Posted October 30, 2009 $x is a number"none" is a word. change "none" to $x in your code.But if i put $x=1 it's work, that make no sense for me. Link to comment Share on other sites More sharing options...
Mison Posted October 30, 2009 Share Posted October 30, 2009 (edited) x = 0 ; 0 is a number, or as a Boolean value(false) "NONE" ; string... So when you compare "0" = "NONE", it turns out false.. Replace "NONE" with False or 0 to make this statement true EDIT:My bad, I didn't see the "<>" sign.. 0<>"none" supposed to be true Edited October 30, 2009 by Mison Hi ;) Link to comment Share on other sites More sharing options...
Bert Posted October 30, 2009 Share Posted October 30, 2009 Look here: http://www.autoitscript.com/autoit3/docs/intro/lang_datatypes.htm The Vollatran project My blog: http://www.vollysinterestingshit.com/ Link to comment Share on other sites More sharing options...
crash748 Posted October 30, 2009 Author Share Posted October 30, 2009 x = 0 ; 0 is a number, or as a Boolean value(false) "NONE" ; string... So when you compare "0" = "NONE", it turns out false.. Replace "NONE" with False or 0 to make this statement true EDIT:My bad, I didn't see the "<>" sign.. 0<>"none" supposed to be true You are right but there is the problems! Autoit Make it turn true! I'am using AutoIt 3.3.0.0 try this little code: Local $x = 0 If $x = "blue" Then MsgBox(0, "", "$x = blue") AutoIt make it as true! I don't undestand! Link to comment Share on other sites More sharing options...
Mison Posted October 30, 2009 Share Posted October 30, 2009 Thanks Volly, now I understand... Hi ;) Link to comment Share on other sites More sharing options...
crash748 Posted October 30, 2009 Author Share Posted October 30, 2009 (edited) I know understand too! Thanks Volly! Edited October 30, 2009 by crash748 Link to comment Share on other sites More sharing options...
Bert Posted October 30, 2009 Share Posted October 30, 2009 Your Welcome. That AutoIt help file is packed with cool stuff. You can also take a look at the tutorials on YouTube if you want to learn more. Look for the link in my signature. The Vollatran project My blog: http://www.vollysinterestingshit.com/ Link to comment Share on other sites More sharing options...
Mison Posted October 30, 2009 Share Posted October 30, 2009 I think this link - Uten's tutorial on using arrays - A Must Read! - is broken. Anyways thanks a lot for sharing Hi ;) Link to comment Share on other sites More sharing options...
Bert Posted October 30, 2009 Share Posted October 30, 2009 let me see what happened there. I didn't know it was broke. Thanks for the heads up! The Vollatran project My blog: http://www.vollysinterestingshit.com/ Link to comment Share on other sites More sharing options...
Bert Posted October 30, 2009 Share Posted October 30, 2009 Fixed. Thanks! The Vollatran project My blog: http://www.vollysinterestingshit.com/ Link to comment Share on other sites More sharing options...
bo8ster Posted October 30, 2009 Share Posted October 30, 2009 You can also take a look at the tutorials on YouTube if you want to learn more. Look for the link in my signature.YouTube help, I never knew! I had only read the first 3 lines of ur sig - they are good. Post your code because code says more then your words can. SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y. Use Opt("MustDeclareVars", 1)[topic="84960"]Brett F's Learning To Script with AutoIt V3[/topic][topic="21048"]Valuater's AutoIt 1-2-3, Class... is now in Session[/topic]Contribution: [topic="87994"]Get SVN Rev Number[/topic], [topic="93527"]Control Handle under mouse[/topic], [topic="91966"]A Presentation using AutoIt[/topic], [topic="112756"]Log ConsoleWrite output in Scite[/topic] 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