Sign in to follow this  
Followers 0
jdaly

New to AutoIT simple question

8 posts in this topic

I am very new to AutoIT and just playing around with it right now. I am just trying to figure out a way of sending todays date to a notepad file.

Basically i just want to have autoit send "Todays date is 12-7-06" but cant figure out how. I checked the help file but it doesnt contain any info on variables for dates.

Thanks

Share this post


Link to post
Share on other sites



Run("notepad.exe")

Send("@YDAY @MON @MDAY")

search @mon in the helpfile


"Its not about the 30 inch 1080p display, or the SLI 8800 ultras, or the DDR3 memory. It's about when you turn on your PC, does it return the favor?"Math is like sex. Sure, it may give some practical results, but that is not why we do it

Share this post


Link to post
Share on other sites

Run("notepad.exe")

Send("@YDAY @MON @MDAY")

search @mon in the helpfile

Did you try to run the code that you posted?

[size="1"][font="Arial"].[u].[/u][/font][/size]

Share this post


Link to post
Share on other sites

...Basically i just want to have autoit send "Todays date is 12-7-06" but cant figure out how...

Run("notepad.exe")
WinWait("Untitled - Notepad")
Send("Today's date is " & @MON & "-" & @MDAY & "-" & @YEAR)

Send("{ENTER 2}")
Send("{F5}")
maybe just F5 will do for you or this info: http://support.microsoft.com/kb/260563

[size="1"][font="Arial"].[u].[/u][/font][/size]

Share this post


Link to post
Share on other sites

I checked the help file but it doesnt contain any info on variables for dates.

Thanks

If you look a little closer, the helpfile has a Date Macros section. Cheers.


IE Dev ToolbarMSDN: InternetExplorer ObjectMSDN: HTML/DHTML Reference Guide[quote]It is surprising what a man can do when he has to, and how little most men will do when they don't have to. - Walter Linn[/quote]--------------------[font="Franklin Gothic Medium"]Post a reproducer with less than 100 lines of code.[/font]

Share this post


Link to post
Share on other sites

Well Im not really doing it in notepad. I just said that because its similar to my application and the question was the same.

Thanks to all for the help. So far AutoIT looks like a really useful program.

Share this post


Link to post
Share on other sites

@jdaly,

Welcome to the forum...

@Dethredic,

Sorry about that - I know that there is not always time to test code before you post.


[size="1"][font="Arial"].[u].[/u][/font][/size]

Share this post


Link to post
Share on other sites

NP

I was just giving him the idea so he can do it himself


"Its not about the 30 inch 1080p display, or the SLI 8800 ultras, or the DDR3 memory. It's about when you turn on your PC, does it return the favor?"Math is like sex. Sure, it may give some practical results, but that is not why we do it

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0