w0uter Posted May 1, 2005 Share Posted May 1, 2005 well yeah the title says it all. :"> Func _Ret($v_return) Return $v_return EndFunc My UDF's:;mem stuff_Mem;ftp stuff_FTP ( OLD );inet stuff_INetGetSource ( OLD )_INetGetImage _INetBrowse ( Collection )_EncodeUrl_NetStat_Google;random stuff_iPixelSearch_DiceRoll Link to comment Share on other sites More sharing options...
Insolence Posted May 1, 2005 Share Posted May 1, 2005 LOL. Well done! "I thoroughly disapprove of duels. If a man should challenge me, I would take him kindly and forgivingly by the hand and lead him to a quiet place and kill him." - Mark TwainPatient: "It hurts when I do $var_"Doctor: "Don't do $var_" - Lar. Link to comment Share on other sites More sharing options...
CyberSlug Posted May 1, 2005 Share Posted May 1, 2005 I wonder: In case the user passes a function to _Ret, it might be better to say: Func _Ret($v_return) Local $result = $v_return SetError(@error) Return $result EndFunc Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig! Link to comment Share on other sites More sharing options...
Insolence Posted May 1, 2005 Share Posted May 1, 2005 Amazing, that's perfect! Exactly what I needed! "I thoroughly disapprove of duels. If a man should challenge me, I would take him kindly and forgivingly by the hand and lead him to a quiet place and kill him." - Mark TwainPatient: "It hurts when I do $var_"Doctor: "Don't do $var_" - Lar. Link to comment Share on other sites More sharing options...
Insolence Posted May 1, 2005 Share Posted May 1, 2005 Or maybe even: Func Useless() EndFunc "I thoroughly disapprove of duels. If a man should challenge me, I would take him kindly and forgivingly by the hand and lead him to a quiet place and kill him." - Mark TwainPatient: "It hurts when I do $var_"Doctor: "Don't do $var_" - Lar. Link to comment Share on other sites More sharing options...
layer Posted May 1, 2005 Share Posted May 1, 2005 at least it returns an expected result... but, this is uselessFunc CurrentTime() Return Random() EndFunc<{POST_SNAPBACK}>lol... I could see it now: "EDIT: added UDF _Ret" in the dev section FootbaG Link to comment Share on other sites More sharing options...
bluebearr Posted May 2, 2005 Share Posted May 2, 2005 Hmmm, this function is worse than useless:Func _Ret($v_return) Local $result = $v_return SetError(@error) For $j = 1 to 10000 For $i = 1 to 100000 $A = StringSplit(Random(), "") Next Next Return $result EndFuncThe inner loop takes ~6 seconds, so maybe the outer loop will take 60000 secs which is over 16 hrs? What fun!BlueBearr BlueBearrOddly enough, this is what I do for fun. Link to comment Share on other sites More sharing options...
w0uter Posted May 2, 2005 Author Share Posted May 2, 2005 Or maybe even:Func Useless() EndFunc<{POST_SNAPBACK}>you win. lol. My UDF's:;mem stuff_Mem;ftp stuff_FTP ( OLD );inet stuff_INetGetSource ( OLD )_INetGetImage _INetBrowse ( Collection )_EncodeUrl_NetStat_Google;random stuff_iPixelSearch_DiceRoll Link to comment Share on other sites More sharing options...
this-is-me Posted May 3, 2005 Share Posted May 3, 2005 The most useless UDF: Func Who else would I be? Link to comment Share on other sites More sharing options...
Dicemaster Slayer Posted July 22, 2005 Share Posted July 22, 2005 The most useless UDF: Func Exit EndFunc Link to comment Share on other sites More sharing options...
Valik Posted July 22, 2005 Share Posted July 22, 2005 The most useless UDF:Func Exit EndFunc<{POST_SNAPBACK}>Thats not actually sytactically valid so its not a function. Link to comment Share on other sites More sharing options...
layer Posted July 22, 2005 Share Posted July 22, 2005 The most useless UDF:Func<{POST_SNAPBACK}>Neither is this FootbaG Link to comment Share on other sites More sharing options...
killaz219 Posted July 25, 2005 Share Posted July 25, 2005 The most useless UDF:Func Exit EndFunc<{POST_SNAPBACK}>If that was valid it could accually have a use so it wouldnt be useless.Its just a fancy way of closing your script Link to comment Share on other sites More sharing options...
ezzetabi Posted July 25, 2005 Share Posted July 25, 2005 There is no need of thinking about useless scripts, just use the seach button. Link to comment Share on other sites More sharing options...
mother9987 Posted July 26, 2005 Share Posted July 26, 2005 (edited) Hmmm, this function is worse than useless:...The inner loop takes ~6 seconds, so maybe the outer loop will take 60000 secs which is over 16 hrs? What fun!BlueBearr<{POST_SNAPBACK}>I think Bluebearr had the right idea, but what that script really needed was a way to keep the user from killing it. You need to use the progress bar with percent display include with this one, but it displays a progress bar where every percent takes longer than the previous one.expandcollapse popupFunc _Ret($v_return) Local $result = $v_return SetError(@error) If Not IsDeclared('Dark_Green') Then Dim $Dark_Green = 0x006400 If Not IsDeclared('Red') Then Dim $Red = 0xff0000 If Not IsDeclared('Yellow') Then Dim $Yellow = 0xffff00 GUICreate("Processing - Please Wait", 220, 50, 100, 100) ;~ _Progress_Create (left, top, width, height[,style[,backcolor[,progressbar color[,text color[,invert text color]]]]]) Returns Control Id for Progress Bar Dim $h_progress[1] $h_progress[UBound($h_progress) - 1] = _Progress_Create (10, 10, 200, 20, -1, -1, $Red, -1, $Yellow) Local $outerloop = 10000, $innerloop = 100000 Local $iterations = $outerloop * $innerloop Local $progress[100], $complete = 0 $progress[99] = $iterations For $i = 98 to 0 Step -1 $progress[$i] = $progress[$i + 1] / 1.3 Next $iterations = 0 GUISetState() For $j = 1 to $outerloop For $i = 1 to $innerloop $A = StringSplit(Random(), "") $iterations += 1 If $iterations > $progress[ $complete ] Then $complete += 1 _Progress_Update ($h_progress[0], $complete) EndIf Next Next Return $result EndFunc Edited July 26, 2005 by mother9987 Link to comment Share on other sites More sharing options...
blindwig Posted July 26, 2005 Share Posted July 26, 2005 Or maybe even:Func Useless() EndFunc<{POST_SNAPBACK}>Not useless. Off the top of my head, I can see that calling that function does at least three things:Clears @ErrorClears @ExtendedVerifies that AutoIt is not at it's maximum recursion level My UDF Threads:Pseudo-Hash: Binary Trees, Flat TablesFiles: Filter by Attribute, Tree List, Recursive Find, Recursive Folders Size, exported to XMLArrays: Nested, Pull Common Elements, Display 2dSystem: Expand Environment Strings, List Drives, List USB DrivesMisc: Multi-Layer Progress Bars, Binary FlagsStrings: Find Char(s) in String, Find String in SetOther UDF Threads I Participated:Base64 Conversions Link to comment Share on other sites More sharing options...
Valik Posted July 26, 2005 Share Posted July 26, 2005 Not useless. Off the top of my head, I can see that calling that function does at least three things:Clears @ErrorClears @ExtendedVerifies that AutoIt is not at it's maximum recursion level<{POST_SNAPBACK}>And if you're still using v3.1.1.0, this will clear the return value which is a bug (Fixed in beta). For example, if you returned a large array (Bad idea, always work on arrays ByRef to avoid copying), then there would be two copies of the large array in memory; one in the variable holding the array and one erroneously sitll stored in the internal variable that holds the Return value. Calling an empty function would clear that return value and free the memory.Again, that only affects v3.1.1.0 and older; its fixed in the beta. Link to comment Share on other sites More sharing options...
jefhal Posted July 26, 2005 Share Posted July 26, 2005 The inner loop takes ~6 seconds, so maybe the outer loop will take 60000 secs which is over 16 hrs? What fun!Not exactly useless, just a really inefficient "Pause" function... ...by the way, it's pronounced: "JIF"... Bob Berry --- inventor of the GIF format Link to comment Share on other sites More sharing options...
mother9987 Posted July 26, 2005 Share Posted July 26, 2005 I changed mine a little bit. $progress[99] = $iterations For $i = 98 to 0 Step -1 $progress[$i] = $progress[$i + 1] / 1.15 Next 1.15 seems to make me hate life a lot more than 1.3. I'm convinced that a lot of installers are using this kind of exponential for their progress bars already. Link to comment Share on other sites More sharing options...
GaryFrost Posted July 26, 2005 Share Posted July 26, 2005 Seems to me it's not useless at all, it keep you busy SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. 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