Jump to content

Recommended Posts

Posted

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. :)

Posted

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]

Posted (edited)

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)

Posted

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.

Posted (edited)

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
Posted

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?

Posted (edited)

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
Posted

The ControlFocus() command will offer you a better alternative to the mouse-related functions.

Posted (edited)

No I was certaintly now aware about those macros :whistle:

But I often make my own hamburgers, instead of walking to McDonalads.

Thanks!

Edited by sazen
Posted

just curious...

what application are you referring to in the thumbnail?

<{POST_SNAPBACK}>

Oh, its GeoVision 7.0

It's a industry application for recording surveillance cameras.

Posted

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....

[u]Do more with pre-existing apps![/u]ANYGUIv2.8
Posted

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 :(

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
  • Recently Browsing   0 members

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