sazen Posted August 22, 2005 Posted August 22, 2005 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.
B3TA_SCR1PT3R Posted August 22, 2005 Posted August 22, 2005 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 $DateThe variables are in style with _DateNow and _TimeNowOne 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. <{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]
JSThePatriot Posted August 22, 2005 Posted August 22, 2005 (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 . JS Edit: Added StringSplit() Edited August 22, 2005 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)
sazen Posted August 22, 2005 Author Posted August 22, 2005 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.
sazen Posted August 22, 2005 Author Posted August 22, 2005 (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 .JSEdit: 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] = DayNow 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! Edited August 22, 2005 by sazen
Valik Posted August 22, 2005 Posted August 22, 2005 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?
LxP Posted August 22, 2005 Posted August 22, 2005 (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 August 22, 2005 by LxP
LxP Posted August 22, 2005 Posted August 22, 2005 The ControlFocus() command will offer you a better alternative to the mouse-related functions.
sazen Posted August 22, 2005 Author Posted August 22, 2005 (edited) No I was certaintly now aware about those macros But I often make my own hamburgers, instead of walking to McDonalads. Thanks! Edited August 22, 2005 by sazen
quaizywabbit Posted August 22, 2005 Posted August 22, 2005 (edited) just curious... what application are you referring to in the thumbnail? Edited August 22, 2005 by quaizywabbit [u]Do more with pre-existing apps![/u]ANYGUIv2.8
sazen Posted August 22, 2005 Author Posted August 22, 2005 just curious...what application are you referring to in the thumbnail?<{POST_SNAPBACK}>Oh, its GeoVision 7.0It's a industry application for recording surveillance cameras.
quaizywabbit Posted August 22, 2005 Posted August 22, 2005 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
sazen Posted August 24, 2005 Author Posted August 24, 2005 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
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