UltraFine Posted November 13, 2008 Share Posted November 13, 2008 (edited) #Include <Date.au3> Func Fool() For $i = 1 to 1 Send("i am a fool" & @CRLF) Next EndFunc Opt("WinTitleMatchMode", 2) $Start = TimerInit() For $1 = 1 to 100 WinWaitActive("Please type 'i am a fool' for 100 times.", "") Fool() Next $Total_Time = TimerDiff($Start) MsgBox(64, "Typing Done", "Total time passed: " & _DateTimeFormat($Total_Time, 3)) at the end of script i can't see the passed time. what is the problem in it? Thanks Edited November 13, 2008 by UltraFine Link to comment Share on other sites More sharing options...
PsaltyDS Posted November 13, 2008 Share Posted November 13, 2008 #Include <Date.au3> Func Fool() For $i = 1 to 1 Send("i am a fool" & @CRLF) Next EndFunc Opt("WinTitleMatchMode", 2) $Start = TimerInit() For $1 = 1 to 100 WinWaitActive("Please type 'i am a fool' for 100 times.", "") Fool() Next $Total_Time = TimerDiff($Start) MsgBox(64, "Typing Done", "Total time passed: " & _DateTimeFormat($Total_Time, 3)) at the end of script i can't see the passed time. what is the problem in it? Thanks Once again, read your help file entry for each function you are using. Then re-read about the TimerDiff() return value, and _DateTimeFormat() input value to see if they match. Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
Bert Posted November 13, 2008 Share Posted November 13, 2008 Seeing how you call yourself a fool in your own script.....There is this thing called a Freudian slip The Vollatran project My blog: http://www.vollysinterestingshit.com/ Link to comment Share on other sites More sharing options...
UltraFine Posted November 15, 2008 Author Share Posted November 15, 2008 Up Link to comment Share on other sites More sharing options...
martin Posted November 15, 2008 Share Posted November 15, 2008 UpChange can be a bit slow but it's not that change can happen, it's more that change cannot be stopped.Did you follow up PsaltyDS' suggestion? Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script. Link to comment Share on other sites More sharing options...
PsaltyDS Posted November 15, 2008 Share Posted November 15, 2008 UpYou started out doing the right thing here: You posted a short script that demonstrated the problem you wanted help with. Then you were told exactly where to look for the solution.With no indication of any effort or thought about the answer you already got, you now want to bump the topic...? Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
UltraFine Posted November 15, 2008 Author Share Posted November 15, 2008 You started out doing the right thing here: You posted a short script that demonstrated the problem you wanted help with. Then you were told exactly where to look for the solution.With no indication of any effort or thought about the answer you already got, you now want to bump the topic...? Just tell me, what i am doing wrong in my script? Link to comment Share on other sites More sharing options...
PsaltyDS Posted November 15, 2008 Share Posted November 15, 2008 Just tell me, what i am doing wrong in my script?See Post #2, then post what you found when you looked those functions up. Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
UltraFine Posted November 15, 2008 Author Share Posted November 15, 2008 See Post #2, then post what you found when you looked those functions up. i have read but still can't understand. if you will tell me that what is problem in my script than it would be good. it is not giving any error... but not showing the time. Link to comment Share on other sites More sharing options...
GEOSoft Posted November 15, 2008 Share Posted November 15, 2008 i have read but still can't understand. if you will tell me that what is problem in my script than it would be good. it is not giving any error... but not showing the time.He's saying that the format of the return from TimerDiff() can't be used with _DateTimeFormat().Take a look at the example in _TicksToTime(). George Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!" Link to comment Share on other sites More sharing options...
UltraFine Posted November 15, 2008 Author Share Posted November 15, 2008 He's saying that the format of the return from TimerDiff() can't be used with _DateTimeFormat(). Take a look at the example in _TicksToTime(). $Great = "GEOSoft" MsgBox(64, "Hi, " & $Great, "Thanks for the help.", 60) If Not $Great = "GEOSoft" Then MsgBox(0, "Hey!", "You are really Great, Thanks!") EndIf Link to comment Share on other sites More sharing options...
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