jbennett Posted October 21, 2008 Share Posted October 21, 2008 (edited) Hi, Does anyone know how I can add more days to @WDAY I was thinking @WDAY=1 & 2 & 3 But that doesn't seem to work Thanks Edited October 21, 2008 by jbennett Link to comment Share on other sites More sharing options...
oMBRa Posted October 21, 2008 Share Posted October 21, 2008 $WDAY = @WDAY now work with the variable Link to comment Share on other sites More sharing options...
martin Posted October 21, 2008 Share Posted October 21, 2008 Hi, Does anyone know how I can add more days to @WDAY I was thinking @WDAY=1 & 2 & 3 But that doesn't seem to work ThanksI have often wondered how to get more days in the week but have never succeeded so far. @WDAY read only variable which gives you the current day of the week. Look up Macros in the help. If you want to have a variable to hold a number of days then you need to use your own variable. $WeekDays = 1 & 2 & 3 Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script. Link to comment Share on other sites More sharing options...
jbennett Posted October 21, 2008 Author Share Posted October 21, 2008 would it not be possible to do the following$WeekDays = 1 & 2 & 3@wday=$weekdays???Cheers Link to comment Share on other sites More sharing options...
martin Posted October 21, 2008 Share Posted October 21, 2008 would it not be possible to do the following???CheersWell I did say @WDAY is read only and I did say look up Macros in the help.Read only has a special meaning but it's a bit complicated to explain. Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script. Link to comment Share on other sites More sharing options...
oMBRa Posted October 21, 2008 Share Posted October 21, 2008 Read only explain itself Link to comment Share on other sites More sharing options...
jbennett Posted October 21, 2008 Author Share Posted October 21, 2008 Just had a look at the macros but that just shows @WDAY in the list. Not sure of a way around this? thanks Link to comment Share on other sites More sharing options...
oMBRa Posted October 21, 2008 Share Posted October 21, 2008 what u want to do? Link to comment Share on other sites More sharing options...
weaponx Posted October 21, 2008 Share Posted October 21, 2008 I can't figure out what you are trying to accomplish, be more descriptive. Link to comment Share on other sites More sharing options...
jbennett Posted October 21, 2008 Author Share Posted October 21, 2008 Hi, What I want my code to do is the following: Check if it's Monday, Wednesday, Thursday or Friday If it is these days then it runs a certain piece of code. and my other piece of code checks if it's Tuesday and runs a piece of code (this ofcourse works perfectly with @wday) Link to comment Share on other sites More sharing options...
oMBRa Posted October 21, 2008 Share Posted October 21, 2008 so why do u need to modify @WDAY ? Link to comment Share on other sites More sharing options...
PsaltyDS Posted October 21, 2008 Share Posted October 21, 2008 Hi, What I want my code to do is the following: Check if it's Monday, Wednesday, Thursday or Friday If it is these days then it runs a certain piece of code. and my other piece of code checks if it's Tuesday and runs a piece of code (this ofcourse works perfectly with @wday) If StringInStr("2,4,5,6", String(@WDAY)) Then MsgBox(64, "Ta Da!", "It's Monday, Wednesday, Thursday, or Friday!") Switch @WDAY Case 2,4,5,6 MsgBox(64, "Ta Da!", "It's Monday, Wednesday, Thursday, or Friday!") EndSwitch Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
weaponx Posted October 21, 2008 Share Posted October 21, 2008 (edited) Switch @WDAY Case 2,4,5,6 MsgBox(0,"","The current day is Monday, Wednesday, Thursday, or Friday") Case Else MsgBox(0,"","The current day is NOT Monday, Wednesday, Thursday, or Friday") EndSwitch Damn penguin! Edited October 21, 2008 by weaponx Link to comment Share on other sites More sharing options...
PsaltyDS Posted October 21, 2008 Share Posted October 21, 2008 Switch @WDAY Case 2,4,5,6 MsgBox(0,"","The current day is Monday, Wednesday, Thursday, or Friday") Case Else MsgBox(0,"","The current day is NOT Monday, Wednesday, Thursday, or Friday") EndSwitch Damn penguin! Damn hirsute ball of toothpicks! If StringRegExp(String(@WDAY), "[2456]", 0) Then MsgBox(64, "Ta Da!", "It's Monday, Wednesday, Thursday, or Friday!") Else MsgBox(64, "Relax", "It's not Monday, Wednesday, Thursday, or Friday!") EndIf Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
weaponx Posted October 21, 2008 Share Posted October 21, 2008 I had to look up the definition of hirsute. Link to comment Share on other sites More sharing options...
martin Posted October 21, 2008 Share Posted October 21, 2008 I had to look up the definition of hirsute.You should have asked me, it's a suit that a woman wears. Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script. Link to comment Share on other sites More sharing options...
weaponx Posted October 21, 2008 Share Posted October 21, 2008 You should have asked me, it's a suit that a woman wears. Link to comment Share on other sites More sharing options...
trancexx Posted October 21, 2008 Share Posted October 21, 2008 Damn hirsute ball of toothpicks! If StringRegExp(String(@WDAY), "[2456]", 0) Then MsgBox(64, "Ta Da!", "It's Monday, Wednesday, Thursday, or Friday!") Else MsgBox(64, "Relax", "It's not Monday, Wednesday, Thursday, or Friday!") EndIf Jesus... where did this come from? Here's obfuscated version $e = Not (StringRegExp(String(@WDAY), "[2456]", 0) And (MsgBox(64, "Ta Da!", "It's Monday, Wednesday, Thursday, or Friday!"))) And MsgBox(64, "Relax", "It's not Monday, Wednesday, Thursday, or Friday!") ♡♡♡ . eMyvnE Link to comment Share on other sites More sharing options...
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