AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Next day of the week's 3-letter A_DDD

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
Neil Mc
Guest





PostPosted: Tue Sep 26, 2006 11:30 am    Post subject: Next day of the week's 3-letter A_DDD Reply with quote

Is it possible to use a built in function to get the 3-letters for the NEXT day. I tried using the math function to add by Timeunit = days, but it returns a numeric value instead of 3-letters.

Day_Before := %A_DDD%
EnvAdd, Day_Before, 1, days
MsgBox, %A_DDD% is followed by %Day_Before%
Return

(that gives me result: Tue is followed by 20060927072821)

I could be a conditional function to calculate the 3-letters I want based off the current %A_DDD%, but my script is already very large, and I would like to keep it as small as possible by using built in functions.
Back to top
PhiLho



Joined: 27 Dec 2005
Posts: 6721
Location: France (near Paris)

PostPosted: Tue Sep 26, 2006 11:55 am    Post subject: Reply with quote

I am surprised that you get a result at all!
Day_Before := %A_DDD% should be Day_Before := A_DDD and isn't a good base of EnvAdd date calculation...
Code:
Day_Before := A_Now
EnvAdd, Day_Before, 1, days
FormatTime Day_Before, %Day_Before%, ddd
MsgBox, %A_DDD% is followed by %Day_Before%
Return

_________________
vPhiLho := RegExReplace("Philippe Lhoste", "^(\w{3})\w*\s+\b(\w{3})\w*$", "$1$2")
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group