Custom Query (3921 matches)

Filters
 
Or
 
  
 
Columns

Show under each result:


Results (295 - 297 of 3921)

Ticket Resolution Summary Owner Reporter
#3730 Works For Me Send("{BROWSER_HOME}") does not work anymore with newest Win10 and newest Autoit Exit
Description
Send("{BROWSER_HOME}")

does not work in Windows 10 Version 1903 and Autoit Version 3.3.14.5

It works in Windows 7 and Autoit Version 3.3.14.5

#3789 Fixed Fileread() returns empty string when variable > 2GB Jon Exit
Description

2GB is the maximum variable size in Autoit. If this size is reached with Fileread() due to UTF8 2 byte processing, then @extended shows 1073741823 read bytes, but the resulting string is empty. I think Fileread() should show @error > 0 . Here a reproducer:

; proof 2GB Variable fileread Error

#AutoIt3Wrapper_UseX64=y
#include <String.au3>
$sTestDir = @TempDir & "\~Test~\"
DirCreate($sTestDir)
FileDelete($sTestDir & "*.txt")
ShellExecute($sTestDir)

OnAutoItExitRegister(_Exit)
Func _Exit()
	ToolTip("")
	MsgBox(64 + 262144, Default, "Check SciTE output to verify Fileread() error." & @LF & @LF & "Then press OK to exit.", 0)
	DirRemove($sTestDir, 1)
	Sleep(500)
	WinClose("[TITLE:" & StringLeft($sTestDir, 3) & "; CLASS:CabinetWClass]")
EndFunc   ;==>_Exit

$iLength = 1024 * 1024 * 1024    ;  1 Gigabyte
$s1GB = _StringRepeat("-", $iLength)
$iLength -= 3

For $i = 1 To 2
	ToolTip("Writing Record #" & $i & ". This takes a while. Stay tuned.")
	Beep(1000, 100)
	$iLength += 1
	$hFileHandle = FileOpen($sTestDir & $i & ".txt", 2)
	$sInitData = StringLeft($i & $s1GB, $iLength)
	FileWrite($hFileHandle, $sInitData)
	FileSetPos($hFileHandle, 0, 0)
	$sReadData = FileRead($hFileHandle)
	ConsoleWrite(@LF & "Fileread $i:" & $i & " Error: " & @error & " Extended: " & @extended & @LF & "    Datalen: " & StringLen($sInitData) & @LF & "ReadDatalen: " & StringLen($sReadData) & @LF & "ReadData(first 10 Bytes): >" & StringLeft($sReadData, 10) & "< " & @LF & "Stringcompare Result: " & (StringCompare($sInitData, $sReadData, 1) ? "NOT" : "") & " equal" & @LF & @LF)
	ToolTip("")
	If StringCompare($sReadData, $sInitData, 1) Then Exit MsgBox(16 + 262144, Default, "Compare Error. I=" & $i, 0)
	FileClose($hFileHandle)
Next

and here the resulting SciTE output:

Fileread $i:1 Error: 0 Extended: 1073741822
    Datalen: 1073741822
ReadDatalen: 1073741822
ReadData(first 10 Bytes): >1---------< 
Stringcompare Result:  equal


Fileread $i:2 Error: 0 Extended: 1073741823
    Datalen: 1073741823
ReadDatalen: 0
ReadData(first 10 Bytes): >< 
Stringcompare Result: NOT equal
#1831 Fixed _FileCountLines does not handles null characters Fabien OBRIER <fobrier@…>
Description

When using _FileCountLines on a text file containing some NULL (=Chr(0)) the function does not report the whole number of lines. The function only return the number of lines before the first NULL character.

To avoid this, I propose to include a StrinReplace to delete the NULL characters as below:

Func _FileCountLines($sFilePath)

	Local $hFile = FileOpen($sFilePath, $FO_READ)
	If $hFile = -1 Then Return SetError(1, 0, 0)
	Local $sFileContent = StringStripWS(StringReplace(FileRead($hFile), Chr(0), ""), 2) ;****here is the modified line****
	FileClose($hFile)
	msgbox(0, "", $sFileContent)
	Local $aTmp
	If StringInStr($sFileContent, @LF) Then
		$aTmp = StringSplit(StringStripCR($sFileContent), @LF)
	ElseIf StringInStr($sFileContent, @CR) Then
		$aTmp = StringSplit($sFileContent, @CR)
	Else
		If StringLen($sFileContent) Then
			Return 1
		Else
			Return SetError(2, 0, 0)
		EndIf
	EndIf
	Return $aTmp[0]
EndFunc 

Best regards, Fabien OBRIER

Batch Modify
Note: See TracBatchModify for help on using batch modify.
Note: See TracQuery for help on using queries.