Jump to content
johnathanlee

Handle calendar date click

Recommended Posts

johnathanlee

I'm using AutoIt to automate the use of a Word plugin written in .NET.

It's a simple form with some controls on it but I can't find a direct way to fill textboxes, select checkboxes, etc. AutoIt Info doesn't show any infomation about the form and its controls.

So I'm working with mouse and keyboard simulation. I have no problem with textboxes and checkboxes but I don't know how to select a date in a calendar control.

It looks like this one, with no date field/box to fill.

Is there a simplier way than to write a long and complicate algoritm to click the right date (day-month-year)?

Share this post


Link to post
Share on other sites
FrancescoDiMuro
Posted (edited)

Good evening @johnathanlee, and welcome to the AutoIt forum :)

Usally, when you ask for help, is always raccomended to post the code you are working with, in order to see if we can help you starting from your code, or we have to think a little bit more about it :)

By the way, I can't try anything about Date/Time Picker at the moment, but I was "Googling" around, and I was thinking:

Can you write text in your Date/Time Picker?

For example, if you type manually a date in your control, does it take it?

Can you type the current date ( in the format of your country, obviously ) :)

Let us know :)

 

Best Regards.

Edited by FrancescoDiMuro

Click here to see my signature:

Spoiler

Thoughts:

  • I will always thank you for the time you spent for me.
    I'm here to ask, and from your response, I'd like to learn.
    By my knowledge, I can help someone else, and "that someone" could help in turn another, and so on.

/*--------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/

ALWAYS GOOD TO READ:

 

Share this post


Link to post
Share on other sites
FrancescoDiMuro
Posted (edited)

EDIT:
@johnathanlee
I tried to write directly in the Date/Time Picker, and it is possibile.
If you try to write current date ( in Italian format ), you can type:
0
8
/
0
7
/
2
0
1
8


And it works.
So, you can use Send() function :)
Hope it helps :)

Best Regards.

Edited by FrancescoDiMuro

Click here to see my signature:

Spoiler

Thoughts:

  • I will always thank you for the time you spent for me.
    I'm here to ask, and from your response, I'd like to learn.
    By my knowledge, I can help someone else, and "that someone" could help in turn another, and so on.

/*--------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/

ALWAYS GOOD TO READ:

 

Share this post


Link to post
Share on other sites
orbs

@FrancescoDiMuro, that control is not a standard date picker control. however you are correct in trying to automate that by keypress rather than mouse clicks, and this is something the OP should be investigating.

i will add that if you know where that date is going to end up (a Word data field?) you might want to put your desired date there directly, without going through that plugin UI.

Share this post


Link to post
Share on other sites
FrancescoDiMuro

Hey @orbs :)

I thought that the DateTime Picker was something like the control you can create with GUICtrlCreateMonthCal() function :)

I tried to write text in it, and it worked :)

But yes, in the control that the OP mentioned, I don't think you can't write text like the other one :)

So, I don't know :)

Never tried to automate that kind of control!

 

Best Regards.


Click here to see my signature:

Spoiler

Thoughts:

  • I will always thank you for the time you spent for me.
    I'm here to ask, and from your response, I'd like to learn.
    By my knowledge, I can help someone else, and "that someone" could help in turn another, and so on.

/*--------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/

ALWAYS GOOD TO READ:

 

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

×