Comparison of Day Names Failing Although Appearing To Be The Same
Comparison of Day Names Failing Although Appearing To Be The Same
- Subject: Comparison of Day Names Failing Although Appearing To Be The Same
- From: Anthony Fedd <email@hidden>
- Date: Mon, 16 May 2016 20:32:57 +0000 (GMT)
I have cobbled together an applescript from a couple of sources to use with Keyboard Maestro to determine a date either in the past or future that is failing although the day names compared for the repeat loop appear to be the same.
Specifically, the variable ThisDay (set to Sunday or Monday or Tuesday, etc) is set in Keyboard Maestro and compared to the Weekday of theDate, but it never matches! If I replace the variable, ThisDay, with Sunday or Monday or Tuesday, etc, the repeat loop successfully compares and matches.
tell application "Keyboard Maestro Engine"
set ThisDay to value of variable "DayName_Text"
set Adjustment to value of variable "Number_Adjustment_Days"
end tell
set theDate to (current date) + (Adjustment) * days
display dialog "Weekday of theDate = " & weekday of theDate & " And ThisDay = " & ThisDay
repeat until weekday of theDate = ThisDay
display dialog "Weekday of theDate = " & weekday of theDate & " And ThisDay = " & ThisDay
set theDate to theDate + 1 * days
end repeat
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden