AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

month and year

 
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
Chessking



Joined: 17 Jun 2007
Posts: 101
Location: Florida

PostPosted: Wed Jan 13, 2010 1:52 am    Post subject: month and year Reply with quote

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
View user's profile Send private message
poo_noo



Joined: 08 Dec 2006
Posts: 248
Location: Sydney Australia

PostPosted: Wed Jan 13, 2010 2:08 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Chessking



Joined: 17 Jun 2007
Posts: 101
Location: Florida

PostPosted: Wed Jan 13, 2010 3:07 am    Post subject: Reply with quote

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
View user's profile Send private message
poo_noo



Joined: 08 Dec 2006
Posts: 248
Location: Sydney Australia

PostPosted: Wed Jan 13, 2010 3:15 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Chessking



Joined: 17 Jun 2007
Posts: 101
Location: Florida

PostPosted: Wed Jan 13, 2010 3:35 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group