gcue Posted April 18, 2008 Share Posted April 18, 2008 is this possible? If $broadcast="2" AND status<>"" Then Link to comment Share on other sites More sharing options...
PsaltyDS Posted April 18, 2008 Share Posted April 18, 2008 is this possible?If $broadcast="2" AND status<>"" ThenWhy ask? Code a three line script to test it! What happens? Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
James Posted April 18, 2008 Share Posted April 18, 2008 You have it right there Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
gcue Posted April 18, 2008 Author Share Posted April 18, 2008 u have it there? i tried what i wrote, didnt work. Link to comment Share on other sites More sharing options...
James Posted April 18, 2008 Share Posted April 18, 2008 (edited) $v1 = 10 $v2 = 20 $v3 = True If $v3 = True And $v2 - $v1 = 10 Then MsgBox(0, "", "All conditions met!") EndIf Edited April 18, 2008 by JamesB Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
henry1 Posted April 18, 2008 Share Posted April 18, 2008 Hi, i tried what i wrote, didnt work. If $broadcast="2" AND status<>"" Then Can you please let us know what do you want to do with these? For example: $broadcast = "2" $status = "" if $broadcast = "2" and $status = "" Then MsgBox (0, "Result", "True") Else MsgBox (0, "Result", "False") EndIf It will have a result as "True" $broadcast = "1" $status = "" if $broadcast = "2" and $status = "" Then MsgBox (0, "Result", "True") Else MsgBox (0, "Result", "False") EndIf It will have a result as "False" Henry Link to comment Share on other sites More sharing options...
weaponx Posted April 18, 2008 Share Posted April 18, 2008 (edited) When you are comparing numbers, don't use quotes. EDIT: Typo Edited April 18, 2008 by weaponx Link to comment Share on other sites More sharing options...
James Posted April 18, 2008 Share Posted April 18, 2008 When you are comapring numbers, don't use quotes.Because then you would be comparing... Strings Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
gcue Posted April 18, 2008 Author Share Posted April 18, 2008 gotcha..thank you all for your help!have a good weekend!Because then you would be comparing... Strings Link to comment Share on other sites More sharing options...
henry1 Posted April 18, 2008 Share Posted April 18, 2008 Hi Weaponx,When you are comparing numbers, don't use quotes.EDIT: TypoThanks for the input. Finally, OP can get his answer Henry Link to comment Share on other sites More sharing options...
aGorilla Posted April 18, 2008 Share Posted April 18, 2008 A couple of other quick comments. Empty strings are 'false', so you don't need the '<>""' at all. When in doubt, use parens (in fact, it's a good habit to use them even when you're not in doubt). If $status And ($broadcast = 2) Then msgbox(0,'','broadcast is 2, and we have a status') else msgbox(0,'','broadcast is not 2, or we have no status') EndIf Search AutoItScript.com via Google 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