AutoHotkey Community

It is currently May 27th, 2012, 1:17 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: month and year
PostPosted: January 13th, 2010, 2:52 am 
Offline

Joined: June 17th, 2007, 12:34 pm
Posts: 101
Location: Florida
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


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 13th, 2010, 3:08 am 
Offline

Joined: December 8th, 2006, 5:17 am
Posts: 248
Location: Sydney Australia
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


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 13th, 2010, 4:07 am 
Offline

Joined: June 17th, 2007, 12:34 pm
Posts: 101
Location: Florida
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


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 13th, 2010, 4:15 am 
Offline

Joined: December 8th, 2006, 5:17 am
Posts: 248
Location: Sydney Australia
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


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 13th, 2010, 4:35 am 
Offline

Joined: June 17th, 2007, 12:34 pm
Posts: 101
Location: Florida
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


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: Bing [Bot], iDrug, Ohnitiel and 22 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group