Jump to content
Sign in to follow this  
autoTester

How to set SysDateTimePick321

Recommended Posts

autoTester

Hi,

I'm relatively new in programming with autoIT. Try to automate the usage of a given program written in C++.

There's a calendar in it where the autoit Info Tool says the class is SysDateTimePick321. I have to change the year.

Im able to get the Date that was set from the program but I can't manipulate it.

What I was trying is the following:

$hdate = ControlGetHandle($pHWnd, "", "[CLASS:SysDateTimePick32; ID:1190]")
$vDate = ControlGetText($pHWnd, "", $hdate)
$vNewDate = StringReplace($vDate, "2010", "2011")
ControlSetText($pHWnd, "", $hdate, $vNewDate, 1)

$vDate is something like: "Mi 03.03.2010 12:32"

Share this post


Link to post
Share on other sites
funkey

I don't think this is possible without MouseClick and Send.

You could reset the system time to 2011 and then open the given program written in C++.


Programming today is a race between software engineers striving to
build bigger and better idiot-proof programs, and the Universe
trying to produce bigger and better idiots.
So far, the Universe is winning.

Share this post


Link to post
Share on other sites
autoTester

Thanks, but Setting the Systemtime didn't work.

But I found a solution:

ControlClick($pHWnd, "", "[CLASS:SysDateTimePick32; ID:1190]")
ControlSend($pHWnd, "", "[CLASS:SysDateTimePick32; ID:1190]", @YEAR + 1)

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.