Sign in to follow this  
Followers 0
uznut

Macro Help

4 posts in this topic

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

Share this post


Link to post
Share on other sites



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.

Share this post


Link to post
Share on other sites

If <expression> Then statement

is in then help file what part of that did i miss? :D

Share this post


Link to post
Share on other sites

#4 ·  Posted (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 by JdeB

Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0