Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Programmatically control a pop up calendar
#1
The application I am trying to automate has a popup Calendar control. I need to be able to take today's date, do some math to it, and select it on a calendar control. I found some code on this site that feels like it should work, but I must be missing something.

I'm very new to QM and this may just be somthing simple.

Code:
Copy      Help
def MCM_FIRST 0x1000
def MCM_SETCURSEL (MCM_FIRST + 2)

DATE d="10/5/2007"
d.tosystemtime(+share)

int mc=win("" "SysMonthCal32")
SendMessage mc MCM_SETCURSEL 0 share(mc)

When I run this, I get an error "window not found", the control really is "Sysmonthcal32". I have tried some other entries for the win() function, but with no luck. The window that contains the control also has an ""OK" and "Cancel" buttons.

How can I specify the control directly?
This was from an old post, QM has changed, Operating systems have changed, is this the problem? (running XP sp2)
Is there an easier way? the only keystrokes I could find that it responds to are home, end, Pgup, Pgdn.


Thanks to Gintaras for the code snipit


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)