Jump to content

Macro Help


Recommended Posts

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

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

  • Developers

"@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

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

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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...