Shifthappens Posted December 27, 2007 Author Share Posted December 27, 2007 That's the point... & is not listed as and acceptable conditional statementI'm sorry, i'm a bit slow compared to others. Although, I had an earlier statement that worked fine with it, so i'm curious, what does the & statement literally translate as in an if statement?By the way, thanks for all the help guys, I really appreciate it. Link to comment Share on other sites More sharing options...
SpookMeister Posted December 27, 2007 Share Posted December 27, 2007 I'm sorry, i'm a bit slow compared to others. Although, I had an earlier statement that worked fine with it, so i'm curious, what does the & statement literally translate as in an if statement?By the way, thanks for all the help guys, I really appreciate it.I think If statements check for a NON-FALSE condition to decide to do things... if whatever you are testing is not NULL or ZERO it will fire (I could be wrong here) [u]Helpful tips:[/u]If you want better answers to your questions, take the time to reproduce your issue in a small "stand alone" example script whenever possible. Also, make sure you tell us 1) what you tried, 2) what you expected to happen, and 3) what happened instead.[u]Useful links:[/u]BrettF's update to LxP's "How to AutoIt" pdfValuater's Autoit 1-2-3 Download page for the latest versions of Autoit and SciTE[quote]<glyph> For example - if you came in here asking "how do I use a jackhammer" we might ask "why do you need to use a jackhammer"<glyph> If the answer to the latter question is "to knock my grandmother's head off to let out the evil spirits that gave her cancer", then maybe the problem is actually unrelated to jackhammers[/quote] Link to comment Share on other sites More sharing options...
Shifthappens Posted December 27, 2007 Author Share Posted December 27, 2007 I think If statements check for a NON-FALSE condition to decide to do things... if whatever you are testing is not NULL or ZERO it will fire (I could be wrong here)Well in the IF statement in which I used the &'s two times, it was only comparing variables and no direct numbers so maybe that was relevant? Either way, thanks for the help, about to test what you gave me earlier. Link to comment Share on other sites More sharing options...
The Kandie Man Posted December 27, 2007 Share Posted December 27, 2007 I'm sorry, i'm a bit slow compared to others. Although, I had an earlier statement that worked fine with it, so i'm curious, what does the & statement literally translate as in an if statement? By the way, thanks for all the help guys, I really appreciate it.You talking about this?If '1'&'2'&'3'&'4' = '1234' Then Msgbox(0,"Match","A match has been found.") Else Msgbox(0,"No Match","It just didn't match.") Endif In any case, ampersands are NOT logical operators in AutoIt. When used in an If statement, they do only what they always do in AutoIt, concatenate strings. - The Kandie Man ;-) "So man has sown the wind and reaped the world. Perhaps in the next few hours there will no remembrance of the past and no hope for the future that might have been." & _"All the works of man will be consumed in the great fire after which he was created." & _"And if there is a future for man, insensitive as he is, proud and defiant in his pursuit of power, let him resolve to live it lovingly, for he knows well how to do so." & _"Then he may say once more, 'Truly the light is sweet, and what a pleasant thing it is for the eyes to see the sun.'" - The Day the Earth Caught Fire Link to comment Share on other sites More sharing options...
SpookMeister Posted December 27, 2007 Share Posted December 27, 2007 To illustrate my point: If "Bob" Then MsgBox(0,"","Apparently Bob is true") [u]Helpful tips:[/u]If you want better answers to your questions, take the time to reproduce your issue in a small "stand alone" example script whenever possible. Also, make sure you tell us 1) what you tried, 2) what you expected to happen, and 3) what happened instead.[u]Useful links:[/u]BrettF's update to LxP's "How to AutoIt" pdfValuater's Autoit 1-2-3 Download page for the latest versions of Autoit and SciTE[quote]<glyph> For example - if you came in here asking "how do I use a jackhammer" we might ask "why do you need to use a jackhammer"<glyph> If the answer to the latter question is "to knock my grandmother's head off to let out the evil spirits that gave her cancer", then maybe the problem is actually unrelated to jackhammers[/quote] 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