| View previous topic :: View next topic |
| Author |
Message |
Chessking
Joined: 17 Jun 2007 Posts: 101 Location: Florida
|
Posted: Wed Jan 13, 2010 1:52 am Post subject: month and year |
|
|
Just trying to get output of Current month and year
| Code: |
;
; AutoHotkey Version: 1.x
; Language: English
; Platform: Win9x/NT
; Author: A.N.Other <myemail@nowhere.com>
;
; Script Function:
; Template script (you can customize this template by editing "ShellNew\Template.ahk" in your Windows folder)
;
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
F5::
FormatTime, dateString,D8
send month and year
send %dateString%
Sleep, 100
return
F9::ExitApp
|
Thanks in advance |
|
| Back to top |
|
 |
poo_noo
Joined: 08 Dec 2006 Posts: 248 Location: Sydney Australia
|
Posted: Wed Jan 13, 2010 2:08 am Post subject: |
|
|
maybe this will help
| Code: |
;
; AutoHotkey Version: 1.x
; Language: English
; Platform: Win9x/NT
; Author: A.N.Other <myemail@nowhere.com>
;
; Script Function:
; Template script (you can customize this template by editing "ShellNew\Template.ahk" in your Windows folder)
;
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
F5::
msgbox about to send %A_MM%%A_YYYY%
send %A_MM%%A_YYYY%
Sleep, 100
return
F9::ExitApp |
_________________ Paul O |
|
| Back to top |
|
 |
Chessking
Joined: 17 Jun 2007 Posts: 101 Location: Florida
|
Posted: Wed Jan 13, 2010 3:07 am Post subject: |
|
|
very close.
| Code: |
F5::
send %A_MMMM% %A_YYYY%
Sleep, 100
return
F9::ExitApp
|
now, If I can subtract 90 days.
script shows
January 2010
I need it to subtract 90 days and show what every month it is and year
example..
it takes the current date and subtract 90 days and output would be month and year.
October 2009 |
|
| Back to top |
|
 |
poo_noo
Joined: 08 Dec 2006 Posts: 248 Location: Sydney Australia
|
Posted: Wed Jan 13, 2010 3:15 am Post subject: |
|
|
try this
| Code: |
;
; AutoHotkey Version: 1.x
; Language: English
; Platform: Win9x/NT
; Author: A.N.Other <myemail@nowhere.com>
;
; Script Function:
; Template script (you can customize this template by editing "ShellNew\Template.ahk" in your Windows folder)
;
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
F5::
Date := A_Now
Date += -90,D
FormatTime Date, %Date%, MM yyyy
msgbox about to send %date%
send %date%
Sleep, 100
return
F9::ExitApp
|
_________________ Paul O |
|
| Back to top |
|
 |
Chessking
Joined: 17 Jun 2007 Posts: 101 Location: Florida
|
Posted: Wed Jan 13, 2010 3:35 am Post subject: |
|
|
That does the trick..
use a varible.. kewl.
thanks!
| Code: |
F5::
Date := A_Now
Date += -90,D
FormatTime Date, %Date%, MMMM yyyy
send %date%
Sleep, 100
return
F9::ExitApp
|
|
|
| Back to top |
|
 |
|