Bert Posted June 8, 2006 Posted June 8, 2006 This is function I use to time stamp things I work with. A example would be a ticket a user opened for service. I have it tied to a hotsetkey so I can stamp when I need to. When I hit the key, it sends the following example in the ticket system I use:--------------------------- A4MH3: Thursday 06/08/2006, 10:16:56 AM: The code I use for it is this:Func _F9A_Func(); TimeStamp $sLongDayName = _DateDayOfWeek(@WDAY) $stamp = _NowTime() $stamp2 = _NowDate() if WinActive("Service Request", "equest.nsf") then ; send("---------------------------") send("{ENTER}") endif sleep(20) Send(@UserName & ": " & $sLongDayName & " " & $stamp2 & ", " & $stamp & ": ") ;EndIf EndFunc ;==>_F9A_Func The Vollatran project My blog: http://www.vollysinterestingshit.com/
sunrunner20 Posted June 8, 2006 Posted June 8, 2006 I need a function that converts back and forth. Windows Install date registry entry is in miliseconds from epoch format.
Valuater Posted June 8, 2006 Posted June 8, 2006 I need a function that converts back and forth. Windows Install date registry entry is in miliseconds from epoch format.I Need a function that turns dust into GOLD!!!remember you try we help, this is not an order desk8)
sunrunner20 Posted June 9, 2006 Posted June 9, 2006 I Need a function that turns dust into GOLD!!!remember you try we help, this is not an order desk8)I know, I was just hoping that somebody else had already take the time to code one.
Moderators SmOke_N Posted June 9, 2006 Moderators Posted June 9, 2006 I know, I was just hoping that somebody else had already take the time to code one.Do you at least have a layout step by step of what your trying to achieve? Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.
OverloadUT Posted June 25, 2006 Posted June 25, 2006 Rise from the dead, thread!I am in the need of generating an UNIX timestamp, as my script communicates with a PHP script and I would like to pass a timestamp with all communications.As mentioned earlier in this thread, a unix timestamp is the number of seconds that has passed since the Unix Epoch (January 1 1970 00:00:00 GMT).Also mentioned in this thread, this is a good start:#Include <Date.au3> $unixtimestamp = _DateDiff( 's',"1970/01/01 00:00:00",_NowCalc())oÝ÷ Øz0z÷«ØZ±©é®åzh§¶×hzÉ赧¢éí~íç.®·§¶Ø¦{:'xèºwm+¡×¢¶ººÞÛbìèê'juÏÿm4Ò̬µéºÚ"µÍÌÍÞTYÔXY ][ÝÒÑVWÓÐÐSÓPPÒSIÌLÔÖTÕSIÌLÐÛÛÛÙ]IÌLÐÛÛÛ ÌLÕ[YVÛR[ÜX][Û][ÝË ][ÝÔÝ[[YI][ÝÊBÌÍÑÓUTYÔXY ][ÝÒÑVWÓÐÐSÓPPÒSIÌLÔÓÑÐTIÌLÓZXÜÜÛÙ ÌLÕÚ[ÝÜÈ ÌLÐÝ[Ú[ÛÌLÕ[YHÛÉÌLÉ][ÝÉ[ÉÌÍÞ ][ÝÑÜ^I][ÝÊBÌÍÑÓUTÝ[ÓZY ÌÍÙÛ] KÊBÙØÞ K ][ÝÕ[Y^ÛOI][ÝÉ[ÉÌÍÞ ][ÝÑÓUI][ÝÉ[ÉÌÍÑÓU [ÈÜ [È ÌÍÙÛ] [É][ÝÈÝY][ÝÊUsing the $gmt2 variable from this code, I can subtract the number of seconds needed from the $unixtimestamp above to get something that is almost correct. However, the problem now is that this does not account for Daylight Saving Time. So close! For example, right now my clock is -7 hours from GMT. It's normally 8 hours back, but it's 7 right now because of Daylight Saving. But that timezone code above only returns -08 for $gmt2.Any ideas? That timezone code was from a 2 year old thread, so maybe there is a better way now?
OverloadUT Posted June 27, 2006 Posted June 27, 2006 I am still having no luck with this. Anybody have any ideas? I provided code samples and everything!
nfwu Posted June 27, 2006 Posted June 27, 2006 Maybe your script can calculate whether it is currently DST and add the necessary time? #) TwitterOut of date stuff:Scripts: Sudoku Solver | Webserver | 3D library (Pure AutoIt) | Wood's GadgetsUDFs: _WoodUniqueID() | _DialogEditIni() | _Console*() | _GetIPConfigData() | _URLEncode/Decode()
OverloadUT Posted June 28, 2006 Posted June 28, 2006 Maybe your script can calculate whether it is currently DST and add the necessary time?#)Unfortunately that is not good enough. Some places to not observe DST. I need to know if the system's clock is being adjusted for DST or not so I can adjust the timestamp appropriately. Really I think there should be some built in functions for getting the full date/time (with timezone information) built in to AutoIt.Any ideas?
OverloadUT Posted June 28, 2006 Posted June 28, 2006 FYI, I found some UDFs in the Scripts and Scraps forum that does exactly what I needed!I figured I would link it here in case anyone was searching for the same.Unix Timestamp Functions
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