WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

Time - Timer and Date Functions
plus

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

Sendkey for current date in format MMDDYY

Keywords:   Sendkey for current date in format MMDDYY	  IntControl(41,0,0,0,0)

Question:

I wish to run a process within an open program at night. The process requires key entry of the current date in format MMDDYY. Note: this will be wun with the compiler.

Answer:

;Return 2 digit year
IntControl(41,0,0,0,0)


;Get Current date
date = TimeYMDHMS()
year = ItemExtract(1,date,":") 
month = ItemExtract(2,date,":")  
day = ItemExtract(3,date,":") 
str = StrCat(month,day,year)

SendKeysTo(WindowTitle,str) 

Article ID:   W14981
File Created: 2001:11:08:12:41:18
Last Updated: 2001:11:08:12:41:18