autoTester Posted March 3, 2010 Posted March 3, 2010 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"
funkey Posted March 3, 2010 Posted March 3, 2010 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 tobuild bigger and better idiot-proof programs, and the Universetrying to produce bigger and better idiots.So far, the Universe is winning.
PsaltyDS Posted March 3, 2010 Posted March 3, 2010 Look at _GUICtrlDTP_SetSystemTime() in the help file. Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
autoTester Posted March 4, 2010 Author Posted March 4, 2010 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)
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now