litlmike 1 Posted October 10, 2006 Share Posted October 10, 2006 What I Want:If Day of the week is Friday, Saturday or Sunday, then a Traytip appears to let me know. Otherwise, do nothing.What Currently Happens:TrayTip appears on every day, not just Friday thru Sunday.This is the most relevant part of the script, but let me know if I need to paste the rest. It is a small script.Thanks in Advance.If _DateDayOfWeek($iWeekDay) = "Friday" or "Saturday" or "Sunday" Then TrayTip ( "That Day is...", _DateDayOfWeek($iWeekDay), 5) EndIf] _ArrayPermute()_ArrayUnique()Excel.au3 UDF Link to post Share on other sites
GaryFrost 20 Posted October 10, 2006 Share Posted October 10, 2006 If _DateDayOfWeek($iWeekDay) = "Friday" or _DateDayOfWeek($iWeekDay) = "Saturday" or _DateDayOfWeek($iWeekDay) = "Sunday" Then TrayTip ( "That Day is...", _DateDayOfWeek($iWeekDay), 5) EndIf SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to post Share on other sites
litlmike 1 Posted October 10, 2006 Author Share Posted October 10, 2006 If _DateDayOfWeek($iWeekDay) = "Friday" or _DateDayOfWeek($iWeekDay) = "Saturday" or _DateDayOfWeek($iWeekDay) = "Sunday" Then TrayTip ( "That Day is...", _DateDayOfWeek($iWeekDay), 5) EndIfGary FTW! Wow that was and uber fast reply. I posted, hit refresh and there is Gary...nice. Well I obviously see the difference, but I dont really understand the difference. Can you enlighten me? Is it, that if I did it my original way, that I am saying: "If _DateDayOfWeek($iWeekDay) produces the result "Friday" or If the text "Saturday " or "sunday" THen..." I assume the or does not carry the form of "If X ="? _ArrayPermute()_ArrayUnique()Excel.au3 UDF Link to post Share on other sites
GaryFrost 20 Posted October 10, 2006 Share Posted October 10, 2006 the 2 or's with no condition other than text in my mind would always evaluate to true SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to post Share on other sites
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