Leaderboard
Popular Content
Showing content with the highest reputation on 06/12/2021 in all areas
-
AutoIt v3.3.15.4 Beta
coffeeturtle and 8 others reacted to Jon for a topic
AutoIt v3.3.15.4 Beta View File AutoIt: - Changed: PCRE regular expression engine updated to 8.44. - Added: doc pages about ControlID/Handle and String/Encoding. - Added #2375: SetError(), SetExtended() doc precision. - Added #3780: WinSetTitle() on notepad.exe is reverted when the windows get focus starting Windows 19H1 !!! - Added #3222: Doc precision for statement with 2 FileInstall(). - Added: ConsoleWrite() preserves the @error and @extended. - Added: ConsoleWriteError() preserves the @error and @extended. - Added #2938: Add "GetCount" to ControlCommand() - Added #3539: FileGetTime() UTC. - Added #3808: ProgressOn()/ProgressSet() - size of the progress window - Fixed: Missing Opt("SetExitCode", 1) and AutoIt3 Exit codes in doc. - Fixed #3211: Doc precision for hwnd parameter in Pixel*() functions. - Fixed #3774: Doc precision about Null keyword comparison. - Fixed #3579: DllStructGetData() doc precision. - Fixed #3823: Language Reference - Variables typo. - Fixed #3021: bad obj calling. - Fixed #3106: StringIsFloat() doesn't accept a valid FP exponent. - Fixed #3135: StdioClose memory leak. - Fixed #3165: Call UBound Array[0] AutoIt Crash. - Fixed #3167: Com error handler not called. - Fixed #3179: Number() failure with lower case hex. - Fixed #3182: MouseMove() on multiple screens. - Fixed #3232: Issue when parsing scientific notation literals. - Fixed #3659: InetClose() always false. - Fixed #3682: GuiCtrlCreatePic() with h=0 and w=0. - Fixed #3701: Crash with array 2^24. - Fixed #3710: @OSVersion for Server 2019. - Fixed #3743: [LAST] and WinWaitClose(), WinExists(), WinGetHandle(), etc. - Fixed #3772: int64 = -9223372036854775808 not handled properly. - Fixed #3778: ToolTip() position. - Fixed #3789: FileRead() on big ANSI file (1Gb). - Fixed #3790: UCS2 compare empty string. - Fixed #3807: GUISetIcon() in taskbar. - Fixed #3809: WinGetTitle() on windows created with _WinAPI_CreateWindowEx(). - Fixed #3817: Double to Int64 conversion. AutoItX: - Fixed: run*() showflag default SW_SHOWNORMAL. Aut2Exe: - Fixed #2383: Aut2exe GUI dropped files. - Added #3684: Aut2exe title with version. Au3Check: - Fixed #3785: Crash if too many includes. Au3info: - Added #3938: DPI scaling Support. UDFs: - Changed: Updated used Excel constant enumerations in ExcelConstants.au3 to Excel 2016. - Added #3514: _GUICtrlTreeView_GetLastItem() (Thanks Crazzy). - Added #3611: _GUICtrlListView_SetBkHBITMAP() (Thanks Alofa). - Added #3695: _SQLite_Display2DResult() 2 additional parameters $sDelim_Col and $sDelim_Row. - Added #3675: WinNET.au3 $tagNETRESOURCE: Add constants. - Added #3740: _ChooseColor() support Custom colors (Thanks argumentum). - Added #3547: _FormatAutoItExitCode() and _FormatAutoItExitMethod(). - Added #3696: _ArrayFromString(). - Added #3771: ColorConstants.au3 now include all W3C extended colors. THIS IS A small SCRIPT BREAKING CHANGE - Added #3739: _Array2DCreate(). - Added #3550: _Date_Time_SystemTimeToDateTimeStr() support 2 new formats to return GMT or ISO8601 format. - Added: _WinAPI_CreateProcess() example. - Added #3804: _GUICtrlMenu_CreateMenu() example to demonstrate menuclick non blocking. - Added #3806: _GDIPlus_GraphicsDrawString() with AlphaColor font. - Added #3811: _SQLite_Startup() new parameter to allow return AutoIt Type variables by _SQLite_FetchData(). - Added: _GUICtrlListView_GetSelectedIndices() optimisation (Thanks pixelsearch). - Added: _WinAPI_GetProcessName() and _WinAPI_GetParentProcessName() doc example (Thanks argumentum). - Added #3813: _MemGlobalRealloc(). - Added #3816: _WinAPI_ReadDirectoryChanges() example with magic number. - Fixed #3819: _FileCountLines() can use file handle. - Added: SpeedUp display and sorting of ArrayDisplay() and _DebugArrayDisplay() (Thanks LarsJ). - Fixed #3647: _GDIPlus_ImageResize() ghost border. - Fixed #3650: _GDIPlus_ImageResize() off by one. - Fixed #3633: _GUICtrlRichEdit_GotoCharPos() does not detect end of text. - Fixed #3765: _FileWriteLog() using Handle Cannot insert atvthe beginning, just set @extended. - Fixed #3776: __EventLog_DecodeDesc(). - Fixed: _GUICtrlListView_SetItemChecked() regression and more GUIListview.au3 functions. - Fixed: _WinAPI_CreateEvent() return error on already define $sName. - Fixed: use "wstr" for "ptr" with Null value. - Fixed #3791: _ArrayDisplay() sort arrow. - Fixed #3805: $tagRID_DEVICE_INFO_KEYBOARD definition. - Fixed #3810: _ArrayUnique not handling "Default" for Parameter $iIntType. - Fixed: _WinAPI_DragQueryFileEx() $iflag behavior when mix drag (Thanks pixelsearch). - Fixed #3812: _DateTimeSplit() returning @error. - Fixed #3814: $PAGE_ connstants for _WinAPI_CreateFileMapping(). - Fixed #3821: _WinAPI_OemToChar() with string greater than 65536 crash. - Fixed: _Now(), _NowCalc(), ... date time coherency when call just on hour change. (Thanks argumentum). - Fixed #3824: _GUICtrlRichEdit_StreamToFile(), _GUICtrlRichEdit_StreamFromFile() default encoding doc. - Fixed #3825: beta regression for $tagEDITSTREAM in x64. Submitter Jon Submitted 06/12/2021 Category Beta9 points -
AutoIt v3.3.15.4 Beta
jaberwacky and 2 others reacted to Jon for a file
1,713 downloads
AutoIt: - Changed: PCRE regular expression engine updated to 8.44. - Added: doc pages about ControlID/Handle and String/Encoding. - Added #2375: SetError(), SetExtended() doc precision. - Added #3780: WinSetTitle() on notepad.exe is reverted when the windows get focus starting Windows 19H1 !!! - Added #3222: Doc precision for statement with 2 FileInstall(). - Added: ConsoleWrite() preserves the @error and @extended. - Added: ConsoleWriteError() preserves the @error and @extended. - Added #2938: Add "GetCount" to ControlCommand() - Added #3539: FileGetTime() UTC. - Added #3808: ProgressOn()/ProgressSet() - size of the progress window - Fixed: Missing Opt("SetExitCode", 1) and AutoIt3 Exit codes in doc. - Fixed #3211: Doc precision for hwnd parameter in Pixel*() functions. - Fixed #3774: Doc precision about Null keyword comparison. - Fixed #3579: DllStructGetData() doc precision. - Fixed #3823: Language Reference - Variables typo. - Fixed #3021: bad obj calling. - Fixed #3106: StringIsFloat() doesn't accept a valid FP exponent. - Fixed #3135: StdioClose memory leak. - Fixed #3165: Call UBound Array[0] AutoIt Crash. - Fixed #3167: Com error handler not called. - Fixed #3179: Number() failure with lower case hex. - Fixed #3182: MouseMove() on multiple screens. - Fixed #3232: Issue when parsing scientific notation literals. - Fixed #3659: InetClose() always false. - Fixed #3682: GuiCtrlCreatePic() with h=0 and w=0. - Fixed #3701: Crash with array 2^24. - Fixed #3710: @OSVersion for Server 2019. - Fixed #3743: [LAST] and WinWaitClose(), WinExists(), WinGetHandle(), etc. - Fixed #3772: int64 = -9223372036854775808 not handled properly. - Fixed #3778: ToolTip() position. - Fixed #3789: FileRead() on big ANSI file (1Gb). - Fixed #3790: UCS2 compare empty string. - Fixed #3807: GUISetIcon() in taskbar. - Fixed #3809: WinGetTitle() on windows created with _WinAPI_CreateWindowEx(). - Fixed #3817: Double to Int64 conversion. AutoItX: - Fixed: run*() showflag default SW_SHOWNORMAL. Aut2Exe: - Fixed #2383: Aut2exe GUI dropped files. - Added #3684: Aut2exe title with version. Au3Check: - Fixed #3785: Crash if too many includes. Au3info: - Added #3938: DPI scaling Support. UDFs: - Changed: Updated used Excel constant enumerations in ExcelConstants.au3 to Excel 2016. - Added #3514: _GUICtrlTreeView_GetLastItem() (Thanks Crazzy). - Added #3611: _GUICtrlListView_SetBkHBITMAP() (Thanks Alofa). - Added #3695: _SQLite_Display2DResult() 2 additional parameters $sDelim_Col and $sDelim_Row. - Added #3675: WinNET.au3 $tagNETRESOURCE: Add constants. - Added #3740: _ChooseColor() support Custom colors (Thanks argumentum). - Added #3547: _FormatAutoItExitCode() and _FormatAutoItExitMethod(). - Added #3696: _ArrayFromString(). - Added #3771: ColorConstants.au3 now include all W3C extended colors. THIS IS A small SCRIPT BREAKING CHANGE - Added #3739: _Array2DCreate(). - Added #3550: _Date_Time_SystemTimeToDateTimeStr() support 2 new formats to return GMT or ISO8601 format. - Added: _WinAPI_CreateProcess() example. - Added #3804: _GUICtrlMenu_CreateMenu() example to demonstrate menuclick non blocking. - Added #3806: _GDIPlus_GraphicsDrawString() with AlphaColor font. - Added #3811: _SQLite_Startup() new parameter to allow return AutoIt Type variables by _SQLite_FetchData(). - Added: _GUICtrlListView_GetSelectedIndices() optimisation (Thanks pixelsearch). - Added: _WinAPI_GetProcessName() and _WinAPI_GetParentProcessName() doc example (Thanks argumentum). - Added #3813: _MemGlobalRealloc(). - Added #3816: _WinAPI_ReadDirectoryChanges() example with magic number. - Fixed #3819: _FileCountLines() can use file handle. - Added: SpeedUp display and sorting of ArrayDisplay() and _DebugArrayDisplay() (Thanks LarsJ). - Fixed #3647: _GDIPlus_ImageResize() ghost border. - Fixed #3650: _GDIPlus_ImageResize() off by one. - Fixed #3633: _GUICtrlRichEdit_GotoCharPos() does not detect end of text. - Fixed #3765: _FileWriteLog() using Handle Cannot insert atvthe beginning, just set @extended. - Fixed #3776: __EventLog_DecodeDesc(). - Fixed: _GUICtrlListView_SetItemChecked() regression and more GUIListview.au3 functions. - Fixed: _WinAPI_CreateEvent() return error on already define $sName. - Fixed: use "wstr" for "ptr" with Null value. - Fixed #3791: _ArrayDisplay() sort arrow. - Fixed #3805: $tagRID_DEVICE_INFO_KEYBOARD definition. - Fixed #3810: _ArrayUnique not handling "Default" for Parameter $iIntType. - Fixed: _WinAPI_DragQueryFileEx() $iflag behavior when mix drag (Thanks pixelsearch). - Fixed #3812: _DateTimeSplit() returning @error. - Fixed #3814: $PAGE_ connstants for _WinAPI_CreateFileMapping(). - Fixed #3821: _WinAPI_OemToChar() with string greater than 65536 crash. - Fixed: _Now(), _NowCalc(), ... date time coherency when call just on hour change. (Thanks argumentum). - Fixed #3824: _GUICtrlRichEdit_StreamToFile(), _GUICtrlRichEdit_StreamFromFile() default encoding doc. - Fixed #3825: beta regression for $tagEDITSTREAM in x64.3 points -
This error situation typically occurs in a message handler in a custom drawn, owner drawn or virtual listview, where more code is executed than there is time for. This is probably not an actual error in the code. The error is due to the fact that AutoIt as an interpreted language isn't fast enough to handle so many messages and so much code at once. You can analyze the problem with Windows Message Monitor. Compare e.g. the message flow when scrolling with the scroll bar and when scrolling with the mouse scroll button. It may be possible to limit the number of messages when scrolling with the mouse scroll button and thus get around the problem.2 points
-
Edit: Bug fixed in Beta 3.3.15.4 and working perfect.1 point
-
AutoIt v3.3.15.4 Beta
coffeeturtle reacted to Jon for a topic
Implemented some of the fixes that JP has coded (thanks) and lots of changes the MVPs done on the libs.1 point -
Incremental search in owner and custom drawn ListViews
Norm73 reacted to pixelsearch for a topic
@Norm73 glad you made it @powerofos I tried to script a version "2t" with draggable headers, but I'm not really convinced with it, we'll see... #include <ComboConstants.au3> #include <EditConstants.au3> #include <GuiListView.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #include "RandomArray.au3" ; LarsJ #include "DrawItem.au3" ; " Opt("MustDeclareVars", 1) Global $g_iRows = 10000, $g_iCols = 6, $g_hGui, $g_hListView, $g_hHeader, $g_hEdit Global $g_aCols = ["Strings", "Integers", "Floats", "Dates", "Times", "R/C"], $g_aWidths = [230, 61, 124, 70, 60, 60] Global $g_aColAligns[$g_iCols] = [2, 1, 1, 1, 1, 1] ; $HDF_LEFT = 0, $HDF_RIGHT = 1, $HDF_CENTER = 2 Global $g_idListView, $g_idMarker, $g_idComboCol, $g_idComboColDummy, $g_idEditDummy Global $g_sSearch, $g_iSearchCol, $g_iSortDir, $g_iSearch = $g_iRows, $g_iLvItem = -1 Global $g_aArray, $g_aSubArray, $g_aSubArray2, $g_tDefaultIndex, $g_tIndex = DllStructCreate("uint arr[" & $g_iRows & "]") Global $g_aIndex[$g_iCols], $g_aIndexTemp[$g_iCols] ; VarGetType's : $g_aIndex => "Array", $g_aIndex[0] => "String" Global $g_idContextDummy, $g_hContextmenu, $g_iItem = -1, $g_iSubItem = -1, $g_bShowAllRows = False, $g_bRightClickHeaders = True Global $fListViewHasFocus = 1 ; trying this for now, we'll see... Global $g_bHeaderDragged = False, $g_aColumnOrder[$g_iCols + 1] ; format of this array in help file topic _GUICtrlListView_GetColumnOrderArray ; related to LV ex. style $LVS_EX_HEADERDRAGDROP and message $HDN_ENDDRAG Global $g_bPreventHeaderChanges = False ; important on older OS (allow header changes at some moments in case $HDS_NOSIZING is not recognized) ; it's crucial as style $LVS_EX_HEADERDRAGDROP & owner drawn are present in the script : no column resizing ! Example() Func Example() ; Generate array & one index _Generate_All($g_aArray) $g_aSubArray = $g_aArray $g_aSubArray2 = $g_aArray $g_tDefaultIndex = $g_tIndex ; Compute LV_Height based on 40 full visible rows, no additional vertical pixel. Local $iLV_Height = _ComputeLV_Height(40) ; only 1 param => LV got headers & border ConsoleWrite("Computed LV height = " & $iLV_Height & " pixels" & @crlf & @crlf) ; Create GUI $g_hGui = GUICreate("Virtual ListView (owner drawn) + Incr. Search + draggable Headers (2t)", 630 + 20, $iLV_Height + 30 + 20) ; Create Edit control (search) + dummy control Local $idEdit = GUICtrlCreateEdit("", 120, 10, 182, 20, BitXOR($GUI_SS_DEFAULT_EDIT, $WS_HSCROLL, $WS_VSCROLL)) $g_hEdit = GUICtrlGetHandle($idEdit) $g_idEditDummy = GUICtrlCreateDummy() ; Create 2 Search Buttons (Prev / Next) & 2 Accelerator Keys (F3 / Shift+F3) Local $idPrev = GUICtrlCreateButton("Prev", 312, 10, 50, 20) Local $idNext = GUICtrlCreateButton("Next", 370, 10, 50, 20) GUICtrlSetState($idPrev, $GUI_DISABLE) GUICtrlSetState($idNext, $GUI_DISABLE) Local $aAccelKeys[2][2] = [ [ "{F3}", $idNext ], [ "+{F3}", $idPrev ] ] GUISetAccelerators($aAccelKeys) ; Create ComboBox control (how to search : RegEx or Normal ?) Local $idSearchHow = GUICtrlCreateCombo("RegEx search", 11, 9, 100, 20, BitOR($GUI_SS_DEFAULT_COMBO, $CBS_DROPDOWNLIST)) Local $sSearchHow = "RegEx search", $sSearchHowPrev = $sSearchHow ; default way of searching (changeable) GUICtrlSetData($idSearchHow, "Normal search", $sSearchHow) ; Create ComboBox control (column where to search) + dummy control GUICtrlCreateLabel("Col", 429, 10, 20, 20, BitOR($SS_CENTERIMAGE, $SS_CENTER)) $g_idComboCol = GUICtrlCreateCombo("0", 452, 9, 41, 20, BitOR($GUI_SS_DEFAULT_COMBO, $CBS_DROPDOWNLIST)) $g_iSearchCol = 0 ; default column where to search (changeable) Local $iSearchColPrev = $g_iSearchCol For $i = 1 To $g_iCols - 1 GUICtrlSetData($g_idComboCol, $i & "|", $g_iSearchCol) Next $g_idComboColDummy = GUICtrlCreateDummy() ; Create Label control (number of matching results) Local $idResult = GUICtrlCreateLabel(" " & $g_iRows & " rows (no pattern)", 501, 10, 135, 20, BitOR($SS_CENTERIMAGE, $SS_SUNKEN)) ; Create ListView $g_idListView = GUICtrlCreateListView("", 10, 40, 630, $iLV_Height, BitOr($GUI_SS_DEFAULT_LISTVIEW, $LVS_OWNERDATA, $LVS_OWNERDRAWFIXED), $WS_EX_CLIENTEDGE) _GUICtrlListView_SetExtendedListViewStyle($g_idListView, BitOr($LVS_EX_DOUBLEBUFFER, $LVS_EX_FULLROWSELECT, $LVS_EX_HEADERDRAGDROP)) $g_hListView = GUICtrlGetHandle($g_idListView) $g_hHeader = _GUICtrlListView_GetHeader($g_idListView) For $i = 0 To $g_iCols - 1 _GUICtrlListView_AddColumn($g_idListView, $g_aCols[$i], $g_aWidths[$i]) _GUICtrlHeader_SetItemFormat($g_hHeader, $i, $HDF_STRING + $g_aColAligns[$i]) $g_aColumnOrder[$i + 1] = $i Next $g_aColumnOrder[0] = $g_iCols Local $iGetItemSpacingY = _GUICtrlListView_GetItemSpacingY($g_idListView, True) ; No ListView column resizing by dragging header dividers (LarsJ) . (Personal : it's nearly mandatory when $LVS_EX_HEADERDRAGDROP + owner drawn) ;_WinAPI_SetWindowLong( $hHeader, $GWL_STYLE, _WinAPI_GetWindowLong( $hHeader, $GWL_STYLE ) + $HDS_NOSIZING ) ; AutoIt 3.3.14.5 issue DllCall( "user32.dll", "long_ptr", @AutoItX64 ? "SetWindowLongPtrW" : "SetWindowLongW", "hwnd", $g_hHeader, "int", $GWL_STYLE, "long_ptr", _ DllCall( "user32.dll", "long_ptr", @AutoItX64 ? "GetWindowLongPtrW" : "GetWindowLongW", "hwnd", $g_hHeader, "int", $GWL_STYLE )[0] + $HDS_NOSIZING ) ; Create Marker (an orange line placed above the header of the column being searched) $g_idMarker = GUICtrlCreateLabel("", 0, 0) GUICtrlSetBkColor(-1, 0xFFA060) ; orange _MoveMarker($g_iSearchCol) _GUICtrlListView_SetSelectedColumn($g_idListView, $g_iSearchCol) ; Create Context menu $g_idContextDummy = GUICtrlCreateDummy() Local $idContextMenu = GUICtrlCreateContextMenu($g_idContextDummy) Local $idContext_GetText = GUICtrlCreateMenuItem("Get text", $idContextMenu) GUICtrlCreateMenuItem("", $idContextMenu) Local $idContext_ShowAll = GUICtrlCreateMenuItem("Show all rows", $idContextMenu) Local $idContext_RightClickHeaders = GUICtrlCreateMenuItem("Right-click Headers", $idContextMenu) GUICtrlSetState(-1, 1) ; $GUI_CHECKED = 1 $g_hContextMenu = GuiCtrlGetHandle($idContextMenu) ; Sorting information $g_iSortDir = 0x0400 ; $HDF_SORTUP = 0x0400 Local $iSortCol = -1, $iSortColPrev = -1 ; Register message handlers GUIRegisterMsg($WM_DRAWITEM, "WM_DRAWITEM") GUIRegisterMsg($WM_NOTIFY, "WM_NOTIFY") GUIRegisterMsg($WM_COMMAND, "WM_COMMAND") ; Sets the virtual number of items in a virtual list-view control GUICtrlSendMsg($g_idListView, $LVM_SETITEMCOUNT, $g_iRows, 0) GUISetState(@SW_SHOW) ; Message loop $g_bPreventHeaderChanges = True ; prevent changes in headers (no resizing) until next _GUICtrlHeader_SetItemFormat instruction. Local $aSearch[$g_iRows], $iStart While 1 Switch GUIGetMsg() Case $g_idComboCol, $g_idComboColDummy, $idSearchHow $g_iSearchCol = GUICtrlRead($g_idComboCol) $sSearchHow = GUICtrlRead($idSearchHow) Select Case $g_iSearchCol <> $iSearchColPrev _MoveMarker($g_iSearchCol) ; Search column will be selected below, after ContinueCase $iSearchColPrev = $g_iSearchCol Case $sSearchHow <> $sSearchHowPrev $sSearchHowPrev = $sSearchHow Case Else ; no change in both Combo controls (same search column, same search way) ContinueLoop EndSelect ContinueCase Case $g_idEditDummy $g_bPreventHeaderChanges = False ; surround next instruction that changes a header (allow it, then prevent it just after) _GUICtrlHeader_SetItemFormat($g_hHeader, $iSortCol, $HDF_STRING + ($iSortCol > -1 ? $g_aColAligns[$iSortCol] : 0)) $g_bPreventHeaderChanges = True ; no more changes until next _GUICtrlHeader_SetItemFormat instruction. $g_sSearch = GUICtrlRead($idEdit) $g_tIndex = $g_tDefaultIndex ; Sorting information (same as 1st launch, to avoid descending displays when all unsorted rows are shown) $g_iSortDir = 0x0400 ; $HDF_SORTUP = 0x0400 $iSortCol = -1 $iSortColPrev = -1 If $g_sSearch = "" Then ; Empty search string, display all rows $g_aSubArray = $g_aArray $g_aSubArray2 = $g_aArray $g_iSearch = $g_iRows GUICtrlSetState($idPrev, $GUI_DISABLE) GUICtrlSetState($idNext, $GUI_DISABLE) Else ; Find rows matching the search string $g_iSearch = 0 If $sSearchHow = "Normal search" Then ; all searches use RegEx => escape 12 + 1 metacharacters $g_sSearch = StringRegExpReplace($g_sSearch, "(\\|\.|\^|\$|\||\[|\(|\{|\*|\+|\?|\#|\))" , "\\$1") EndIf ; ConsoleWrite("$sSearchHow = " & $sSearchHow & @TAB & "$g_sSearch = " & $g_sSearch & @lf) Dim $aSearch[$g_iRows] For $i = 0 To $g_iRows - 1 If StringRegExp($g_aArray[$i][$g_iSearchCol], "(?i)" & $g_sSearch) Then For $j = 0 To $g_iCols - 1 $g_aSubArray2[$g_iSearch][$j] = $g_aArray[$i][$j] Next $aSearch[$i] = 1 ; include row ($aSearch will serve if user wants to show all rows and click Next / Prec) $g_iSearch += 1 EndIf Next ; Delete eventual temporary subindexes For $i = 0 To $g_iCols - 1 If VarGetType($g_aIndexTemp[$i]) = "DLLStruct" Then $g_aIndexTemp[$i] = "" ; "String" Next $g_aSubArray = $g_bShowAllRows ? $g_aArray : $g_aSubArray2 GUICtrlSetState($idPrev, ($g_bShowAllRows And $g_iSearch And $g_iSearch < $g_iRows) ? $GUI_ENABLE : $GUI_DISABLE) GUICtrlSetState($idNext, ($g_bShowAllRows And $g_iSearch And $g_iSearch < $g_iRows) ? $GUI_ENABLE : $GUI_DISABLE) EndIf GUICtrlSetData($idResult, " " & $g_iSearch & ($g_sSearch = "" ? " rows (no pattern)" : " matching rows")) GUICtrlSendMsg($g_idListView, $LVM_SETITEMCOUNT, $g_bShowAllRows ? $g_iRows : $g_iSearch, 0) _GUICtrlListView_SetSelectedColumn($g_hListView, $g_iSearchCol) ; seems ok here (after $LVM_SETITEMCOUNT) Case $g_idListView ; Sort $iSortCol = GUICtrlGetState($g_idListView) If $iSortCol <> $iSortColPrev Then $g_bPreventHeaderChanges = False _GUICtrlHeader_SetItemFormat($g_hHeader, $iSortColPrev, $HDF_STRING + ($iSortColPrev > -1 ? $g_aColAligns[$iSortColPrev] : 0)) $g_bPreventHeaderChanges = True EndIf ; Set $g_tIndex + eventual update of $g_aIndex[$iSortCol] OR $g_aIndexTemp[$iSortCol] If $g_bShowAllRows Or $g_sSearch = "" Or $g_iSearch = $g_iRows Then _UpdateIndex($g_aIndex, $iSortCol) Else _UpdateIndex($g_aIndexTemp, $iSortCol) EndIf $g_iSortDir = (($iSortCol = $iSortColPrev) ? ($g_iSortDir = $HDF_SORTUP ? $HDF_SORTDOWN : $HDF_SORTUP) : ($HDF_SORTUP)) $g_bPreventHeaderChanges = False _GUICtrlHeader_SetItemFormat($g_hHeader, $iSortCol, $HDF_STRING + $g_aColAligns[$iSortCol] + $g_iSortDir) $g_bPreventHeaderChanges = True GUICtrlSendMsg($g_idListView, $LVM_SETSELECTEDCOLUMN, $iSortCol, 0) GUICtrlSendMsg($g_idListView, $LVM_SETITEMCOUNT, $g_bShowAllRows ? $g_iRows : $g_iSearch, 0) $iSortColPrev = $iSortCol ; Update $aSearch (eventually) + automatic display of 1st match (eventually too) If $g_bShowAllRows And $g_sSearch And $g_iSearch And $g_iSearch < $g_iRows Then _Update_aSearch($aSearch, $iSortCol, $idPrev, $idNext) EndIf Case $idNext $iStart = $g_iLvItem = - 1 ? 0 : $g_iLvItem < $g_iRows - 1 ? $g_iLvItem + 1 : 0 While 1 ; The while loop is used to start all over when last row in the listview is reached For $i = $iStart To $g_iRows - 1 If $aSearch[$i] And $i > $g_iLvItem Then ExitLoop Next If $i < $g_iRows Then ExitLoop $g_iLvItem = -1 $iStart = 0 Wend If $g_iLvItem > - 1 Then _GUICtrlListView_SetItemSelected($g_idListView, $g_iLvItem, False, False) _GUICtrlListView_ClickItem($g_idListView, $i) If $iStart = 0 Then Local $iGetTopIndex = _GUICtrlListView_GetTopIndex($g_idListView) _GUICtrlListView_Scroll($g_idListView, 0, ($i - $iGetTopIndex) * $iGetItemSpacingY) EndIf _GUICtrlListView_SetItemSelected($g_idListView, $i, True, True) Case $idPrev $iStart = $g_iLvItem = - 1 ? $g_iRows - 1 : $g_iLvItem > 0 ? $g_iLvItem - 1 : $g_iRows - 1 While 1 ; The while loop is used to start all over when first row in the listview is reached For $i = $iStart To 0 Step -1 If $aSearch[$i] And $i < $g_iLvItem Then ExitLoop Next If $i > -1 Then ExitLoop $g_iLvItem = $g_iRows $iStart = $g_iRows - 1 Wend If $g_iLvItem > - 1 Then _GUICtrlListView_SetItemSelected($g_idListView, $g_iLvItem, False, False) _GUICtrlListView_ClickItem($g_idListView, $i) If $iStart = 0 Then Local $iGetTopIndex = _GUICtrlListView_GetTopIndex($g_idListView) _GUICtrlListView_Scroll($g_idListView, 0, ($i - $iGetTopIndex) * $iGetItemSpacingY) EndIf _GUICtrlListView_SetItemSelected($g_idListView, $i, True, True) Case $g_idContextDummy If $g_iItem > - 1 Then _GUICtrlListView_SetSelectedColumn($g_hListView, $g_iSubItem) GUICtrlSetState($idContext_GetText, $g_iItem = - 1 ? $GUI_DISABLE : $GUI_ENABLE) Local $iMenu_Choice = _TrackPopupMenu($g_hContextMenu, $g_hGui, MouseGetPos(0), MouseGetPos(1)) If $iMenu_Choice Then Switch $iMenu_Choice Case $idContext_GetText ; Get text Local $sGetText = _GetText($g_iItem, $g_iSubItem) MsgBox($MB_TOPMOST, "Context menu", "Row = " & $g_iItem & " Column = " & $g_iSubItem & " Text = " & $sGetText & @lf) Case $idContext_ShowAll ; Show all rows ? If BitAND(GUICtrlRead($idContext_ShowAll), 4) = 4 Then ; $GUI_UNCHECKED = 4 GUICtrlSetState($idContext_ShowAll, 1) ; $GUI_CHECKED = 1 $g_bShowAllRows = True $g_aSubArray = $g_aArray ; Set $g_tIndex + eventual update $g_aIndex[$iSortCol] If $iSortCol > - 1 Then _UpdateIndex($g_aIndex, $iSortCol) ; Update $aSearch (eventually) + automatic display of 1st match (eventually too) If $g_sSearch And $g_iSearch And $g_iSearch < $g_iRows Then _Update_aSearch($aSearch, $iSortCol, $idPrev, $idNext) Else GUICtrlSetState($idContext_ShowAll, 4) ; $GUI_UNCHECKED = 4 $g_bShowAllRows = False $g_aSubArray = $g_aSubArray2 ; Set $g_tIndex + eventual update of $g_aIndexTemp[$iSortCol] If $iSortCol > - 1 Then _UpdateIndex($g_aIndexTemp, $iSortCol) ; No eventual update of $aSearch because $g_bShowAllRows = False (2 buttons Prev & Next are disable in this case) EndIf GUICtrlSetState($idPrev, ($g_bShowAllRows And $g_sSearch And $g_iSearch And $g_iSearch < $g_iRows) ? $GUI_ENABLE : $GUI_DISABLE) GUICtrlSetState($idNext, ($g_bShowAllRows And $g_sSearch And $g_iSearch And $g_iSearch < $g_iRows) ? $GUI_ENABLE : $GUI_DISABLE) GUICtrlSendMsg($g_idListView, $LVM_SETITEMCOUNT, $g_bShowAllRows ? $g_iRows : $g_iSearch, 0) Case $idContext_RightClickHeaders ; Activate headers right-click ? If BitAND(GUICtrlRead($idContext_RightClickHeaders), 4) = 4 Then ; $GUI_UNCHECKED = 4 GUICtrlSetState($idContext_RightClickHeaders, 1) ; $GUI_CHECKED = 1 $g_bRightClickHeaders = True Else GUICtrlSetState($idContext_RightClickHeaders, 4) ; $GUI_UNCHECKED = 4 $g_bRightClickHeaders = False EndIf EndSwitch Endif Case $GUI_EVENT_RESTORE ; needed, or Marker goes back in 0, 0 after Restore (why ?) _MoveMarker($g_iSearchCol) Case $GUI_EVENT_CLOSE ExitLoop EndSwitch WEnd ; Cleanup GUIDelete($g_hGui) EndFunc ;==>Example ;======================================================================== Func WM_DRAWITEM($hWnd, $iMsg, $wParam, $lParam) ; Display items in an owner drawn ListView (called once per item : no separate messages for each subitem +++) Local Static $tRect = DllStructCreate( $tagRECT ), $pRect = DllStructGetPtr( $tRect ), $tSize = DllStructCreate( $tagSIZE ) Local Static $hBrushYellow = _WinAPI_CreateSolidBrush( 0xFFFF00 ), $hBrushCyan = _WinAPI_CreateSolidBrush( 0x00FFFF ) ; Yellow and cyan, BGR Local Static $hBrushHighLight = _WinAPI_GetSysColorBrush( $COLOR_HIGHLIGHT ), $hBrushButtonFace = _WinAPI_GetSysColorBrush( $COLOR_BTNFACE ) Local $tDrawItem = DllStructCreate( $tagDRAWITEM, $lParam ), $itemID = DllStructGetData( $tDrawItem, "itemID" ), $iState = DllStructGetData( $tDrawItem, "itemState" ), $hDC = DllStructGetData( $tDrawItem, "hDC" ), $sItemText, $iSubItem If $g_bHeaderDragged Then $g_bHeaderDragged = False $g_aColumnOrder = _GUICtrlListView_GetColumnOrderArray($g_idListView) ; function inside WM_DRAWITEM (or too late to catch new order in time) For $iIdxHeader = 1 To $g_aColumnOrder[0] If $g_aColumnOrder[$iIdxHeader] = 0 Then ExitLoop ; subitem 0 always found (even if LV got 1 column only) Next Local $iSwapVal = $g_aColumnOrder[1] $g_aColumnOrder[1] = 0 ; eventual dragged subitem 0 index always in 1st position in loop to come => selected row background will be ok $g_aColumnOrder[$iIdxHeader] = $iSwapVal _MoveMarker(GUICtrlRead($g_idComboCol)) EndIf ; Loop through columns ($i is the column index) ; As $LVS_EX_HEADERDRAGDROP extended style is in the script, replace here all $i with $g_aColumnOrder[$i + 1] , i.e $iSubItem For $i = 0 To $g_iCols - 1 $iSubItem = $g_aColumnOrder[$i + 1] ; 1st one will be 0 (by design) to get a correct selected row background (columns not being all left aligned) ; Subitem rectangle DllStructSetData( $tRect, 2, $iSubItem ) ; Top DllStructSetData( $tRect, 1, $LVIR_BOUNDS ) ; Left GUICtrlSendMsg( $g_idListView, $LVM_GETSUBITEMRECT, $itemID, $pRect ) ; DllStructSetData( $tRect, 1, DllStructGetData( $tRect, 1 ) + 0 ) ; Left margin ; If first subitem, the rectangle has been calculated for the entire listview item ($LVM_GETSUBITEMRECT) ; Compensate for this by setting the width of the rectangle to the width of the first column ($LVM_GETITEMRECT message and not $LVM_GETCOLUMNWIDTH ?) ; Before that, if item is selected, fill the entire listview item width with highlight background color (it will be too late if not done now) If $iSubItem = 0 Then If BitAND( $iState, $ODS_SELECTED ) Then DllCall( "user32.dll", "int", "FillRect", "handle", $hDC, "struct*", $tRect, "handle", $fListViewHasFocus = 1 ? $hBrushHighLight : $hBrushButtonFace ) ; _WinAPI_FillRect Local $aRect = _GUICtrlHeader_GetItemRect($g_hHeader, 0) DllStructSetData( $tRect, 1, $aRect[0]) ; left DllStructSetData( $tRect, 3, $aRect[2]) ; right EndIf ; Retrieve subitem text If $g_iSortDir = 0x0400 Then ; $HDF_SORTUP = 0x0400 $sItemText = $g_aSubArray[$g_tIndex.arr($itemID + 1)][$iSubItem] Else $sItemText = $g_aSubArray[$g_tIndex.arr(($g_bShowAllRows ? $g_iRows : $g_iSearch) - $itemID)][$iSubItem] EndIf ; Subitem rectangle for right and center aligned columns If $g_aColAligns[$iSubItem] Then ; $HDF_LEFT = 0, $HDF_RIGHT = 1, $HDF_CENTER = 2 DllCall( "gdi32.dll", "bool", "GetTextExtentPoint32W", "handle", $hDC, "wstr", $sItemText, "int", StringLen( $sItemText ), "struct*", $tSize ) ; _WinAPI_GetTextExtentPoint32 Switch $g_aColAligns[$iSubItem] Case 1 ; $HDF_RIGHT DllStructSetData( $tRect, "Left", DllStructGetData( $tRect, "Right" ) - DllStructGetData( $tSize, "X" ) - 6 ) Case 2 ; $HDF_CENTER DllStructSetData( $tRect, "Left", DllStructGetData( $tRect, "Left" ) + ( DllStructGetData( $tRect, "Right" ) - DllStructGetData( $tRect, "Left" ) - DllStructGetData( $tSize, "X" ) ) / 2 - 3 ) EndSwitch EndIf ; Subitem text color DllCall( "gdi32.dll", "int", "SetTextColor", "handle", $hDC, "int", BitAND( $iState, $ODS_SELECTED ) ? $fListViewHasFocus = 1 ? 0xFFFFFF : 0x000000 : 0x000000 ) ; _WinAPI_SetTextColor ; Draw subitem text DllCall( "user32.dll", "int", "DrawTextW", "handle", $hDC, "wstr", $sItemText, "int", StringLen( $sItemText ), "struct*", $tRect, "uint", 0 ) ; _WinAPI_DrawText ; $iSubItem is column index, $g_iSearchCol is the search column ; Mark matching substring only if column index = search column If $iSubItem <> $g_iSearchCol Then ContinueLoop ; Matching substring? If $g_sSearch Then Local $sMatch = StringRegExp( $sItemText, "(?i)" & $g_sSearch, 1 ) If Not @error Then ; match found Local $extended = @extended, $iLen = StringLen( $sMatch[0] ) ; Rectangle for matching substring DllCall( "gdi32.dll", "bool", "GetTextExtentPoint32W", "handle", $hDC, "wstr", $sItemText, "int", $extended - $iLen - 1, "struct*", $tSize ) ; _WinAPI_GetTextExtentPoint32 DllStructSetData( $tRect, "Left", DllStructGetData( $tRect, "Left" ) + DllStructGetData( $tSize, "X" ) ) DllCall( "gdi32.dll", "bool", "GetTextExtentPoint32W", "handle", $hDC, "wstr", $sMatch[0], "int", $iLen, "struct*", $tSize ) ; _WinAPI_GetTextExtentPoint32 DllStructSetData( $tRect, "Right", DllStructGetData( $tRect, "Left" ) + DllStructGetData( $tSize, "X" ) ) ; Fill rectangle with yellow or cyan (selected) background color DllStructSetData( $tRect, 2, DllStructGetData( $tRect, 2 ) + 1 ) ; Top margin DllCall( "user32.dll", "int", "FillRect", "handle", $hDC, "struct*", $tRect, "handle", BitAND( $iState, $ODS_SELECTED ) ? $hBrushCyan : $hBrushYellow ) ; _WinAPI_FillRect ; Draw matching substring in rectangle DllStructSetData( $tRect, 2, DllStructGetData( $tRect, 2 ) - 1 ) ; Top margin DllCall( "gdi32.dll", "int", "SetTextColor", "handle", $hDC, "int", 0x000000 ) ; _WinAPI_SetTextColor DllCall( "user32.dll", "int", "DrawTextW", "handle", $hDC, "wstr", $sMatch[0], "int", $iLen, "struct*", $tRect, "uint", 0 ) ; _WinAPI_DrawText EndIf EndIf Next Return $GUI_RUNDEFMSG #forceref $hWnd, $iMsg, $wParam EndFunc ;======================================================================== Func WM_NOTIFY($hWnd, $iMsg, $wParam, $lParam) Local $tNMHDR = DllStructCreate($tagNMHDR, $lParam) Switch HWnd(DllStructGetData($tNMHDR, "hWndFrom")) Case $g_hListView Switch DllStructGetData($tNMHDR, "Code") Case $LVN_ITEMCHANGED Local $tNMListView = DllStructCreate($tagNMLISTVIEW, $lParam) Local $iNewState = DllStructGetData($tNMListView, "NewState") If BitAND($iNewState, $LVIS_FOCUSED) Then $g_iLvItem = DllStructGetData($tNMListView, "Item") Case $NM_RCLICK Local $tInfo = DllStructCreate($tagNMITEMACTIVATE, $lParam) $g_iItem = DllStructGetData($tInfo, "Index") ;~ If $g_iItem > -1 Then ; valid row (no, accept also non-valid row for several reasons and check $g_iItem in context menu code) $g_iSubItem = DllStructGetData($tInfo, "SubItem") GUICtrlSendToDummy($g_idContextDummy) ;~ EndIf EndSwitch Case $g_hHeader Switch DllStructGetData($tNMHDR, "Code") Case $NM_RCLICK If $g_bRightClickHeaders Then Local $aHit = _GUICtrlListView_SubItemHitTest($g_hListView) ; $aHit[1] : 0-based index of the LV subitem... i.e. the column in our case (may be -1 if right click on empty part of header) If $aHit[1] > - 1 Then ; valid column GUICtrlSetData($g_idComboCol, $aHit[1]) GUICtrlSendToDummy($g_idComboColDummy) EndIf EndIf Case $HDN_ENDDRAG ; related to LV extended style $LVS_EX_HEADERDRAGDROP $g_bHeaderDragged = True Return False ; allow the control to automatically place and reorder the item Case $HDN_BEGINTRACKW ; keep it here (older OS) Return True ; prevent tracking (especially when $LVS_EX_HEADERDRAGDROP + owner drawn) Case $HDN_ITEMCHANGINGW ; keep it here (older OS) . It takes care of $HDN_DIVIDERDBLCLICKW which is hard to prevent on older OS Return $g_bPreventHeaderChanges ? True : False ; True to prevent changes, False to allow them. EndSwitch EndSwitch Return $GUI_RUNDEFMSG EndFunc ;==>WM_NOTIFY ;======================================================================== Func WM_COMMAND($hWnd, $iMsg, $wParam, $lParam) Local $hWndFrom = $lParam Local $iCode = BitShift($wParam, 16) ; High word Switch $hWndFrom Case $g_hEdit Switch $iCode Case $EN_CHANGE GUICtrlSendToDummy($g_idEditDummy) EndSwitch EndSwitch Return $GUI_RUNDEFMSG EndFunc ;==>WM_COMMAND ;======================================================================== Func _Generate_All(ByRef $g_aArray) ConsoleWrite("$g_iRows = " & $g_iRows & " $g_iCols = " & $g_iCols & @CRLF) $g_aArray = FAS_Random2DArrayAu3($g_iRows, "sifdtr", "abcdefghijklmnopqrstuvwxyz") ; $g_aArray = FAS_Random2DArrayAu3($g_iRows, "sifdtr", "abcdefghijklmnopqrstuvwxyz" & "\.^$|[({*+?#)") ; 12 + 1 RegEx metacharacters For $i = 0 To $g_iRows - 1 $g_tIndex.arr($i + 1) = $i Next EndFunc ;==>_Generate_All ;======================================================================== Func _SortArrayStruct(Const ByRef $aArray, $iCol, $iRows) Local $tIndex = DllStructCreate("uint arr[" & $iRows & "]") Local $pIndex = DllStructGetPtr($tIndex) Local Static $hDll = DllOpen("kernel32.dll") Local Static $hDllComp = DllOpen("shlwapi.dll") Local $lo, $hi, $mi, $r ; Sorting by one column For $i = 1 To $iRows - 1 $lo = 0 $hi = $i - 1 Do $mi = Int(($lo + $hi) / 2) $r = DllCall($hDllComp, 'int', 'StrCmpLogicalW', 'wstr', $aArray[$i][$iCol], 'wstr', $aArray[DllStructGetData($tIndex, 1, $mi + 1)][$iCol])[0] Switch $r Case -1 $hi = $mi - 1 Case 1 $lo = $mi + 1 Case 0 ExitLoop EndSwitch Until $lo > $hi DllCall($hDll, "none", "RtlMoveMemory", "struct*", $pIndex + ($mi + 1) * 4, "struct*", $pIndex + $mi * 4, "ulong_ptr", ($i - $mi) * 4) DllStructSetData($tIndex, 1, $i, $mi + 1 + ($lo = $mi + 1)) Next Return $tIndex EndFunc ;==>_SortArrayStruct ;======================================================================== Func _UpdateIndex(ByRef $aIndex, $iCol) If VarGetType($aIndex[$iCol]) = "DLLStruct" Then $g_tIndex = $aIndex[$iCol] Else $g_tIndex = _SortArrayStruct($g_aSubArray, $iCol, $g_bShowAllRows ? $g_iRows : $g_iSearch) $aIndex[$iCol] = $g_tIndex ; "DLLStruct" (or "Int32" when no match found +++) EndIf EndFunc ;==>_UpdateIndex ;======================================================================== Func _Update_aSearch(ByRef $aSearch, $iSortCol, $idPrev, $idNext) $g_iSearch = 0 Dim $aSearch[$g_iRows] For $i = 0 To $g_iRows - 1 If StringRegExp($g_aArray[$g_tIndex.arr($g_iSortDir = 0x0400 ? $i + 1 : $g_iRows - $i)][$g_iSearchCol], "(?i)" & $g_sSearch) Then $aSearch[$i] = 1 ; include row $g_iSearch += 1 EndIf Next If $g_iSearch And $iSortCol = $g_iSearchCol Then GUICtrlSetState($idPrev, $GUI_ENABLE) GUICtrlSetState($idNext, $GUI_ENABLE) $g_iLvItem = - 1 ; comment this line if 1st match not to be displayed on 1st row ControlClick($g_hGui, "", $idNext) EndIf EndFunc ;==>_Update_aSearch ;======================================================================== Func _MoveMarker($iCol) Local $aRect = _GUICtrlHeader_GetItemRect($g_hHeader, $iCol) ControlMove($g_hGui, "", $g_idMarker, 10 + $aRect[0], 40 - 3, $aRect[2] - $aRect[0] + 1, 3) ; 10 / 40 are LV coords EndFunc ;==>_MoveMarker ;======================================================================== Func _TrackPopupMenu($hMenu, $hWnd, $iX, $iY) ; $TPM_RETURNCMD (0x0100) returns the menu item identifier of the user's selection in the return value. Return DllCall("user32.dll", "int", "TrackPopupMenuEx", "hwnd", $hMenu, "int", 0x0100, "int", $iX, "int", $iY, "hwnd", $hWnd, "ptr", 0)[0] EndFunc ;==>_TrackPopupMenu ;======================================================================== Func _GetText($iItem, $iSubItem) Local $sGetText If $g_iSortDir = 0x0400 Then ; $HDF_SORTUP = 0x0400 $sGetText = $g_aSubArray[$g_tIndex.arr($iItem + 1)][$iSubItem] Else $sGetText = $g_aSubArray[$g_tIndex.arr(($g_bShowAllRows ? $g_iRows : $g_iSearch) - $iItem)][$iSubItem] EndIf Return $sGetText EndFunc ;==>_GetText ;======================================================================== Func _ComputeLV_Height($iNb_Rows, $bHeader = True, $bBorder = True) Local $hGui = GUICreate("", 170, 200) ; test values not to be changed Local $idListView = GUICtrlCreateListView("Col 0", 10, 10, 150, 180) ; border $WS_EX_CLIENTEDGE Local $iClient_Height = WinGetClientSize(GUICtrlGetHandle($idListView))[1] Local $iBorder_Height = 180 - $iClient_Height Local $hHeader = GUICtrlSendMsg($idListView, $LVM_GETHEADER, 0, 0) Local $iHeader_Height = _WinAPI_GetWindowHeight($hHeader) Local $iGetItemSpacingY = _GUICtrlListView_GetItemSpacingY($idListView, True) GUIDelete($hGui) Return ($iNb_Rows * $iGetItemSpacingY) + ($bHeader ? $iHeader_Height : 0) + ($bBorder ? $iBorder_Height : 0) EndFunc ;==>_ComputeLV_Height1 point -
Shorten Web File Name - path too long
JockoDundee reacted to TheSaint for a topic
Goodo .... but like I said ... painful ... slow even and clunky. So not solid enough, and wouldn't be needed very often, and also no guarantee it fixes the issue. Have you tried it? It saves a single zip like file, but does it correct path names? I certainly cannot be bothered to chase it all down and test. I save a lot of web pages, and so the slowness and fuss would be a penalty I don't want, as each page won't tell me it has a naming length issue, so I would need to do every one just in case .... No Thanks! I am happy to react and fix after TeraCopy advises me. As I keep trying to tell you bud - Simple is best. What Exit suggested is the simplest fix, but it might bite further down the track. Hell, I'd even forgotten about the existence of that fix ... and therein lies the problem, certainly if I share beyond myself.1 point -
Creating a dynamic soft phone with a hardware interface
Xandy reacted to ViciousXUSMC for a topic
The software itself already has a nice GUI, that's why this entire thing is redicioulous lol.1 point -
Shorten Web File Name - path too long
TheSaint reacted to JockoDundee for a topic
That might be true, but before we really push the issue, let’s appreciate the degree of cognitive dissonance that any one of us might feel had we been the one to just have whipped out some piece of slick code; and were joyfully expecting to do battle over exactly how slick it was; when to our surprise we are presented with various trivial but possibly viable solutions, which, even if ultimately found wanting, will substantially delay the start of our debate on code slickness. After all this is not General Help, but Example Scripts; and surely if the illustrative code that has been presented is scrutinized for any period of time, we shall find ample fodder for an opening salvo - the likes of which the OP has been ready and waiting to return fire for some time now1 point -
Well, it sounds to me that a path issue is a pretty solid reason And yes, the addons works on Chromium-based browsers, check the GitHub page.1 point
-
Shorten Web File Name - path too long
TheSaint reacted to JockoDundee for a topic
_Singleton("shorten-web-filename-thsaint") Even thsaint himself cannot escape the dreaded shortener1 point -
Couldn't the FileGetShortName and FileGetLongName functions be useful for this as well?1 point
-
Well good for you DC. However, I won't be using it for all the other reasons I said. And remember, I am talking about this PC, not how fast it is on yours. I also found it clunky etc. I demand simplicity not fussing around ... especially for something I do a lot of. I also recall that Addon had issues, and you may remember the many emails I had with the developer back then ... sometimes it would just fail and keep failing for a specific page (i.e. at Steam). P.S. How slow that file saving was and the odd failure, was one of the reasons I finally ditched Firefox and started using Brave. P.S.S. Sometimes the cure is worse than the problem.0 points