I want, each time the following scrip is run, to work from the current date and either add 1 or 3 days...depending on whether there's weekend involved or not. (3 days on Fridays and 1 day on Mondays thru Thursdays.)
What is happening is that it is remembering the previous ddate created by the script and then adding 1 or 3 days to that rather than the day that it is run. Basically, I need to reset either the nDate or %date% to current date after is run. Any help will be appreciated.
^1::
IF A_WDAY = 6
{
Date += 3, Days
FormatTime, nDate, %Date%, MM/dd/yyyy
}
ELSE IF A_WDAY <> 6
{
Date += 1, Days
FormatTime, nDate, %Date%, MM/dd/yyyy
}
Send, Please send me a confirmation of the attached Purchase Order and let me know when it will ship. {enter}
Send, {enter}
Send, Reminder set for:
Send, {space}
Send, %nDate% {enter}
Send, {enter}
Send, Please send tracking when available. {enter}
Send, ^#G
Send, {tab 2}
Send, %nDate% {tab 4}
Send, {space} {tab 2}
send, 9 am {enter}
Return
Script keeps adding unwanted days each time it's run
Re: Script keeps adding unwanted days each time it's run
Code: Select all
^1::
Date := A_Now
IF A_WDAY = 6
...
Re: Script keeps adding unwanted days each time it's run
Awesome! Thanks so much. Such a simple fix. Greatly appreciated.