• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Comparison of Day Names Failing Although Appearing To Be The Same
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: Comparison of Day Names Failing Although Appearing To Be The Same
      • From: Christopher Stone <email@hidden>
  • Prev by Date: Re: ASObjC – Find Files by File Extension
  • Next by Date: Re: Comparison of Day Names Failing Although Appearing To Be The Same
  • Previous by thread: Re: ASObjC – Find Files by File Extension
  • Next by thread: Re: Comparison of Day Names Failing Although Appearing To Be The Same
  • Index(es):
    • Date
    • Thread