Jump to content

Have AutoControll fill in a specialtype of fields?


sazen
 Share

Recommended Posts

Hi,

I've been reading the AutoIt helpfile, but I haven't been able to figure this one out.

I want AutoIt to fill the fields (as seen on the attached picture) with the variables $StartTime $EndTime and $Date

The variables are in style with _DateNow and _TimeNow

One problem is that the numbers in the fields must be filled in one by one. I.e to fill YEAR-MONTH-DAY, I first need to click YEAR and fill it, and then click MONTH and fill it, and so on. Basically I can't input 2005-08-20 at once. Same goes with the timefield.

I was wondering if anyone has a hint for a solution?

Thanks a lot, in advance. :)

Link to comment
Share on other sites

Hi,

I've been reading the AutoIt helpfile, but I haven't been able to figure this one out.

I want AutoIt to fill the fields (as seen on the attached picture) with the variables $StartTime $EndTime and $Date

The variables are in style with _DateNow and _TimeNow

One problem is that the numbers in the fields must be filled in one by one. I.e to fill YEAR-MONTH-DAY, I first need to click YEAR and fill it, and then click MONTH and fill it, and so on. Basically I can't input 2005-08-20 at once. Same goes with the timefield.

I was wondering if anyone has a hint for a solution?

Thanks a lot, in advance. :whistle:

<{POST_SNAPBACK}>

you could try "mousemove" "mouseclick" "send"

[right][font="Courier New"]...Run these streets all day, I can sleep when I die.[/font] [/right]

Link to comment
Share on other sites

I am not sure what the format of _DateNow and/or _TimeNow() is, but I will have to assume you are going to need to split (using StringSplit()) the dates up, then enter them using the Send() function. I would also check to see if you could send a tab (Send("{TAB}")) to get into the next field (it is the universal standard for moving around on forms).

Let me know if you need more info. Everything should be in the helpfile. Use the search function. Its all there :whistle:.

JS

Edit: Added StringSplit()

Edited by JSThePatriot

AutoIt Links

File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out.

ComputerGetInfo UDF's Updated! 11-23-2006

External Links

Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more)

Link to comment
Share on other sites

you could try "mousemove" "mouseclick" "send"

<{POST_SNAPBACK}>

Thanks for your reply! The real problem is however that the variable I want to input is in style with 2005-10-12 instead of 3 separete variables (2005, 10, 12)

I haven't been able to figure out if it's possible for _NowDate to be converted to three different variables for YEAR-MONTH-DAY.

Any help appriciated!

Thanks a lot in advance.

Link to comment
Share on other sites

I am not sure what the format of _DateNow and/or _TimeNow() is, but I will have to assume you are going to need to split (using StringSplit()) the dates up, then enter them using the Send() function. I would also check to see if you could send a tab (Send("{TAB}")) to get into the next field (it is the universal standard for moving around on forms).

Let me know if you need more info. Everything should be in the helpfile. Use the search function. Its all there :dance:.

JS

Edit: Added StringSplit()

<{POST_SNAPBACK}>

Hi thanks to your reply, I was able to solve the Time/date-part.

I wasn't aware of the StringSplit function, it made it really simple.

I post my solution here, just in case if anyone gets the same problem.

#include <Date.au3>

$NowDate = _NowDate()

$Date = StringSplit( "" & $NowDate , "-")

; $Date[1] = Year $Date[2] = Month $Date[3] = Day

Now the TAB key isn't working, so as I understand it, I must use "mouse move" and "mouse click" as B3TA_SCR1PT3R stated. Or does anyone know some other solution?

Thanks a lot for your help! :whistle:

Edited by sazen
Link to comment
Share on other sites

Something about a seeing a forest and trees come to mind. If you need the component parts of the current date... use the macro's, duh. Why bother getting the full date concatenated when you can use the very same macro's to get the individual parts necessary?

Link to comment
Share on other sites

Are you aware of the @YEAR, @MONTH and @DAY macros? They appear to offer the same functionality to what you want.

Edit: Beaten to it again!

Edited by LxP
Link to comment
Share on other sites

any chance there's a registry setting or a .ini/config file where this data could be altered? From the looks of the thumbnail, these seem like settings that would get persisted....

<{POST_SNAPBACK}>

Thanks. But I didn't find anything in the registry or in the application folder :(
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...