uznut Posted May 7, 2004 Share Posted May 7, 2004 i was trying to get these macros to work they run but they don't work the way i want them too If "@wday 1" Then Run("notepad.exe") If "@wday 2" Then Run("notepad.exe") If "@wday 3" Then Run("notepad.exe") If "@wday 4" Then Run("notepad.exe") If "@wday 5" Then Run("notepad.exe") If "@wday 6" Then exit If "@wday 7" Then Run("notepad.exe") ive tryed this also Func_datedayofweek $idaynum = If "@wday 1" then Run("notepad.exe") $idaynum = If "@wday 2" Then Run("notepad.exe") $idaynum = If "@wday 3" Then Run("notepad.exe") $idaynum = If "@wday 4" then Run("notepad.exe") $idaynum = If "@wday 5" then Run("notepad.exe") $idaynum = If "@wday 6" then exit $idaynum = If "@wday 7" then Run("notepad.exe") EndFunc Link to comment Share on other sites More sharing options...
pekster Posted May 7, 2004 Share Posted May 7, 2004 The If command requires a condition, which you have not provided. Check the manual for the proper syntax. [font="Optima"]"Standing in the rain, twisted and insane, we are holding onto nothing.Feeling every breath, holding no regrets, we're still looking out for something."[/font]Note: my projects are off-line until I can spend more time to make them compatable with syntax changes. Link to comment Share on other sites More sharing options...
uznut Posted May 7, 2004 Author Share Posted May 7, 2004 If <expression> Then statement is in then help file what part of that did i miss? Link to comment Share on other sites More sharing options...
Developers Jos Posted May 7, 2004 Developers Share Posted May 7, 2004 (edited) "@wday 1" is a string because it between double qoutes....this should work for you:If @wday <> 6 Then Run("notepad.exe")check out : AutoIt\Language reference\ conditional statements in the help file to understand expressions.. Edited May 7, 2004 by JdeB SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. 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