Jump to content

Recommended Posts

I am trying to have the script type out the date of the last day of the previous month. it will add and subtract and anything els I need to the month "number" but when I do a IfEqual comand it does not think its equal to that number. see example script :)

SetEnv, notepad, C:\\WINDOWS\\system32\\notepad.exe

SetEnv,Year,%A_YEAR%

SetEnv,Month,%A_MON%

EnvDiv, Month, 1

IfGreaterOrEqual,Month,2,Goto,datefix1

IfLessOrEqual,Month,1,Goto,datefix2

datefix1:

EnvSub,Month,1

Goto,monthset

datefix2:

EnvAdd,Month,11

monthset:

Run, %notepad%

WinWaitActive,Untitled - Notepad

Send,%Month%-

IfEqual,%Month%,1,Send,31

IfEqual,%Month%,2,Send,28

IfEqual,%Month%,3,Send,31

IfEqual,%Month%,4,Send,30

IfEqual,%Month%,5,Send,31

IfEqual,%Month%,6,Send,30

IfEqual,%Month%,7,Send,31

IfEqual,%Month%,8,Send,31

IfEqual,%Month%,9,Send,30

IfEqual,%Month%,10,Send,31

IfEqual,%Month%,11,Send,30

IfEqual,%Month%,12,Send,31

Send,-%Year%{ENTER}

At last, after two thousand years of research, the illudium Q-36 explosive space modulator.Well, back to the old drawing board.

Link to post
Share on other sites
  • 5 weeks later...
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...