Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 12/23/2019 in all areas

  1. Hello Community, here's the latest update on... SMF - Search my Files Current Version: v17 (2024-Oct-20) SMF - Search my Files features A good looking GUI, Search files by location, Search files and / or folders, Poll [-]File names and Locations in Long and Short (8.3) format, [-]File Extensions, [-]File Times (modified, created, accessed), [-]File size, [-]File Attributes, [-]File Extended Attributes, Filter by [-]Extension, [-]Attribute, [-]File size, [-]File time, Free Name filtering by usage of RegEx, GUI designed to fit to 800x600 desktops with Tab-Design Nice looking Icon Minimize to Tray (also while searching) Export Result to CSV-file Export Result to XML-file Save & Load search runs Build Tree for local Computer on StartUp, add NetworkDrives optional A separate Report-GUI [-]Pre-Select output columns [-]SQLite driven [-]Dynamically generated statements, fully user adjustable [-]Dynamically sub filtering of results on the fly [-]Results can be executed directly, starting with the default associated program (ShellExcecute) [-]Select Results by drag, copy selected URIs to clipboard [-]Copy, move, delete or Erase results or subset of results md5 driven Duplicate file finder [-]High-Performance [-]added trimmed md5 short calculation (false md5, but sufficient for dup-search and a great speed improvement!) [-]Search 30.000 pics for dups in 1min 30secs Added many other ideas (some not activated / implemented yet) Limitations / Bugs / ToDos Lots and lots of unnecessary Global Variables Ugly code PLUS violations of any coding principal known to man... But hey, thats why I release the source, so that YOU help me to further improve SMF... SMF works fine at least on the 32bit XP SP3 and 64bit Win7/Win8/Win10 machines and I've tested it on. If you find bugs please let me know. Thanks to my sweet girlfriend for reviewing, giving new ideas and having so much patience with me :-*. Thanks to Jon, Larry, Jos, Valik, Jpm, Melba23 and Trancexx and for creating AutoIt and maintaining the forum. And finally thanks to all these great guys from the forum, providing excellent UDFs, snippets of code I use in SMF or help and feedback: Achilles, Ascend4nt, Ed_Maximized, Elgabionline, Erik Pilsits (Wraithdu), Eukalyptus, Gafrost, Holger Kotsch, Jarvis J. Stubblefield (JSThePatriot), Jos, Lahire Biette, Lazycat, Lod3n, Prog@ndy, Ptrex, Rasim, RazorM, RobSaunders, Sean Hart, Siao, Simucal, Smashly, SmOke_N, Teh_hahn, Valik, Ward, WideBoyDixon, Yann Perrin, Yashied & Zedna. Please let me know if you found some piece of code in the source for which I forgot to mention a credit. The executable and the source can be downloaded from my site: https://funk.eu Enjoy, let me know what you think of SMF and with Best Regards
    1 point
  2. I' am not sure if this is a robust test ? Global $hTimer, $bBoolean, $iMax = 5000000 $hTimer = TimerInit() For $i = 1 To $iMax $bBoolean = False Next ConsoleWrite("1. Time = " & TimerDiff($hTimer) & @CRLF) $hTimer = TimerInit() For $i = 1 To $iMax $bBoolean = Not(True) Next ConsoleWrite("2. Time = " & TimerDiff($hTimer) & @CRLF) Variation 2 takes twice as long.
    1 point
  3. Thread is almost 3 years old , nobody has replied in all that time. So why now? Further looking at your brief history; you have a penchant for reviving old threads. You are 3 for 3 on your behavior patterns..
    1 point
  4. Example 1: better to just overwrite (A) the variable (same memory location, so the number of (re)writes doesn't matter). But every extra function call costs performance. Example 2: Fastest evaluation uses Switch, not If/Then/Else, e.g., Switch $b_Input Case True ; do something Case Else ; do something else EndSwitch Example 3: AFAIK, boolean "True" is converted to 1, so "While 1" is marginally faster than "While True".
    1 point
  5. you could get values directly from within javascript using the ScriptControl itself: Global $oSC = ObjCreate("ScriptControl") $oSC.Language = "JScript" $test = '{"oksdd":true,"result":[{"ss":34}, {"sdes":"332"}]}' $oUpdates = json_decode($test) ConsoleWrite($oSC.Eval('obj.oksdd') & @CRLF) ConsoleWrite($oSC.Eval("obj.result[0].ss") & @CRLF) ConsoleWrite($oSC.Eval("obj.result[1].sdes") & @CRLF) Func json_decode($sJson) $oSC.AddCode("var obj = " & $sJson) If IsObj($oSC.Eval("obj")) Then Return $oSC.Eval("obj") Else Return False EndIf EndFunc ;==>json_decode or, even better, by enabling a fetching of array items with a custom javascript function, say as example Array.Peek, as shown in this nice example by the good @genius257 (https://www.autoitscript.com/forum/topic/176731-autoit-javascript-roundtrip/?do=findComment&comment=1329179). here a possible way: Global $oSC = ObjCreate("ScriptControl") $oSC.Language = "JScript" ; see here https://www.autoitscript.com/forum/topic/176731-autoit-javascript-roundtrip/?do=findComment&comment=1329179 $oSC.Eval("Array.prototype.Peek = function(i){return this[i];}"); enable fetching of array item with Array.Peek function $test = '{"oksdd":true,"result":[{"ss":34}, {"sdes":"332"}]}' $oUpdates = json_decode($test) ConsoleWrite($oUpdates.oksdd & @CRLF) ; read oksdd $myArray = $oUpdates.result ; get the 'map' MsgBox(0,"Debug", "there are " & $myArray.length & " elements in 'result'" & @CRLF & _ $myArray.Peek(0).ss & @CRLF & _ $myArray.Peek(1).sdes) Func json_decode($sJson) $oSC.AddCode("var obj = " & $sJson) If IsObj($oSC.Eval("obj")) Then Return $oSC.Eval("obj") Else Return False EndIf EndFunc ;==>json_decode
    1 point
  6. LarsJ

    ListView Column Order

    What do you mean exactly by looping through the columns in ascending sequence? Do you mean to loop through the columns from the leftmost column to the rightmost column? But this is not the usual opinion (at least not the MicroSoft opinion) of running through the columns in ascending order. The normal way to loop through the columns in ascending sequence and the way which is supported by MicroSoft code in the header and the listview controls is to use $iSubItem from $iSubItem = 0 to $iSubItem = $iColumns - 1. Looping through the columns in this way works for a large majority of all listview commands whether the columns have been dragged to other positions or not. $iSubItem always refers to the same column whether the columns have been rearranged or not. If two or more columns have been dragged to other positions the sequence from $iSubItem = 0 to $iSubItem = $iColumns - 1 does of course not match the left to right order of the columns. If you insists of looping through the columns in a left to right order (which changes every time the columns are rearranged) you need to use _GUICtrlListView_GetColumnOrderArray. But don't do that. You should use $iSubItem to loop through the columns. _GUICtrlListView_GetSubItemRect is an example of a command in which there is a problem when columns have been rearranged. It only works for $iSubItem > 0. For $iSubItem = 0 you must use _GUICtrlListView_GetItemRect. In this example I have only used _GUICtrlListView_GetSubItemRect. That's the reason why it doesn't work for the column with $iSubItem = 0, if that column has been dragged to a new position. I'll fix it. Conclusion: If you use $iSubItem to keep track of columns, you can usually add the $LVS_EX_HEADERDRAGDROP extended style to support rearranging of columns without changing any code at all.
    1 point
  7. You could use _GUICtrlListView_GetColumnOrderArray and loop through the array instead.
    1 point
  8. or you could just use MsgBox('','',@ScriptDir & "\YourScriptName.au3")
    0 points
×
×
  • Create New...